quick fix for nb and sv
Runa A. Sandvik

Runa A. Sandvik commited on 2009-12-22 12:08:55
Zeige 1 geänderte Dateien mit 50 Einfügungen und 2 Löschungen.

... ...
@@ -113,8 +113,32 @@ for file in $po ; do
113 113
 			fi
114 114
 		fi
115 115
 		
116
+		# If the current directory is "nb" use "no" instead
117
+		if [ $subdir = "nb" ]
118
+		then
119
+			po4a-translate -f wml -m "$english" -p "$file" -l "$wmldir/no/tmp-$wmlfile" --master-charset utf-8 -L utf-8 -o customtag="$customtag" -o nodefault="$nodefault"	
120
+
121
+			# Check to see if the file was written
122
+			if [ -e "$wmldir/no/tmp-$wmlfile" ]
123
+			then
124
+				mv "$wmldir/no/tmp-$wmlfile" "$wmldir/no/$wmlfile"
125
+			fi
126
+		fi
127
+
128
+		# If the current directory is "sv" use "se" instead
129
+		if [ $subdir = "sv" ]
130
+		then
131
+			po4a-translate -f wml -m "$english" -p "$file" -l "$wmldir/se/tmp-$wmlfile" --master-charset utf-8 -L utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
132
+
133
+			# Check to see if the file was written
134
+			if [ -e "$wmldir/se/tmp-$wmlfile" ]
135
+			then
136
+				mv "$wmldir/se/tmp-$wmlfile" "$wmldir/se/$wmlfile"
137
+			fi
138
+		fi
139
+
116 140
 		# Convert everything else
117
-		if ([ $subdir != "en" ] && [ $subdir != "zh_CN" ])
141
+		if [[ $subdir != "en" && $subdir != "zh_CN" && $subdir != "nb" && $subdir != "sv" ]]
118 142
 		then
119 143
 			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"
120 144
 
... ...
@@ -140,8 +164,32 @@ for file in $po ; do
140 164
 			fi
141 165
 		fi
142 166
 
167
+		# If the current language is "nb" use "no" instead
168
+		if [ $lang = "nb" ]
169
+		then
170
+			po4a-translate -f wml -m "$english" -p "$file" -l "$wmldir/$subdir/no/tmp-$wmlfile" --master-charset utf-8 -L utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
171
+
172
+			# Check to see if the file was written
173
+			if [ -e "$wmldir/$subdir/no/tmp-$wmlfile" ]
174
+			then
175
+				mv "$wmldir/$subdir/no/tmp-$wmlfile" "$wmldir/$subdir/no/$wmlfile"
176
+			fi
177
+		fi
178
+
179
+		# If the current language is "sv" use "se" instead
180
+		if [ $lang = "sv" ]
181
+		then
182
+			po4a-translate -f wml -m "$english" -p "$file" -l "$wmldir/$subdir/se/tmp-$wmlfile" --master-charset utf-8 -L utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
183
+
184
+			# Check to see if the file was written
185
+			if [ -e "$wmldir/$subdir/se/tmp-$wmlfile" ]
186
+			then
187
+				mv "$wmldir/$subdir/se/tmp-$wmlfile" "$wmldir/$subdir/se/$wmlfile"
188
+			fi
189
+		fi
190
+		
143 191
 		# Convert everything else
144
-		if ([ $lang != "en" ] && [ $lang != "zh_CN" ])
192
+		if [[ $lang != "en" && $lang != "zh_CN" && $lang != "nb" && $lang != "sv" ]]
145 193
 		then
146 194
 			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"
147 195
 
148 196