[Sugar-devel] [PATCH Browse] Error page SL #3500

Manuel Kaufmann humitos at gmail.com
Tue Sep 18 13:00:44 EDT 2012


On Tue, Sep 18, 2012 at 1:55 PM, Manuel Kaufmann <humitos at gmail.com> wrote:
> This patch contains a HTML template (error_page.tmpl) that is used to
> generate the error page with the correct language.

Please, comments and suggestions are welcomed here. I didn't find an
existent way (inside Sugar) to translate html content, so I decide to
make it by myself.

I created a file called "error_page.tmpl" that contains the html
structure of the page with some placeholders to put the translated
strings (those placeholders are substituted with the % operator) and a
new html file is create: "error_page.html" with the correct strings
and url to try again. Then, this file is used to tell WekKit to load
that file as an uri:

  self.load_uri('file://' + DEFAULT_ERROR_PAGE)

That file is generated every time that the web page can't be reached
for any reason.

See you,

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/


More information about the Sugar-devel mailing list