fix download.wml when we convert from .po and make sure fa translations get the right wmi files
Runa A. Sandvik

Runa A. Sandvik commited on 2011-09-05 00:27:54
Zeige 1 geänderte Dateien mit 14 Einfügungen und 0 Löschungen.

... ...
@@ -259,7 +259,12 @@ for file in $po ; do
259 259
                 english="$wmldir/$subdir/en/$wmlfile"
260 260
 
261 261
 		# Convert the files
262
+		if [ $wmlfile = "download.wml" ]
263
+		then
264
+			po4a-translate -f wml -m "$english" -p "$file" -l "$wmldir/$subdir/$lang/$wmlfile" --master-charset utf-8 -L utf-8 -o customtag="$customtag" -o nodefault="$nodefault" -o ontagerror="silent"
265
+		else
262 266
 			po4a-translate -f wml -m "$english" -p "$file" -l "$wmldir/$subdir/$lang/$wmlfile" --master-charset utf-8 -L utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
267
+		fi
263 268
 
264 269
 		# Check to see if the file was written
265 270
 		if [ -e "$wmldir/$subdir/$lang/$wmlfile" ]
... ...
@@ -274,6 +279,15 @@ for file in $po ; do
274 279
 				sed -i "s/$translator_comment//" "$wmldir/$subdir/$lang/$wmlfile"
275 280
 			fi
276 281
 
282
+			# Fix download.wml
283
+                        if [ $wmlfile = "download.wml" ]
284
+			then
285
+				sed -i 's/<!--PO4ASHARPBEGINinclude <lang.wmi>/#include <lang.wmi>/g' "$wmldir/$subdir/$lang/$wmlfile"
286
+				sed -i 's/<!--PO4ASHARPBEGINinclude <foot.wmi>//g' "$wmldir/$subdir/$lang/$wmlfile"
287
+				sed -i 's/<!--PO4ASHARPBEGIN//g;s/PO4ASHARPEND-->//g' "$wmldir/$subdir/$lang/$wmlfile"
288
+				echo "#include <foot.wmi>" >> "$wmldir/$subdir/$lang/$wmlfile"
289
+			fi
290
+
277 291
 			# Include the English footer for most of the
278 292
 			# translations 
279 293
 			if [[ $lang != "ar" && $lang != "pl" && $lang != "de" && $lang != "fa" ]]
280 294