diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:07:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:07:31 +0000 |
commit | edaebb65d92a48d7075c8c1f64c5ffd87054827b (patch) | |
tree | 045c941e1851cde1665bea22d97a2976b7a5bb69 /debian/scripts/stat_pos.sh | |
parent | Adding upstream version 4:7.4.7. (diff) | |
download | libreoffice-edaebb65d92a48d7075c8c1f64c5ffd87054827b.tar.xz libreoffice-edaebb65d92a48d7075c8c1f64c5ffd87054827b.zip |
Adding debian version 4:7.4.7-1+deb12u1.debian/4%7.4.7-1+deb12u1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | debian/scripts/stat_pos.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/scripts/stat_pos.sh b/debian/scripts/stat_pos.sh new file mode 100755 index 000000000..c0469ad9a --- /dev/null +++ b/debian/scripts/stat_pos.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +# Quick and dirty script to stat the LO translations/ pos wrt % translated +# FIXME: maybe use pocount from translate-toolkit + +# Author: Rene Engelhard <rene@debian.org> +# (C) 2017 Software in the Public Interest, Inc. + +cd translations/source + +for l in `ls -1`; do + # 23:36 <@cloph> no - but you can do a brute-force method of just counting msgid and comparing that with »msgstr ""« matches. + # 23:37 <@cloph> While that ignores multiline strings, there aren't too many and should work as a rough estimate + msgid_count=$(grep msgid `find $l -name "*.po"` | wc -l) + msgstr_count=$(grep msgstr `find $l -name "*.po"` | wc -l) + empty_msgstr_count=$(grep msgstr\ \"\" `find $l -name "*.po"` | wc -l) + p=$((100*$empty_msgstr_count/$msgid_count)) + echo "$l: $msgid_count strings, $(($msgid_count-$empty_msgstr_count))/$msgid_count translated; $empty_msgstr_count/$msgid_count untranslated" + if test $msgid_count -lt 50000; then + echo "$l: no help translations" + fi + echo "$l: $((100-$p))% translated, $p% untranslated" + + if test $p -lt 20; then + langs="$langs $l" + fi +done + +echo "languages over 80% translated:" +echo $langs |