Browse code

make sure arabic translations use the right CSS

Runa A. Sandvik authored on17/03/2011 09:53:43
Showing1 changed files
... ...
@@ -114,6 +114,15 @@ for file in $po ; do
114 114
 				sed -i 's/<!--PO4ASHARPBEGIN/#/' "$wmldir/$subdir/$wmlfile"
115 115
 				sed -i 's/PO4ASHARPEND-->//' "$wmldir/$subdir/$wmlfile"
116 116
 			fi
117
+
118
+			# If the file is an Arabic translation, make
119
+			# sure it is using the right CSS
120
+			if [ $subdir = "ar" ]
121
+			then
122
+				orig_include=`grep '#include "head.wmi"' "$wmldir/$subdir/$wmlfile"`
123
+				new_include=`echo $orig_include 'STYLESHEET="css/master-rtl.css"'`
124
+				sed -i "s@$orig_include@$new_include@" "$wmldir/$subdir/$wmlfile"
125
+			fi
117 126
 		fi
118 127
 	}	
119 128
 
... ...
@@ -134,6 +143,15 @@ for file in $po ; do
134 143
 
135 144
 			# Include foot.wmi
136 145
 			echo "#include <foot.wmi>" >> "$wmldir/$subdir/$lang/$wmlfile"
146
+
147
+			# If the file is an Arabic translation, make
148
+			# sure it is using the right CSS
149
+			if [ $lang = "ar" ]
150
+			then
151
+				orig_include=`grep '#include "head.wmi"' "$wmldir/$subdir/$lang/$wmlfile"`
152
+				new_include=`echo $orig_include 'STYLESHEET="css/master-rtl.css"'`
153
+				sed -i "s@$orig_include@$new_include@" "$wmldir/$subdir/$lang/$wmlfile"
154
+			fi
137 155
 		fi
138 156
 	}
139 157