r110309 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110308‎ | r110309 | r110310 >
Date:17:45, 30 January 2012
Author:nikerabbit
Status:ok
Tags:
Comment:
A bit ugly fix to allow Special:Translate/page-Foo_bar syntax for translatable pages with spaces.
Modified paths:
  • /trunk/extensions/Translate/MessageGroups.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/MessageGroups.php
@@ -1182,6 +1182,11 @@
11831183 public static function getGroup( $id ) {
11841184 // BC with page| which is now page-
11851185 $id = strtr( $id, '|', '-' );
 1186+ /* Translatable pages use spaces, but MW occasionally likes to
 1187+ * normalize spaces to underscores */
 1188+ if ( strpos( $id, 'page-' ) === 0 ) {
 1189+ $id = strtr( $id, '_', ' ' );
 1190+ }
11861191 self::init();
11871192
11881193 global $wgTranslateEC, $wgTranslateAC, $wgTranslateCC;

Follow-up revisions

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

Status & tagging log