Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

#7843 closed defect (duplicate)

Trac localisation documentation

Reported by: guilhelm.panaget@… Owned by:
Priority: normal Milestone:
Component: i18n Version: 0.12dev
Severity: normal Keywords: gettext
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Hello,

Reading the "Trac Installation Guide for 0.12dev" to localise my trac installation I had to execute the following tasks to have a trac site in french (running on Debian Etch) :

install gettext package and :

$cd /usr/lib/ … /trac/locale/fr_FR/LC_MESSAGES

$msgfmt -o messages.mo messages.po

Attachments (0)

Change History (5)

comment:1 by Christian Boos, 16 years ago

Resolution: duplicate
Status: newclosed

Good check for binary compatibility of the .mo files ;-)

Normally we build them with Babel, by going in Trac's toplevel source dir, doing a python setup.py compile_catalog eventually together with the -l fr_FR if you only want to compile the french messages. This is all explained in the wiki:TracL10N page.

It's good to know that one can indeed do this with the regular GNU msgfmt tool. Anyway we already have a ticket to remind us we need to improve the documentation on this topic, so I'm closing this one in favor of #6387.

comment:2 by anonymous, 16 years ago

Resolution: duplicate
Status: closedreopened

Hello,

In fact I did that operation :

$python setup.py compile_catalog

but it did not generat any .mo file although it did not give any error :

running compile_catalog compiling catalog 'trac/locale/ca_ES/LC_MESSAGES/messages.po' to 'trac/locale/ca_ES/LC_MESSAGES/messages.mo' compiling catalog 'trac/locale/de_DE/LC_MESSAGES/messages.po' to 'trac/locale/de_DE/LC_MESSAGES/messages.mo' compiling catalog 'trac/locale/cs_CZ/LC_MESSAGES/messages.po' to 'trac/locale/cs_CZ/LC_MESSAGES/messages.mo' catalog 'trac/locale/cy_GB/LC_MESSAGES/messages.po' is marked as fuzzy, skipping catalog 'trac/locale/el_GR/LC_MESSAGES/messages.po' is marked as fuzzy, skipping catalog 'trac/locale/fa_IR/LC_MESSAGES/messages.po' is marked as fuzzy, skipping compiling catalog 'trac/locale/en_GB/LC_MESSAGES/messages.po' to 'trac/locale/en_GB/LC_MESSAGES/messages.mo' compiling catalog 'trac/locale/en_US/LC_MESSAGES/messages.po' to 'trac/locale/en_US/LC_MESSAGES/messages.mo' catalog 'trac/locale/es_AR/LC_MESSAGES/messages.po' is marked as fuzzy, skipping catalog 'trac/locale/es_ES/LC_MESSAGES/messages.po' is marked as fuzzy, skipping catalog 'trac/locale/fi_FI/LC_MESSAGES/messages.po' is marked as fuzzy, skipping compiling catalog 'trac/locale/et_EE/LC_MESSAGES/messages.po' to 'trac/locale/et_EE/LC_MESSAGES/messages.mo' compiling catalog 'trac/locale/fr_FR/LC_MESSAGES/messages.po' to 'trac/locale/fr_FR/LC_MESSAGES/messages.mo' catalog 'trac/locale/hu_HU/LC_MESSAGES/messages.po' is marked as fuzzy, skipping catalog 'trac/locale/ja_JP/LC_MESSAGES/messages.po' is marked as fuzzy, skipping compiling catalog 'trac/locale/it_IT/LC_MESSAGES/messages.po' to 'trac/locale/it_IT/LC_MESSAGES/messages.mo' compiling catalog 'trac/locale/ko_KR/LC_MESSAGES/messages.po' to 'trac/locale/ko_KR/LC_MESSAGES/messages.mo' catalog 'trac/locale/lv_LV/LC_MESSAGES/messages.po' is marked as fuzzy, skipping compiling catalog 'trac/locale/nb_NO/LC_MESSAGES/messages.po' to 'trac/locale/nb_NO/LC_MESSAGES/messages.mo' catalog 'trac/locale/nl_NL/LC_MESSAGES/messages.po' is marked as fuzzy, skipping catalog 'trac/locale/pl_PL/LC_MESSAGES/messages.po' is marked as fuzzy, skipping compiling catalog 'trac/locale/pt_BR/LC_MESSAGES/messages.po' to 'trac/locale/pt_BR/LC_MESSAGES/messages.mo' catalog 'trac/locale/pt_PT/LC_MESSAGES/messages.po' is marked as fuzzy, skipping catalog 'trac/locale/ru_RU/LC_MESSAGES/messages.po' is marked as fuzzy, skipping compiling catalog 'trac/locale/sl_SI/LC_MESSAGES/messages.po' to 'trac/locale/sl_SI/LC_MESSAGES/messages.mo' catalog 'trac/locale/th_TH/LC_MESSAGES/messages.po' is marked as fuzzy, skipping compiling catalog 'trac/locale/sv_SE/LC_MESSAGES/messages.po' to 'trac/locale/sv_SE/LC_MESSAGES/messages.mo' catalog 'trac/locale/tr_TR/LC_MESSAGES/messages.po' is marked as fuzzy, skipping catalog 'trac/locale/vi_VN/LC_MESSAGES/messages.po' is marked as fuzzy, skipping catalog 'trac/locale/zh_CN/LC_MESSAGES/messages.po' is marked as fuzzy, skipping catalog 'trac/locale/zh_TW/LC_MESSAGES/messages.po' is marked as fuzzy, skipping

But no .mo file… am I doing something wrong ?

in reply to:  2 comment:3 by Christian Boos, 16 years ago

Replying to anonymous:

In fact I did that operation :

$python setup.py compile_catalog

but it did not generat any .mo file although it did not give any error :

running compile_catalog
...
compiling catalog 'trac/locale/fr_FR/LC_MESSAGES/messages.po' to 'trac/locale/fr_FR/LC_MESSAGES/messages.mo'
...

But no .mo file…

Are you sure? no 'trac/locale/fr_FR/LC_MESSAGES/messages.mo'? For the ones that read "skipping…" you would indeed need an extra -f flag, to force the compilation despite of fuzzy translations, but I'm surprised it didn't produce at least those which were not marked as skipped…

And what happens when you do python setup.py compile_catalog -l fr_FR?

comment:4 by guilhelm.panaget@…, 16 years ago

Sorry… in fact it did generate the .mo file, I just wasn't looking in the good directory.

The .mo file is generated in the <source directory>/trac/locale/fr_FR/LC_MESSAGES… That was not clear in the documentation : should the "setup.py install" then be run again ?

comment:5 by Christian Boos, 16 years ago

Resolution: duplicate
Status: reopenedclosed

Closing as duplicate of #6387.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.