aboutsummaryrefslogtreecommitdiffhomepage
path: root/markup/pod/live-manual/media/text/bin/show-complete-languages.sh
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2021-11-27 21:54:49 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2021-11-27 21:54:49 -0500
commit78b1b83be0cf04b4cba707751b7ad4d97787fe37 (patch)
tree0260daae62c3c0c055b7ec73b274fa82b31b344f /markup/pod/live-manual/media/text/bin/show-complete-languages.sh
track document samples used
Diffstat (limited to 'markup/pod/live-manual/media/text/bin/show-complete-languages.sh')
-rwxr-xr-xmarkup/pod/live-manual/media/text/bin/show-complete-languages.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/markup/pod/live-manual/media/text/bin/show-complete-languages.sh b/markup/pod/live-manual/media/text/bin/show-complete-languages.sh
new file mode 100755
index 0000000..4682d0a
--- /dev/null
+++ b/markup/pod/live-manual/media/text/bin/show-complete-languages.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+set -e
+
+# Find 100% translated languages in live-manual
+
+Find_untranslated ()
+{
+for POFILE in manual/po/"${LANGUAGE}"/*
+ do
+
+ if [ "$(sed '$!d' ${POFILE})" = 'msgstr ""' ]
+ then
+ sed '$G' ${POFILE} | grep --extended-regexp --before-context=1 '^$' | grep --count '^msgstr ""$' || continue
+ else
+ grep --extended-regexp --before-context=1 '^$' ${POFILE} | grep --count '^msgstr ""$' || continue
+ fi
+
+ done
+}
+
+ for LANGUAGE in $(ls manual/po)
+ do
+ if [ "$(Find_untranslated | awk '{ sum += $1 } END { print sum }')" -eq "0" ]
+ then
+ echo -n "${LANGUAGE}, "
+ fi
+ done