build: add "po" target to Makefile
[project/luci.git] / Makefile
index a45d39e..4abb358 100644 (file)
--- 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:                                     #