summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <timar@fsf.hu>2011-03-14 08:11:33 +0100
committerAndras Timar <timar@fsf.hu>2011-03-14 08:11:33 +0100
commitcf97e6633268b64dea8f09d9e2bc7fdc37642824 (patch)
treea10952c61026cd2eca1df43d924ddd85c6b5c37f
parentd074b3afe9ebef27a5fa7bc73386848fcc7fd2da (diff)
l10nlistfallback, l10nstat, readmecheck
-rwxr-xr-xl10nlistfallback.sh28
-rwxr-xr-xl10nstat.sh32
-rwxr-xr-xreadmecheck.sh6
3 files changed, 66 insertions, 0 deletions
diff --git a/l10nlistfallback.sh b/l10nlistfallback.sh
new file mode 100755
index 0000000..7c476b5
--- /dev/null
+++ b/l10nlistfallback.sh
@@ -0,0 +1,28 @@
+#!/bin/bash -x
+OOBUILDDIR='/home/timar/libreoffice-3-3/build/libreoffice-3.3.2.1'
+MY_PATH=`pwd`
+. $OOBUILDDIR/LinuxX86Env.Set.sh
+SOURCE_ROOT_DIR='/home/timar/libreoffice-3-3/build/libreoffice-3.3.2.1'
+export SOURCE_ROOT_DIR
+test -n "$OO_TOOLSDIR" && solenv_dir=$SOLARENV || solenv_dir=$OOBUILDDIR/solenv
+if test -f $solenv_dir/inc/postset.mk ; then
+ # generate shell variable from completelangiso= from solenv/inc/postset.mk
+ # the sed command does the following:
+ # + if a line ends with a backslash, append the next line to it
+ # + adds " on the beginning of the value (after =)
+ # + adds " at the end of the value
+ # + removes en-US; we want to put it on the beginning
+ # + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
+ eval $(sed -e :a -e '/\\$/N; s/\\\n//; ta' -n -e 's/=/="/;s/\([^\\]\)$/\1"/;s/en-US//;/^completelangiso/p' $solenv_dir/inc/postset.mk)
+ for i in $completelangiso; do
+ localize -e -l $i -f $MY_PATH/$i-1.sdf
+ localize -e -l $i=en-US -f $MY_PATH/$i-2.sdf
+ $OOBUILDDIR/../../bin/compare.pl $i-1.sdf $i-2.sdf >$i-fallback.sdf
+ grep " itemlist " $i-fallback.sdf >> fallback-to-en-US.sdf
+ grep " filterlist " $i-fallback.sdf >> fallback-to-en-US.sdf
+ grep " stringlist " $i-fallback.sdf >> fallback-to-en-US.sdf
+ grep " pairedlist " $i-fallback.sdf >> fallback-to-en-US.sdf
+ grep " readmeitem " $i-fallback.sdf >> fallback-to-en-US.sdf
+ done
+fi
+
diff --git a/l10nstat.sh b/l10nstat.sh
new file mode 100755
index 0000000..7658df4
--- /dev/null
+++ b/l10nstat.sh
@@ -0,0 +1,32 @@
+#!/bin/bash -x
+OOBUILDDIR='/home/timar/libreoffice-3-3/build/libreoffice-3.3.2.1'
+MY_PATH=`pwd`
+. $OOBUILDDIR/LinuxX86Env.Set.sh
+SOURCE_ROOT_DIR='/home/timar/libreoffice-3-3/build/libreoffice-3.3.2.1'
+export SOURCE_ROOT_DIR
+test -n "$OO_TOOLSDIR" && solenv_dir=$SOLARENV || solenv_dir=$OOBUILDDIR/solenv
+if test -f $solenv_dir/inc/postset.mk ; then
+ # generate shell variable from completelangiso= from solenv/inc/postset.mk
+ # the sed command does the following:
+ # + if a line ends with a backslash, append the next line to it
+ # + adds " on the beginning of the value (after =)
+ # + adds " at the end of the value
+ # + removes en-US; we want to put it on the beginning
+ # + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
+ eval $(sed -e :a -e '/\\$/N; s/\\\n//; ta' -n -e 's/=/="/;s/\([^\\]\)$/\1"/;s/en-US//;/^completelangiso/p' $solenv_dir/inc/postset.mk)
+ for i in $completelangiso; do
+ localize -e -l en-US,$i -f $MY_PATH/$i-full.sdf
+ grep -v ^nlpsolver $i-full.sdf | grep ^helpcontent2 > $i-help.sdf
+ grep -v ^nlpsolver $i-full.sdf | grep -v ^helpcontent2 > $i-ui.sdf
+ rm $i-full.sdf
+ oo2po -l $i -i $i-help.sdf $i-help
+ oo2po -l $i -i $i-ui.sdf $i-ui
+ uipercent=`pocount $i-ui | grep -A2 "TOTAL:" | grep "translated" | sed -e "s/^.*[(]//" -e "s/[)].*$//"`
+ helppercent=`pocount $i-help | grep -A2 "TOTAL:" | grep "translated" | sed -e "s/^.*[(]//" -e "s/[)].*$//"`
+ echo "| $i" >> stat.txt
+ echo "| $uipercent" >> stat.txt
+ echo "| $helppercent" >> stat.txt
+ echo "|-" >> stat.txt
+ done
+fi
+
diff --git a/readmecheck.sh b/readmecheck.sh
new file mode 100755
index 0000000..bbfeeab
--- /dev/null
+++ b/readmecheck.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+READMETMP=$(mktemp);
+grep "^readlic" $@ | grep -v " en-US " | sed -e "s/</\\\</g" -e "s/>/\\\>/g" -e 's/"/\\\"/g' > $READMETMP;
+echo "**** $@ readme check ****";
+gsicheck -l "" $READMETMP | sed -e "s/\\\>/>/g" -e "s/\\\</</g" -e 's/\\\"/"/g';