r110475 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110474‎ | r110475 | r110476 >
Date:12:32, 1 February 2012
Author:nikerabbit
Status:ok
Tags:
Comment:
Bug 34113: handle presentation in CSS as it should be
Modified paths:
  • /trunk/extensions/Translate/resources/ext.translate.css (modified) (history)
  • /trunk/extensions/Translate/tag/PageTranslationHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/tag/PageTranslationHooks.php
@@ -240,10 +240,12 @@
241241 $_title = Title::makeTitle( $title->getNamespace(), $title->getDBkey() . $suffix );
242242
243243 if ( $parser->getTitle()->getText() === $_title->getText() ) {
244 - $languages[] = Html::rawElement( 'b', null, "*$name* $percent" );
245 - } elseif ( $code === $userLangCode ) {
246 - $languages[] = $linker->linkKnown( $_title, Html::rawElement( 'b', null, "$name $percent" ) );
 244+ $name = Html::rawElement( 'span', array( 'class' => 'mw-pt-languages-selected' ), $name );
 245+ $languages[] = "$name $percent";
247246 } else {
 247+ if ( $code === $userLangCode ) {
 248+ $name = Html::rawElement( 'span', array( 'class' => 'mw-pt-languages-ui' ), $name );
 249+ }
248250 $languages[] = $linker->linkKnown( $_title, "$name $percent" );
249251 }
250252 }
Index: trunk/extensions/Translate/resources/ext.translate.css
@@ -32,3 +32,12 @@
3333 font-size: x-small;
3434 text-align: center;
3535 }
 36+
 37+/* The *stars* should be replaceable with bunnies */
 38+.mw-pt-languages-selected:before, .mw-pt-languages-selected:after {
 39+ content: '*';
 40+}
 41+
 42+.mw-pt-languages-selected, .mw-pt-languages-ui {
 43+ font-weight: bold;
 44+}

Follow-up revisions

RevisionCommit summaryAuthorDate
r110738MFT 1.18wmf1 r110309 r110364 r110408 r110471 r110475nikerabbit11:00, 6 February 2012

Status & tagging log