Edgewall Software

Changes between Version 50 and Version 51 of TracL10N


Ignore:
Timestamp:
Apr 17, 2008, 12:48:45 PM (16 years ago)
Author:
Jeroen Ruigrok van der Werven
Comment:

Clean up some more.

Legend:

Unmodified
Added
Removed
Modified
  • TracL10N

    v50 v51  
    8585=== Django ===
    8686The Python based web application framework [http://www.djangoproject.com/ Django] also uses gettext for internationalization, as decribed in http://www.djangoproject.com/documentation/i18n/.
    87 
    88 == Temporary Workaround: Template Translation ==
    89 
    90 Can it be useful? I think so. [http://projects.edgewall.com/trac/attachment/wiki/TracL10N/trac-0.9.1-templates-pt-br.tar.gz trac-0.9.1-templates-pt-br.tar.gz]
    91 
    92 == Temporary Workaround 2: gettext support for trac 0.9 and mod_python ==
    93 
    94 Adding this [http://projects.edgewall.com/trac/attachment/wiki/TracL10N/trac-0.9.0-20051108-gettext_support.patch patch] and this [http://projects.edgewall.com/trac/attachment/wiki/TracL10N/trac-0.9.0-20051108-l10n.py.patch other patch] to trac-0.9.0 you can translate almost all the strings that are not from the templates or the database. Using the patch and a set of translated templates you can use the program in your language easily (the solution is suboptimal, as you can only use one language for each project, but at least it is localized).
    95 
    96 To translate it put your self on the trac source dir and do:
    97 {{{
    98   xgettext -o trac.pot `find trac/ -name '*.py' `
    99 }}}
    100 Translate the trac.pot to your language (I usually copy it to {{{$LANG.po}}}, on the example I'll use {{{LANG=ca}}}) and compile the translations:
    101 {{{
    102   msgfmt ca.po -o /usr/share/locale/ca/LC_MESSAGES/trac.mo
    103 }}}
    104 I've only tested the patch with mod_python, to enable the translations on the apache config I've added the {{{TracLocale}}} option after setting the {{{PythonHandler}}} to the trac one:
    105 {{{
    106   PythonHandler trac.web.modpython_frontend
    107   PythonOption  TracLocale ca_ES.UTF-8
    108 }}}
    109 
    110 
    111 by Rodrigo Gimenez