[i18n] missing translation .po file and doesn't apply?
김 덕곤
dgkim at dgkim.net
Wed Mar 19 10:20:17 UTC 2014
2014. 3. 19. 오후 5:59, Jan Schneider 쓴 글:
>
> Zitat von 김 덕곤 <dgkim at dgkim.net>:
>
>> 2014. 3. 19. 오후 5:32, Jan Schneider 쓴 글:
>>>
>>> Zitat von 김 덕곤 <dgkim at dgkim.net>:
>>>
>>>> 2014. 3. 16. 오후 10:52, Erling Preben Hansen 쓴 글:
>>>>> Citat af 김 덕곤 <dgkim at dgkim.net>:
>>>>>
>>>>>> While I'm doing translation job.
>>>>>>
>>>>>> I couldn't find following.
>>>>>>
>>>>>> '''
>>>>>> Click on one of your selected address books and then select all
>>>>>> fields
>>>>>> to search.
>>>>>> To select multiple fields, hold down the Control (PC) or Command
>>>>>> (Mac)
>>>>>> while clicking.
>>>>>> '''
>>>>>>
>>>>>> And I have translated some string, but can't apply on runtime.
>>>>>>
>>>>>> How do I debug it?
>>>>>>
>>>>>> ex. ' Default Alarm Setting:' ..
>>>>>>
>>>>>> How can I verify that .mo contains my msgstr?
>>>>>> --
>>>>>> i18n mailing list
>>>>>> Frequently Asked Questions: http://wiki.horde.org/FAQTo unsubscribe,
>>>>>> mail: i18n-unsubscribe at lists.horde.org
>>>>>
>>>>>
>>>>> Hey
>>>>> I had same problem with some strings not showing as translated.
>>>>> I found out that it is important that the mo file is generated on the
>>>>> system it is running on.
>>>>> So I ran:
>>>>> sudo horde-translate -b /path-to/module-base make -m module-name -l
>>>>> language --no-compendium
>>>>>
>>>>> On my ubuntu system it would be like this for Horde_Core.
>>>>> sudo horde-translate -b /usr/share/php/data/ make -m Horde_Core -l da
>>>>> --no-compendium
>>>>>
>>>>> Then it worked. For strings I have translated.
>>>>>
>>>>> However I still have one or two string I can't find any where.
>>>>>
>>>>> It is too early to say yet but I do think that perhaps it is some
>>>>> other
>>>>> error.
>>>>> Perhaps a typo or something I don't know and aren't sure.
>>>>> /erling
>>>> I found strange thing.
>>>>
>>>> While I translating kronolith/ko/LC_MESSAGES/kronolith.po.
>>>>
>>>> message 'Default Alarm Setting:' which is on file
>>>> kronolith/templates/prefs/defaultlarm.html
>>>>
>>>> horde-translation and copied po, mo files to
>>>> kronolith/locale/ko/LC_MESSAGES/
>>>> (I am translating on git source)
>>>>
>>>> but translation doesn't work.
>>>>
>>>> so I updated defaultalarm.html file(to see difference). then
>>>> translation worked.
>>>>
>>>> I think there is a relation gettext thing and .html thing
>>>>
>>>> Why is that? and is it normal?
>>>
>>> Yes, gettext catalogs are cached, and gettext isn't thread-safe.
>>> This combination produces a lot of funny behavior when updating
>>> translations. Restarting the web server helps.
>> Many of translations works when I restart apache,
>> but even If I restart apache, (I think) .html file parts are not
>> applied.
>>
>> defaultalarm.html is worked luckly, but
>> horde/templates/prefs/app.html is not.
>
> Works fine here.
>
>> Is there anyone who knows how to flush gettext cache explicitly?
>
> Restarting the process that caches the content *is* the solution to
> flushing the cache.
>
When I use following test code
'''
$language = "ko_KR.UTF-8";
putenv("LANG=$language");
setlocale(LC_ALL, $language);
// Set the text domain as 'messages'
$domain = 'horde';
//bindtextdomain($domain, "/home/sysop/git/horde/horde/locale");
bindtextdomain($domain, "/var/www/html/horde/locale");
textdomain($domain);
echo gettext("Account Information");
echo "\n";
echo gettext("Edit Preferences for");
echo "\n";
'''
shows correctly.
Is it possible to test preferences page with php cli not with web browser?
More information about the i18n
mailing list