[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] r25021: {website} fix download.wml when we convert from .po and make sure fa t (website/trunk)
Author: runa
Date: 2011-09-04 22:27:54 +0000 (Sun, 04 Sep 2011)
New Revision: 25021
Modified:
website/trunk/po2wml.sh
Log:
fix download.wml when we convert from .po and make sure fa translations get the right wmi files
Modified: website/trunk/po2wml.sh
===================================================================
--- website/trunk/po2wml.sh 2011-09-04 22:05:35 UTC (rev 25020)
+++ website/trunk/po2wml.sh 2011-09-04 22:27:54 UTC (rev 25021)
@@ -259,7 +259,12 @@
english="$wmldir/$subdir/en/$wmlfile"
# Convert the files
- 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"
+ if [ $wmlfile = "download.wml" ]
+ then
+ 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"
+ else
+ 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"
+ fi
# Check to see if the file was written
if [ -e "$wmldir/$subdir/$lang/$wmlfile" ]
@@ -274,6 +279,15 @@
sed -i "s/$translator_comment//" "$wmldir/$subdir/$lang/$wmlfile"
fi
+ # Fix download.wml
+ if [ $wmlfile = "download.wml" ]
+ then
+ sed -i 's/<!--PO4ASHARPBEGINinclude <lang.wmi>/#include <lang.wmi>/g' "$wmldir/$subdir/$lang/$wmlfile"
+ sed -i 's/<!--PO4ASHARPBEGINinclude <foot.wmi>//g' "$wmldir/$subdir/$lang/$wmlfile"
+ sed -i 's/<!--PO4ASHARPBEGIN//g;s/PO4ASHARPEND-->//g' "$wmldir/$subdir/$lang/$wmlfile"
+ echo "#include <foot.wmi>" >> "$wmldir/$subdir/$lang/$wmlfile"
+ fi
+
# Include the English footer for most of the
# translations
if [[ $lang != "ar" && $lang != "pl" && $lang != "de" && $lang != "fa" ]]
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits