[i18n] very beginning of application

Michael M Slusarz slusarz at horde.org
Fri Jul 11 14:23:52 UTC 2014


Quoting 김 덕곤 <dgkim at dgkim.net>:

> 2014. 7. 10. 오후 2:28, Michael M Slusarz 쓴 글:
>> Quoting 김 덕곤 <dgkim at dgkim.net>:
>>
>>> I want to practice translation job.
>>>
>>> with a hello world program.
>>>
>>> I think I can create myapp for example.
>>>
>>> horde/myapp - my app home directory
>>> horde/myapp/index.php - only shows 'helloworld' with horde menus(I  
>>> mean using horde framework).
>>> horde/myapp/locale/ko/myapp.po - translation.
>>> (if it's possible,) simple preferences menu(like font select maybe?)
>>>
>>> I think 'index.php' file must be created manually.
>>>
>>> file 'myapp.po' can be created with some command.
>>> and I update tranlation.
>>>
>>> I update 'index.php' to add some more translation element.
>>>
>>> then 'myapp.po' file can be updated automatically with some command.
>>>
>>> Can anyone show me how?
>>
>> Take a look at the skeleton module:
>>
>> https://github.com/horde/horde/tree/master/skeleton
>>
>> michael
>>
>> ___________________________________
>> Michael Slusarz [slusarz at horde.org]
>>
>
> Thank you for the information.
>
> I have struggled with some extra stuff.
> (removed configuration, schema information. etc.)
>
> Here is what I experimented on myapp(I renamed 'skeleton' to 'myapp').
>
> 1. gather items that needs translation(it means '_()' I think)
> horde-translation extract -m myapp
> creates myapp.pot containing keywords(?)
>
> 2. prepare locale
> horde-translation init -m myapp -l ko
> creates ko/LC_MESSAGES/myapp.po
>
> 3. update on .po file
> vi myapp/locale/ko/myapp.po
>
> 4. make .mo file
> horde-translation make -m myapp -l ko
> generates ko/LC_MESSAGES/myapp.mo
>
> 5. usual program updates.
> vi myapp/lib/Application.php
> let say add another 'Add Item' button with different title.
>
> 6. update translation files
> horde-translation update -m myapp -l ko
> updates myapp.pot, ko/LC_MESSAGES/myapp.po
>
> repeat step 3, 4.
>
> so. while I update translations for horde project applications,
> step 1 and 2 is done by developers,
> what I need to do is step 3, 4 and 6.
>
> Am I understanding it right?

Jan is the one who could better answer that question, and he won't be  
around here for a bit.  So you will probably need to wait for his  
answer.

> (still not sure about commands 'compendium', 'cleanup', 'merge' etc.)
>
> If what I'm understanding is right,
> there must be all the items(_('')) on ko/LC_MESSAGES/app.po,

You can't use _('').  The string to be translated MUST be in double  
quotes _("").  (At least this is the way it used to work several years  
ago.)

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the i18n mailing list