diff options
Diffstat (limited to 'aux/workflow/l10n.sh')
-rwxr-xr-x | aux/workflow/l10n.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/aux/workflow/l10n.sh b/aux/workflow/l10n.sh index 66e452a..683758f 100755 --- a/aux/workflow/l10n.sh +++ b/aux/workflow/l10n.sh @@ -36,12 +36,15 @@ for from_f in "$@"; do case "$from_f" in *.en.[1-9].in) po4a-updatepo -f man -m "$from_f" -p "$pofile" - po4a-translate -f man -m "$from_f" -p "$pofile" -l "$to_f" -k 0 -v >&2 + po4a-translate -f man -m "$from_f" \ + -p "$pofile" -l "$to_f" -k 0 -v >&2 ;; *.en.md) touch "$pofile" - md2po --include-codeblocks --quiet --save --po-filepath "$pofile" < "$from_f" - po2md --pofiles "$pofile" --quiet --save "$to_f" --wrapwidth 999 < "$from_f" + md2po --include-codeblocks --quiet --save \ + --po-filepath "$pofile" < "$from_f" + po2md --pofiles "$pofile" --save "$to_f" \ + --quiet --wrapwidth 999 < "$from_f" ;; *) echo "Unsupported file format: $from_f" >&2 @@ -56,8 +59,12 @@ yellowb="\033[1;33m" for lang in $LANGS; do # shellcheck disable=2044 for pofile in $(find po/ -type f -name "$lang.po"); do - if LANG=POSIX msgfmt --statistics "$pofile" 2>&1 | grep untranslated; then - printf "\n\t${yellowb}WARNING${end}!\n Missing translations for %s\n\n" "$pofile" >&2 + if ! LANG=POSIX msgfmt --statistics "$pofile" 2>&1 | + grep untranslated; then + continue fi + # shellcheck disable=2059 + printf "\n ${yellowb}WARNING${end}!" >&2 + printf "\n Missing translations for %s\n\n" "$pofile" >&2 done done |