浏览代码

build: i18n-sync.sh: fix i18n-update.pl invocation

Fixes: 4d3c0f347c ("build: i18n-sync.sh: allow restricting to directory")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Jo-Philipp Wich 3 年之前
父节点
当前提交
d354f0b107
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      build/i18n-sync.sh

+ 7 - 1
build/i18n-sync.sh

@@ -15,4 +15,10 @@ find "${1:-.}" -name '*.pot' -and -not -name base.pot | \
 		echo "done"
 	done
 
-./build/i18n-update.pl "${1:-./*/*/po}"
+if [ -n "$1" ]; then
+	find "$1" -path '*/templates/*.pot' -printf '%h ' | \
+		xargs -r -n 1 dirname | \
+		xargs -r -n 1 ./build/i18n-update.pl
+else
+	./build/i18n-update.pl
+fi