[horde] [Horde 4.0-git] i18n test Locales

Gerard Breiner gerard.breiner at ias.u-psud.fr
Tue Oct 5 15:37:33 UTC 2010


Jan Schneider a écrit :
> So it's exactly what I said: a permission error. Unless you run the script as the Apache user.
>
>
> "Gerard Breiner" <gerard.breiner at ias.u-psud.fr> schrieb:
>
>   
>> 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
>> -- 
>> 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
>>     
>
>   
Yes, I run the script as the Apache user and after checking again all 
files are owned by apache.
I created a file "tt.po" and fill with
[CODE]
#: imp/templates/dimp/index.inc:79
msgid "Log Out"
msgstr "Déconnexion"
[CODE]

Then I runed "translation in mode debug :

 /www/horde-git/horde/bin/translation --debug update --locale=fr_FR 
--module=imp  --compendium=tt.po
And 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 directories:
/www/horde-git/horde/lib/..
/www/horde-git/horde/lib/../../jeta
/www/horde-git/horde/lib/../../turba
/www/horde-git/horde/lib/../../passwd
/www/horde-git/horde/lib/../../trean
/www/horde-git/horde/lib/../../folks
/www/horde-git/horde/lib/../../fima
/www/horde-git/horde/lib/../../timeobjects
/www/horde-git/horde/lib/../../news
/www/horde-git/horde/lib/../../skoli
/www/horde-git/horde/lib/../../kronolith
/www/horde-git/horde/lib/../../agora
/www/horde-git/horde/lib/../../ingo
/www/horde-git/horde/lib/../../gollem
/www/horde-git/horde/lib/../../imp
/www/horde-git/horde/lib/../../skeleton
/www/horde-git/horde/lib/../../whups
/www/horde-git/horde/lib/../../vilma
/www/horde-git/horde/lib/../../mnemo
/www/horde-git/horde/lib/../../ansel
/www/horde-git/horde/lib/../../hermes
/www/horde-git/horde/lib/../../nag
/www/horde-git/horde/lib/../../beatnik
/www/horde-git/horde/lib/../../kastalia
/www/horde-git/horde/lib/../../jonah
/www/horde-git/horde/lib/../../wicked
/www/horde-git/horde/lib/../../babel
/www/horde-git/horde/lib/../../luxor
/www/horde-git/horde/lib/../../chora
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... Executing:
/usr/bin/xgettext --language=PHP --from-code=iso-8859-1 --keyword=_ 
--sort-output --copyright-holder="Horde Project" 
--msgid-bugs-address="dev at lists.horde.org" 
--files-from=locale/imp.pot.list --output=locale/imp.pot.tmp.pot
In: /www/horde-git/imp
Executing:
/usr/bin/msgcomm --more-than=0 --sort-output "locale/imp.pot.tmp.pot" 
"locale/imp.pot.templates" --output-file "locale/imp.pot.tmp.pot"
Executing:
/usr/bin/msgcomm --more-than=0 --sort-output "locale/imp.pot.tmp.pot" 
"locale/imp.pot.config" --output-file "locale/imp.pot.tmp.pot"
not changed

Cleaning up PO files for module imp...
Skipped...

Merging translation for module imp...
Skipped...

[/MESSAGE]

You've certainly right  but I do not see where there is a permission error.

Best regards

Gerard Breiner


More information about the horde mailing list