[horde] [Horde 4.0-git] i18n test Locales
Gerard Breiner
gerard.breiner at ias.u-psud.fr
Mon Oct 4 15:51:03 UTC 2010
Jan Schneider a écrit :
> Zitat von Gerard Breiner <gerard.breiner at ias.u-psud.fr>:
>
>> Jan Schneider a écrit :
>>> Zitat von Gerard Breiner <gerard.breiner at ias.u-psud.fr>:
>>>
>>>> Hello,
>>>>
>>>> Horde 4.0-git Debian Lenny
>>>>
>>>> I'm encountering some issues with locales that are not translated.
>>>> So, I've read the excellent tuto horde/docs/TRANSLATIONS and now
>>>> I'm trying the langtest.php in the Horde's PHP Shell.
>>>
>>> That's the problem. Don't run it in the shell.
>>>
>>>> I'am a little puzzled by the result . It seems that the translation
>>>> does not work.
>>>>
>>>> Here is the code langtest.php
>>>> [CODE]
>>>> <?php
>>>>
>>>> setlocale(LC_MESSAGES, 'nl_NL');
>>>> putenv('LANG=nl_NL');
>>>> putenv('LANGUAGE=nl_NL');
>>>> // use the tar test.
>>>> echo dgettext('tar', 'Memory exhausted');
>>>> echo '<br />';
>>>>
>>>> // Specify location of translation tables
>>>> bindtextdomain('horde', './locale');
>>>>
>>>> // Choose domain
>>>> textdomain('horde');
>>>>
>>>> // Print the already tested message
>>>> echo _("Message");
>>>> echo '<br />';
>>>>
>>>> // this should print the same.
>>>> echo dgettext('horde', 'Message');
>>>>
>>>> ?>
>>>>
>>>> [/CODE]
>>>>
>>>> Results
>>>>
>>>> Memory exhausted
>>>> Message
>>>> Message
>>>>
>>>> # End of results
>>>>
>>>>
>>>> I'm wondering what is wrong or missed on my platform.
>>>>
>>>> Thanks in advance for any help.
>>>>
>>>> Best regards
>>>>
>>>> Gerard Breiner
>>>>
>>>> Institut d'Astrophysique Spatiale
>>>> Campus Orsay-Ville
>>>> France
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
>>>> Frequently Asked Questions: http://horde.org/faq/
>>>> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>>>>
>>>
>>>
>>>
>>> Jan.
>> Thanks Jan! However Output web browser should be "Geheugen uitgeput
>> Bericht Bericht" whereas I get "Memory exhausted Bericht Bericht"...
>> Nevertheless it seems it is working.
>> However it appears to me that the translation for fr-FR in imp.po of
>> imp/templates/dimp/index.inc:64 imp/templates/dimp/index.inc:65
>> imp/templates/dimp/index.inc:73 imp/templates/dimp/index.inc:76 and
>> imp/templates/dimp/index.inc:79 is missed. So I added them in imp.po
>> and run the compile
>> horde/bin/translation make --locale=fr_FR --module imp
>> --no-compendium but the imp.mo file is not modified.
>>
>> The "translation" command return :
>>
>> [MESSAGE]
>> Horde translation generator
>> ---------------------------
>> Loading libraries...
>> [ OK ] Console_Getopt found.
>> [ OK ] Console_Table found.
>> [ OK ] File_Find found.
>>
>> Searching gettext binaries...
>> [ OK ] gettext found: /usr/bin/gettext
>> [ OK ] msgattrib found: /usr/bin/msgattrib
>> [ OK ] msgcat found: /usr/bin/msgcat
>> [ OK ] msgcomm found: /usr/bin/msgcomm
>> [ OK ] msgfmt found: /usr/bin/msgfmt
>> [ OK ] msginit found: /usr/bin/msginit
>> [ OK ] msgmerge found: /usr/bin/msgmerge
>> [ OK ] xgettext found: /usr/bin/xgettext
>>
>> [ OK ] gettext version: 0.17
>>
>> Searching Horde applications in /www/horde-git/horde/lib/../..
>> Found applications: horde, jeta, turba, passwd, trean, folks, fima,
>> timeobjects, news, skoli, kronolith, agora, ingo, gollem, imp, skeleton,
>> whups, vilma, mnemo, ansel, hermes, nag, beatnik, kastalia, jonah,
>> wicked,
>> babel, luxor, chora
>>
>> Cleaning up PO files for module imp...
>> Skipped...
>>
>>
>> Building MO files for module imp...
>> Skipped...
>>
>> Results (including Horde):
>> +--------+----------+------------+-------+--------------+---------+
>> | Module | Language | Translated | Fuzzy | Untranslated | Updated |
>> +--------+----------+------------+-------+--------------+---------+
>> | | | | | | |
>> +--------+----------+------------+-------+--------------+---------+
>> [/MESSAGE]
>
> It doesn't even compile the french translation for imp, meaning that
> it either don't find it, or can't open it.
> And don't add items manually to the po file, use "translation update"
> (with the appropriate arguments).
>
> Jan.
>
Hum... that make me puzzle... because files imp.po and imp.mo for the
french translation exists... and are owned by the apache server.
/www/horde/imp/locale/fr/LC_MESSAGES$ ls -l
total 428
-rw-r----- 1 webadm www 258962 2010-09-29 10:10 imp.mo
-rw-r----- 1 webadm www 163899 2010-10-04 16:15 imp.po
Sorry, I'm not sure to have understood how to use "translation
update"... I suppose I have to added items via a file (foo.po) and then
run :
translation update --locale=fr_FR --module=imp --compendium=foo.po
In this case I get :
[MESSAGE]
---------------------------
Horde translation generator
---------------------------
Loading libraries...
[ OK ] Console_Getopt found.
[ OK ] Console_Table found.
[ OK ] File_Find found.
Searching gettext binaries...
[ OK ] gettext found: /usr/bin/gettext
[ OK ] msgattrib found: /usr/bin/msgattrib
[ OK ] msgcat found: /usr/bin/msgcat
[ OK ] msgcomm found: /usr/bin/msgcomm
[ OK ] msgfmt found: /usr/bin/msgfmt
[ OK ] msginit found: /usr/bin/msginit
[ OK ] msgmerge found: /usr/bin/msgmerge
[ OK ] xgettext found: /usr/bin/xgettext
[ OK ] gettext version: 0.17
Searching Horde applications in /www/horde-git/horde/lib/../..
Found applications: horde, jeta, turba, passwd, trean, folks, fima,
timeobjects, news, skoli, kronolith, agora, ingo, gollem, imp, skeleton,
whups, vilma, mnemo, ansel, hermes, nag, beatnik, kastalia, jonah, wicked,
babel, luxor, chora
Extracting from imp... not changed
Cleaning up PO files for module imp...
Skipped...
Merging translation for module imp...
Skipped...
[/MESSAGE]
Thanks for this advice that makes more secure the add of items.
Nevertheless I do not understand what that prevent to update the "locales".
Best regards
Gerard Breiner
More information about the horde
mailing list