aboutsummaryrefslogtreecommitdiffstats
path: root/fix-mo
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2003-02-14 08:08:42 +0000
committerFrederic Lepied <flepied@mandriva.com>2003-02-14 08:08:42 +0000
commit73f922fd00a5a26fb0a94da2edd823237020138d (patch)
tree663183608b77095d2d0724906cb65ef0f2f29bdd /fix-mo
parent1dbf65de02a0166c379340c85daa509e806472d7 (diff)
downloadspec-helper-73f922fd00a5a26fb0a94da2edd823237020138d.tar
spec-helper-73f922fd00a5a26fb0a94da2edd823237020138d.tar.gz
spec-helper-73f922fd00a5a26fb0a94da2edd823237020138d.tar.bz2
spec-helper-73f922fd00a5a26fb0a94da2edd823237020138d.tar.xz
spec-helper-73f922fd00a5a26fb0a94da2edd823237020138d.zip
first version
Diffstat (limited to 'fix-mo')
-rwxr-xr-xfix-mo39
1 files changed, 39 insertions, 0 deletions
diff --git a/fix-mo b/fix-mo
new file mode 100755
index 0000000..304c4f2
--- /dev/null
+++ b/fix-mo
@@ -0,0 +1,39 @@
+#!/bin/sh
+#---------------------------------------------------------------
+# Project : Mandrake Linux
+# Module : spec-helper
+# File : fix-mo
+# Version : $Id$
+# Author : Pablo Saratxaga
+# Created On : Fri Feb 14 08:27:47 2003
+# Purpose : Fix bad translations
+#---------------------------------------------------------------
+
+# HP people wants to have 'Gnome' in ascii;
+# so "±×³ð" is converted to 'GNOME'
+
+KO_MESSAGES=$RPM_BUILD_ROOT/usr/share/locale/ko/LC_MESSAGES
+
+TMP=$KO_MESSAGES/tmpfile
+TMP2=$KO_MESSAGES/tmpfile2
+
+ret=0
+
+for i in $KO_MESSAGES/*.mo ; do
+ msgunfmt -o $TMP $i
+ if grep -qi '^"Content-Type: text/plain; charset=euc-kr.n"$' $TMP; then
+ sed 's:±×³ð:GNOME:g' < $TMP > $TMP2 && msgfmt -o $i $TMP2
+ ret=$?
+ elif grep -qi '^"Content-Type: text/plain; charset=utf-8.n"$' $TMP; then
+ sed 's:그놈:GNOME:g' < $TMP > $TMP2 && msgfmt -o $i $TMP2
+ ret=$?
+ else
+ echo "Unsupported encoding" 1>&2
+ fi
+done
+
+rm -f $TMP $TMP2
+
+exit $ret
+
+# fix-mo ends here