summaryrefslogtreecommitdiffstats
path: root/release/select-l10n
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit6d80ae38e4bfa82323398ceba27f25f94072bf5f (patch)
tree8ff7b57768c1e395e55e3c177687fb76d9d74ea3 /release/select-l10n
downloadother-6d80ae38e4bfa82323398ceba27f25f94072bf5f.tar.gz
other-6d80ae38e4bfa82323398ceba27f25f94072bf5f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'release/select-l10n')
-rw-r--r--release/select-l10n33
1 files changed, 33 insertions, 0 deletions
diff --git a/release/select-l10n b/release/select-l10n
new file mode 100644
index 0000000..54d7dbe
--- /dev/null
+++ b/release/select-l10n
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+# Select the languages with enough translations for a single-module release (e.g. koffice)
+# Run this script *first* (on a complete l10n checkout), before running tag_all.
+module=koffice
+
+cp -f /dev/null ../../language_list.new
+total=0
+for i in en_GB/messages/$module/*.po; do
+ n=`msgfmt --statistics -o /dev/null $i 2>&1 | sed -e 's/,.*$//' | cut -d' ' -f1`
+ total=$((total + $n))
+done
+required=$((total * 70 / 100))
+required=`echo $required | sed -e 's/\..*//'`
+echo "$total messages to translate, $required required as a minimum."
+for lang in *; do
+ sum=0
+ if test "$lang" != "templates" -a -d $lang/messages/$module; then
+ for i in $lang/messages/$module/*.po; do
+ n=`msgfmt --statistics -o /dev/null $i 2>&1 | sed -e 's/,.*$//' | cut -d' ' -f1`
+ sum=$((sum + $n))
+ done
+ if test $sum -gt $required; then
+ echo $lang: $sum/$total, keeping
+ echo $lang >> ../../language_list.new
+ else
+ echo $lang: $sum/$total, dropping
+ #rm -rf $lang
+ fi
+ fi
+done
+echo "Languages selected, consider doing \"mv language_list.new language_list\" if OK"
+