Author: runa Date: 2011-03-17 08:53:43 +0000 (Thu, 17 Mar 2011) New Revision: 24365
Modified: website/trunk/po2wml.sh Log: make sure arabic translations use the right CSS
Modified: website/trunk/po2wml.sh =================================================================== --- website/trunk/po2wml.sh 2011-03-16 21:33:49 UTC (rev 24364) +++ website/trunk/po2wml.sh 2011-03-17 08:53:43 UTC (rev 24365) @@ -114,6 +114,15 @@ sed -i 's/<!--PO4ASHARPBEGIN/#/' "$wmldir/$subdir/$wmlfile" sed -i 's/PO4ASHARPEND-->//' "$wmldir/$subdir/$wmlfile" fi + + # If the file is an Arabic translation, make + # sure it is using the right CSS + if [ $subdir = "ar" ] + then + orig_include=`grep '#include "head.wmi"' "$wmldir/$subdir/$wmlfile"` + new_include=`echo $orig_include 'STYLESHEET="css/master-rtl.css"'` + sed -i "s@$orig_include@$new_include@" "$wmldir/$subdir/$wmlfile" + fi fi }
@@ -134,6 +143,15 @@
# Include foot.wmi echo "#include <foot.wmi>" >> "$wmldir/$subdir/$lang/$wmlfile" + + # If the file is an Arabic translation, make + # sure it is using the right CSS + if [ $lang = "ar" ] + then + orig_include=`grep '#include "head.wmi"' "$wmldir/$subdir/$lang/$wmlfile"` + new_include=`echo $orig_include 'STYLESHEET="css/master-rtl.css"'` + sed -i "s@$orig_include@$new_include@" "$wmldir/$subdir/$lang/$wmlfile" + fi fi }