r60865 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60864‎ | r60865 | r60866 >
Date:18:14, 9 January 2010
Author:siebrand
Status:deferred
Tags:
Comment:
(bug 21827) Make DoubleWiki output appropriate lang attributes for languages. Patch by Bawolff.
Modified paths:
  • /trunk/extensions/DoubleWiki/DoubleWiki.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DoubleWiki/DoubleWiki.php
@@ -92,7 +92,7 @@
9393
9494 #do the job
9595 $text = matchColumns ( $text, $myLanguage, $myURL ,
96 - $translation, $languageName, $url );
 96+ $translation, $languageName, $url, $wgContLanguageCode, $match_request );
9797 }
9898 return true;
9999 }
@@ -106,7 +106,7 @@
107107 * Text is split into slices based on title tags
108108 */
109109
110 -function matchColumns( $left_text, $left_title, $left_url, $right_text, $right_title, $right_url ){
 110+function matchColumns( $left_text, $left_title, $left_url, $right_text, $right_title, $right_url, $left_lang_code, $right_lang_code ){
111111
112112 # note about emdedding:
113113 # text is split only at a single level.
@@ -251,12 +251,12 @@
252252 if( ( ($left_nesting == $left_splitlevel)
253253 && ($right_nesting == $right_splitlevel) ) || $the_end) {
254254 $body .=
255 - "<tr><td valign=\"top\" style=\"padding-right: 0.5em\">"
 255+ "<tr><td valign=\"top\" style=\"padding-right: 0.5em\" lang=\"{$left_lang_code}\">"
256256 ."<div style=\"width:35em; margin:0px auto\">\n"
257257 .$left_prefix.$left_bits[$l].$left_suffix
258258 ."</div>"
259259
260 - ."</td>\n<td valign=\"top\" style=\"padding-left: 0.5em\">"
 260+ ."</td>\n<td valign=\"top\" style=\"padding-left: 0.5em\" lang=\"{$right_lang_code}\">"
261261 ."<div style=\"width:35em; margin:0px auto\">\n"
262262 .$right_prefix.$right_bits[$l].$right_suffix
263263 ."</div>"
@@ -286,9 +286,9 @@
287287 $head =
288288 "<table width=\"100%\" border=\"0\" bgcolor=\"white\" rules=\"cols\" cellpadding=\"0\">
289289 <colgroup><col width=\"50%\"/><col width=\"50%\"/></colgroup><thead>
290 -<tr><td bgcolor=\"#cfcfff\" align=\"center\">
 290+<tr><td bgcolor=\"#cfcfff\" align=\"center\" lang=\"{$left_lang_code}\">
291291 <a href=\"{$left_url}\">{$left_title}</a></td>
292 -<td bgcolor=\"#cfcfff\" align=\"center\">
 292+<td bgcolor=\"#cfcfff\" align=\"center\" lang=\"{$right_lang_code}\">
293293 <a href=\"{$right_url}\" class='extiw'>{$right_title}</a>
294294 </td></tr></thead>\n";
295295 return $head.$body."</table>" ;

Status & tagging log