Author: runa Date: 2011-08-30 08:43:39 +0000 (Tue, 30 Aug 2011) New Revision: 24995
Modified: website/trunk/po2wml.sh Log: update script to include various .wmi files for fa translations
Modified: website/trunk/po2wml.sh =================================================================== --- website/trunk/po2wml.sh 2011-08-30 08:30:18 UTC (rev 24994) +++ website/trunk/po2wml.sh 2011-08-30 08:43:39 UTC (rev 24995) @@ -389,6 +389,36 @@ echo '#include "ar/foot.wmi"' >> "$wmldir/$subdir/$lang/$wmlfile" fi
+ # If the file is a Farsi translation, include the + # correct header, css, menu files and footer + if [ $lang = "fa" ] + then + # Head + orig_head=`grep '#include "head.wmi"' "$wmldir/$subdir/$lang/$wmlfile"` + temp_head=`echo $orig_head | sed s@head.wmi@fa/head.wmi@` + new_head=`echo $temp_head 'STYLESHEET="css/master-rtl.css"'` + sed -i "s@$orig_head@$new_head@" "$wmldir/$subdir/$lang/$wmlfile" + + # Side (not all files include this) + orig_side=`grep '#include "side.wmi"' "$wmldir/$subdir/$lang/$wmlfile"` + if [ -n "$orig_side" ] + then + new_side=`echo '#include "fa/side.wmi"'` + sed -i "s@$orig_side@$new_side@" "$wmldir/$subdir/$lang/$wmlfile" + fi + + # Info (not all files include this) + orig_info=`grep '#include "info.wmi"' "$wmldir/$subdir/$lang/$wmlfile"` + if [ -n "$orig_info" ] + then + new_info=`echo '#include "fa/info.wmi"'` + sed -i "s@$orig_info@$new_info@" "$wmldir/$subdir/$lang/$wmlfile" + fi + + # Footer + echo '#include "fa/foot.wmi"' >> "$wmldir/$subdir/$lang/$wmlfile" + fi + # If the directory does not include sidenav.wmi, # copy it from the English directory (only if # the English directory has this file)