summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanthosh Thottingal <santhosh.thottingal@gmail.com>2008-12-12 20:48:27 +0530
committerSanthosh Thottingal <santhosh.thottingal@gmail.com>2008-12-12 20:48:27 +0530
commita43af19146971dd1c641c8238cf689f09ae6b4b4 (patch)
tree805fefd1d0d47754e873874e322d3798386beca8
parentc3f368c60aabdc380c77608c614d91b0a628590a (diff)
downloadRachana.git-a43af19146971dd1c641c8238cf689f09ae6b4b4.tar.gz
Rachana.git-a43af19146971dd1c641c8238cf689f09ae6b4b4.tar.xz
Rachana.git-a43af19146971dd1c641c8238cf689f09ae6b4b4.zip
Adding Localization quality analyser
-rw-r--r--l10n-qa/ml-error-patterns.txt13
-rwxr-xr-xl10n-qa/smc-l10n-qa.sh47
2 files changed, 60 insertions, 0 deletions
diff --git a/l10n-qa/ml-error-patterns.txt b/l10n-qa/ml-error-patterns.txt
new file mode 100644
index 0000000..dce6d30
--- /dev/null
+++ b/l10n-qa/ml-error-patterns.txt
@@ -0,0 +1,13 @@
+ന്‍റ
+്റ
+ന്പ
+ററ
+ല്ല്യ
+ആണ്‍
+ന്യ‌‌ം
+സോഫ്റ്റ്വെയര്‍
+ഹാര്‍ഡ്വെയര്‍
+നെറ്റ്വര്‍ക്ക്
+കതില്‍
+റ്‍
+$ENDOFSMCL10NQA
diff --git a/l10n-qa/smc-l10n-qa.sh b/l10n-qa/smc-l10n-qa.sh
new file mode 100755
index 0000000..4f6511a
--- /dev/null
+++ b/l10n-qa/smc-l10n-qa.sh
@@ -0,0 +1,47 @@
+
+### Main script stars here ###
+# Store file name
+FILE=""
+ERRORPATTERNS=""
+# Make sure we get file name as command line argument
+# Else read it from standard input device
+if [ "$2" == "" ]; then
+ FILE="/dev/stdin"
+else
+ FILE="$2"
+ # make sure file exist and readable
+ if [ ! -f $FILE ]; then
+ echo "$FILE : does not exists"
+ exit 1
+ elif [ ! -r $FILE ]; then
+ echo "$FILE: can not read"
+ exit 2
+ fi
+fi
+# Make sure we get file name as command line argument
+# Else read it from standard input device
+
+if [ "$1" == "" ]; then
+ echo "Usage: smc-l10n-qa.sh errorpattern-file pofile"
+ exit 1
+else
+ ERRORPATTERNS="$1"
+ # make sure file exist and readable
+ if [ ! -f $ERRORPATTERNS ]; then
+ echo "$ERRORPATTERNS : does not exists"
+ exit 1
+ elif [ ! -r $ERRORPATTERNS ]; then
+ echo "$ERRORPATTERNS: can not read"
+ exit 2
+ fi
+fi
+
+while read line
+do
+ grep --color -nTwrC3 "$line" $FILE # 2> /dev/null
+done <$ERRORPATTERNS
+echo "Done"
+echo "Now trying to compile...."
+msgfmt -c --statistics $FILE
+echo "Done"
+