build: add "po" target to Makefile
This commit is contained in:
parent
6948b6bc70
commit
4fbecc4874
2 changed files with 8 additions and 2 deletions
6
Makefile
6
Makefile
|
@ -66,6 +66,12 @@ uvldocs: hostenv
|
||||||
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) \
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) \
|
||||||
"build/uvldoc $(realpath host) $(UVL_SCHEMEDIR) uvldocs $(DOCS)"
|
"build/uvldoc $(realpath host) $(UVL_SCHEMEDIR) uvldocs $(DOCS)"
|
||||||
|
|
||||||
|
po:
|
||||||
|
for L in $${LANGUAGE:-$$(find i18n/ -path 'i18n/*/luasrc/i18n/*' -name 'default.*.lua' | \
|
||||||
|
sed -e 's!.*/default\.\(.*\)\.lua!\1!')}; do \
|
||||||
|
build/i18n-lua2po.pl . $(realpath host)/po $$L; \
|
||||||
|
done
|
||||||
|
|
||||||
run:
|
run:
|
||||||
# make run is deprecated #
|
# make run is deprecated #
|
||||||
# Please use: #
|
# Please use: #
|
||||||
|
|
|
@ -73,9 +73,9 @@ if( open F, "find . -path '*/luasrc/i18n/*' -name '*.$master_lang.lua' |" )
|
||||||
printf "Generating %-40s ",
|
printf "Generating %-40s ",
|
||||||
"$target_dir/$basename.$ext";
|
"$target_dir/$basename.$ext";
|
||||||
|
|
||||||
printf T "# %s.%s.po\n# generated from %s\n\nmsgid \"\"\n" .
|
printf T "# %s.%s\n# generated from %s\n\nmsgid \"\"\n" .
|
||||||
"msgstr \"Content-Type: text/plain; charset=UTF-8\"\n\n",
|
"msgstr \"Content-Type: text/plain; charset=UTF-8\"\n\n",
|
||||||
$basename, $target_lang, $file;
|
$basename, $ext, $file;
|
||||||
|
|
||||||
while( chomp( my $entry = readline L ) )
|
while( chomp( my $entry = readline L ) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue