From 4fbecc4874340a2e844a2deecdc49ea2cfa1f620 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 14 May 2009 21:10:40 +0000 Subject: [PATCH] build: add "po" target to Makefile --- Makefile | 6 ++++++ build/i18n-lua2po.pl | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a45d39e89..4abb358b2 100644 --- a/Makefile +++ b/Makefile @@ -66,6 +66,12 @@ uvldocs: hostenv build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) \ "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: # make run is deprecated # # Please use: # diff --git a/build/i18n-lua2po.pl b/build/i18n-lua2po.pl index a9bc3b4f6..4905bb4b1 100755 --- a/build/i18n-lua2po.pl +++ b/build/i18n-lua2po.pl @@ -73,9 +73,9 @@ if( open F, "find . -path '*/luasrc/i18n/*' -name '*.$master_lang.lua' |" ) printf "Generating %-40s ", "$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", - $basename, $target_lang, $file; + $basename, $ext, $file; while( chomp( my $entry = readline L ) ) { -- 2.11.0