[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] r25020: {website} updated wml2po.sh to handle the js-stuff in download.wml (website/trunk)
Author: runa
Date: 2011-09-04 22:05:35 +0000 (Sun, 04 Sep 2011)
New Revision: 25020
Modified:
website/trunk/wml2po.sh
Log:
updated wml2po.sh to handle the js-stuff in download.wml
Modified: website/trunk/wml2po.sh
===================================================================
--- website/trunk/wml2po.sh 2011-09-04 21:45:45 UTC (rev 25019)
+++ website/trunk/wml2po.sh 2011-09-04 22:05:35 UTC (rev 25020)
@@ -162,8 +162,14 @@
# and the correct copyright.
if [ $poexist = 0 ]
then
- # Convert it
- po4a-gettextize -f wml -m "$file" -p "$popath/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
+ # Do something special for download.wml and its js
+ if [ $wmlfile = "download.wml" ]
+ then
+ po4a-gettextize -f wml -m "$file" -p "$popath/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault" -o ontagerror="silent"
+ else
+ # Convert it
+ po4a-gettextize -f wml -m "$file" -p "$popath/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
+ fi
# Check to see if the file exists
if [ -e "$popath/$pofile" ]
@@ -193,7 +199,12 @@
# Update the file with po4a-updatepo to make the
# word wrapping perfect
- po4a-updatepo -f wml -m "$file" -p "$popath/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
+ if [ $wmlfile = "download.wml" ]
+ then
+ po4a-updatepo -f wml -m "$file" -p "$popath/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault" -o ontagerror="silent"
+ else
+ po4a-updatepo -f wml -m "$file" -p "$popath/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
+ fi
# Delete the backup
rm -f "$popath/$pofile~"
@@ -207,7 +218,12 @@
before=`grep -vE '^("POT-Creation-Date:|#)' "$popath/$pofile" | md5sum | cut -d " " -f1`
# Update the pot file
- po4a-updatepo -f wml -m "$file" -p "$popath/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
+ if [ $wmlfile = "download.wml" ]
+ then
+ po4a-updatepo -f wml -m "$file" -p "$popath/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault" -o ontagerror="silent"
+ else
+ po4a-updatepo -f wml -m "$file" -p "$popath/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
+ fi
# Calculate the new hash
after=`grep -vE '^("POT-Creation-Date:|#)' "$popath/$pofile" | md5sum | cut -d " " -f1`
@@ -234,7 +250,12 @@
if [ $poexist = 2 ]
then
# Update the file
- po4a-updatepo -f wml -m "$file" -p "$popath/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
+ if [ $wmlfile = "download.wml" ]
+ then
+ po4a-updatepo -f wml -m "$file" -p "$popath/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault" -o ontagerror="silent"
+ else
+ po4a-updatepo -f wml -m "$file" -p "$popath/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
+ fi
fi
# Write to the logfile
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits