How to generate lmo file of LUCI i18n

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/ applications/luci-app-example > applications/luci-app-example/po/templates/example.pot
	./build/ applications/luci-app-example/po

When I tired this, I found ./build/ would scan all the js/lua/html files and generate .pot template. My question is:
1.It's look like “./build/” 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. 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/ 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
	$ cd lmo/
	$ make
	$ ./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.

Sure it is. LuCI 0.10 version is roughly from year 2011, and e.g. references to SVN and specific Luci domain etc. After that there has been a large reorganisation of package structure and a massive move toward javascript etc.

(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.