[luci] About luci-i18n-english

Manuel Munz freifunk at somakoma.de
Fri Nov 9 15:36:34 CET 2012


On 09.11.2012 04:11, yuyang wrote:
> HI,guys
> 
>   As we know the packages luci-i18n-english support the language of
> english.But what should we do when we want to add some new words to
> translate?
> 
> BR,
> YU

Hi,

in the "po/templates" directory you will find template files for every
component ending with .pot, e.g. p2pblock.pot.  English doesn't need to
be translated because all translation strings in the lua code are
already english. The most basic is base.pot, that contains all
translation strings that are used in the base system.

So lets say for example you extended the p2pblock application and
inserted some new translation strings. Of course you could add those
manually to p2pblock.pot and every translation (e.g. po/de/p2pblock.po).
Because this is very inefficient there are some scripts in build/ to
help you with that. In our example we could do:

1.) ./build/i18n-scan.pl applications/luci-p2pblock >
po/templates/p2pblock.pot
2.) ./build/i18n-update.pl po p2pblock.po

This will first scan the folder applications/p2pblock for translatable
strings, write them to the p2pblock.pot template and with the second
command update every language file in po.

Hth,

Manuel


-- 
Work:    http://www.comuno.net
Passion: http://augsburg.freifunk.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.subsignal.org/pipermail/luci/attachments/20121109/95e56c2d/attachment.pgp>


More information about the luci mailing list