... |
... |
@@ -101,8 +101,20 @@ for file in $po ; do
|
101 |
101 |
# The location of the english wml file
|
102 |
102 |
english="$wmldir/en/$wmlfile"
|
103 |
103 |
|
104 |
|
- # Convert everything but the english po files
|
105 |
|
- if [ $subdir != "en" ]
|
|
104 |
+ # If the current subdirectory is "zh_CN" use "zh-cn" instead
|
|
105 |
+ if [ $subdir = "zh_CN" ]
|
|
106 |
+ then
|
|
107 |
+ 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"
|
|
108 |
+
|
|
109 |
+ # Check to see if the file was written
|
|
110 |
+ if [ -e "$wmldir/zh-cn/tmp-$wmlfile" ]
|
|
111 |
+ then
|
|
112 |
+ mv "$wmldir/zh-cn/tmp-$wmlfile" "$wmldir/zh-cn/$wmlfile"
|
|
113 |
+ fi
|
|
114 |
+ fi
|
|
115 |
+
|
|
116 |
+ # Convert everything else
|
|
117 |
+ if ([ $subdir != "en" ] && [ $subdir != "zh_CN" ])
|
106 |
118 |
then
|
107 |
119 |
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"
|
108 |
120 |
|
... |
... |
@@ -116,8 +128,20 @@ for file in $po ; do
|
116 |
128 |
# The location of the english wml file
|
117 |
129 |
english="$wmldir/$subdir/en/$wmlfile"
|
118 |
130 |
|
119 |
|
- # Convert everything but the english po files
|
120 |
|
- if [ $lang != "en" ]
|
|
131 |
+ # If the current language is "zh_CN" use "zh-cn" instead
|
|
132 |
+ if [ $lang = "zh_CN" ]
|
|
133 |
+ then
|
|
134 |
+ 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"
|
|
135 |
+
|
|
136 |
+ # Check to see if the file was written
|
|
137 |
+ if [ -e "$wmldir/$subdir/zh-cn/tmp-$wmlfile" ]
|
|
138 |
+ then
|
|
139 |
+ mv "$wmldir/$subdir/zh-cn/tmp-$wmlfile" "$wmldir/$subdir/zh-cn/$wmlfile"
|
|
140 |
+ fi
|
|
141 |
+ fi
|
|
142 |
+
|
|
143 |
+ # Convert everything else
|
|
144 |
+ if ([ $lang != "en" ] && [ $lang != "zh_CN" ])
|
121 |
145 |
then
|
122 |
146 |
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"
|
123 |
147 |
|