[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r21188: {website} if the directory is zh_CN we need to use zh-cn instead (website/trunk)
Author: runa
Date: 2009-12-13 14:49:01 -0500 (Sun, 13 Dec 2009)
New Revision: 21188
Modified:
website/trunk/po2wml.sh
Log:
if the directory is zh_CN we need to use zh-cn instead
Modified: website/trunk/po2wml.sh
===================================================================
--- website/trunk/po2wml.sh 2009-12-13 17:00:53 UTC (rev 21187)
+++ website/trunk/po2wml.sh 2009-12-13 19:49:01 UTC (rev 21188)
@@ -101,9 +101,21 @@
# The location of the english wml file
english="$wmldir/en/$wmlfile"
- # Convert everything but the english po files
- if [ $subdir != "en" ]
+ # If the current subdirectory is "zh_CN" use "zh-cn" instead
+ if [ $subdir = "zh_CN" ]
then
+ po4a-translate -f wml -m "$english" -p "$file" -l "$wmldir/zh-cn/tmp-$wmlfile" --master-charset utf-8 -L utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
+
+ # Check to see if the file was written
+ if [ -e "$wmldir/zh-cn/tmp-$wmlfile" ]
+ then
+ mv "$wmldir/zh-cn/tmp-$wmlfile" "$wmldir/zh-cn/$wmlfile"
+ fi
+ fi
+
+ # Convert everything else
+ if ([ $subdir != "en" ] && [ $subdir != "zh_CN" ])
+ then
po4a-translate -f wml -m "$english" -p "$file" -l "$wmldir/$subdir/tmp-$wmlfile" --master-charset utf-8 -L utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
# Check to see if the file was written
@@ -116,9 +128,21 @@
# The location of the english wml file
english="$wmldir/$subdir/en/$wmlfile"
- # Convert everything but the english po files
- if [ $lang != "en" ]
+ # If the current language is "zh_CN" use "zh-cn" instead
+ if [ $lang = "zh_CN" ]
then
+ po4a-translate -f wml -m "$english" -p "$file" -l "$wmldir/$subdir/zh-cn/tmp-$wmlfile" --master-charset utf-8 -L utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
+
+ # Check to see if the file was written
+ if [ -e "$wmldir/$subdir/zh-cn/tmp-$wmlfile" ]
+ then
+ mv "$wmldir/$subdir/zh-cn/tmp-$wmlfile" "$wmldir/$subdir/zh-cn/$wmlfile"
+ fi
+ fi
+
+ # Convert everything else
+ if ([ $lang != "en" ] && [ $lang != "zh_CN" ])
+ then
po4a-translate -f wml -m "$english" -p "$file" -l "$wmldir/$subdir/$lang/tmp-$wmlfile" --master-charset utf-8 -L utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
# Check to see if the file was written