[i18n] very beginning of application
김 덕곤
dgkim at dgkim.net
Thu Jul 10 06:51:50 UTC 2014
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?
(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,
but there was some missing item in my file(I mean ko/.po file).
In that case, I referenced 'fr'/.po file.
Is it unavoidable situation? will be solved later?
More information about the i18n
mailing list