Hi LUCI author
From the document, you suggest developer to do like this:
# Rebuild po files
If you want to rebuild the translations after you made changes to a package this is an easy way:
./build/i18n-scan.pl applications/luci-app-example > applications/luci-app-example/po/templates/example.pot
When I tired this, I found ./build/i18n-scan.pl would scan all the js/lua/html files and generate .pot template. My question is:
1.It's look like “./build/i18n-update.pl” would not generate a new .po file at all(it will only update a already existed .po file). So do you means the common develop process should be : generate .pot file ->make a specific language po dir(let's say "Zh-Hans") -> copy .pot to po/zh-Hans/ dir ->translate and update the po/zh-Hans/example.po file
2.When I check the runtime Openwrt, I found the actually i18n file located at /usr/lib/lua/luci/i18n, and file format is .lmo. How can I generate the .lmo file? It was not mention in the document.
LuCI-0.10.md will anwser this question.
Authors who externally package LuCI components must prepare required *.lmo archives themselves.
To convert existing Lua based message catalogs to the *.po format, the build/i18n-lua2po.pl helper script can be used.
In order to convert *.po files into *.lmo files, the standalone "po2lmo" utility must be compiled as follows:
$ svn co http://svn.luci.subsignal.org/luci/branches/luci-0.10/libs/lmo
$ cd lmo/
$ ./src/po2lmo translations.po translations.lmo
But actually, the po2lmo.c is located at modules\luci-base\src,and the executable is located at build_dir/target-aarch64_cortex-a53_glibc/luci-base/po2lmo
So the document is still outdated.
(The old docs file has just been imported/saved/archived from the ancient Luci site, when that was scrapped a few years ago.)
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.