[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r20125: {translation} now with copyright holder and custom tags (translation/trunk/tools/gsoc09)



Author: runa
Date: 2009-07-24 05:10:59 -0400 (Fri, 24 Jul 2009)
New Revision: 20125

Modified:
   translation/trunk/tools/gsoc09/wml2po.sh
Log:
now with copyright holder and custom tags

Modified: translation/trunk/tools/gsoc09/wml2po.sh
===================================================================
--- translation/trunk/tools/gsoc09/wml2po.sh	2009-07-24 08:45:03 UTC (rev 20124)
+++ translation/trunk/tools/gsoc09/wml2po.sh	2009-07-24 09:10:59 UTC (rev 20125)
@@ -22,6 +22,19 @@
 # directories in /var/lib/pootle/pootle
 lang=`ls "/var/lib/pootle/pootle" | grep -v ^templates$`
 
+# Set the copyright holder of the po files,
+# for example "The Tor Project, Inc"
+copyright=""
+
+# A lot of the wml files have custom tags. We need to specify every
+# single tag. This is done in the file customtags.txt
+customtag=`cat customtags.txt`
+
+# We also need to use the nodefault option of po4a; space separated list
+# of tags that the module should not try to set by default in any
+# category. For now, we only need the input tag.
+nodefault='<input>'
+
 ### end config ###
 
 # Create a lockfile to make sure that only one instance of the script
@@ -77,7 +90,7 @@
 		if [ $poexist = 0 ]
 		then
 			# Convert it
-			po4a-gettextize -f wml -m "$file" -p "$popath/$dir/$pofile" --master-charset utf-8
+			po4a-gettextize -f wml -m "$file" -p "$popath/$dir/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault" --copyright-holder "$copyright"
 
 			# Check to see if the file exists
 			if [ -e "$popath/$dir/$pofile" ]
@@ -99,7 +112,7 @@
 			before=`grep -vE '^("POT-Creation-Date:|#)' "$popath/$dir/$pofile" | md5sum | cut -d " " -f1`
 
 			# Update the po file
-			po4a-updatepo -f wml -m "$file" -p "$popath/$dir/$pofile" --master-charset utf-8
+			po4a-updatepo -f wml -m "$file" -p "$popath/$dir/$pofile" --master-charset utf-8 -o customtag="$customtag" -o nodefault="$nodefault"
 
 			# Calculate the new hash
 			after=`grep -vE '^("POT-Creation-Date:|#)' "$popath/$dir/$pofile" | md5sum | cut -d " "	-f1`