[LibX] prefs panel translation

Godmar Back godmar at gmail.com
Fri May 4 07:07:10 PDT 2012


A question for Brian is at the end.

On Fri, May 4, 2012 at 8:55 AM, Grolimund Raphaël <raphael.grolimund at epfl.ch
> wrote:

>  Hi everyone,****
>
> ** **
>
> I wonder how to translate LibX prefs panel (in French, in my case). I’ve
> been digging in the libx file tree to find files to located and found these
> files:****
>
> chrome/libx/content/libx/bootstrapped/preferences/templates/libx.prefs.tmpl
> ****
>
>
> chrome/libx/content/libx/bootstrapped/preferences/templates/libx.prefs.libapps.tmpl
> ****
>
> chrome/libx/content/libx/bootstrapped/preferences/templates/about.libx.tmpl
> ****
>
> chrome/libx/content/libx/bootstrapped/preferences/templates/developer.tmpl
> ****
>
>
> chrome/libx/content/libx/bootstrapped/preferences/templates/objectcache.tmpl
> ****
>
> ** **
>
> Values are hardcoded. If a modify these files and add translation in the
> messages.json on file will the translation work ?****
>
> Or am I missing something ?
>

The values are not hardcoded (at least, they shouldn't be. If you find one
that is, let us know asap).

LibX's i18n is described in Brian's thesis, section 5.2.3 available here:
http://scholar.lib.vt.edu/theses/available/etd-12202011-204944/unrestricted/Nicholson_BR_T_2011.pdf

You need to provide:

a) a translation of
http://libx.org/libx2/libx2-git/src/base/bootstrapped/preferences/builtin/locales/en_US/browser.json

b) for the .tmpl files you've mentioned, such as
http://libx.org/libx2/libx2-git/src/base/bootstrapped/preferences/templates/libx.prefs.tmpl
a
translation of the locale block:

{BeginLocale=en_US}
    {
        "browser_tabname" :     { "message" : "Browser" },
        "browser_tooltip" :     { "message" : "Preferences related to
the browser interface" },
        "contextmenu_tabname" : { "message" : "Context Menu" },
        "contextmenu_tooltip" : { "message" : "Change which search
options appear when right-clicking on a page" },
        "libapps_tabname" :     { "message" : "Libapps" },
        "libapps_tooltip" :     { "message" : "Add/remove packages and
configure current libapps" },
        "developer_tabname" :   { "message" : "Developer" },
        "developer_tooltip" :   { "message" : "Cache and libapp information" },
        "about_tabname" :       { "message" : "About" },
        "about_tooltip" :       { "message" : "See the authors of LibX" }
    }
{EndLocale}


Ok - Brian - I was rereading 5.2.3 in your thesis, but could you please
remind me why we decided on the embedding for the user layout files vs. the
external files for builtin.tmpl?  It seems embedding is harded to maintain,
e.g., we can't use something like
http://libx.org/libx2/libx2-git/src/base/translate.php?locale=fr

 - Godmar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mozdev.org/pipermail/libx/attachments/20120504/7030fea3/attachment.html>


More information about the Libx mailing list