r106351 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106350‎ | r106351 | r106352 >
Date:18:36, 15 December 2011
Author:catrope
Status:ok
Tags:
Comment:
Followup r103763: including the messages from previous runs is actually really quite important, otherwise each extension overwrites the previous extension's messages
Modified paths:
  • /trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php
@@ -478,7 +478,9 @@
479479 return 0;
480480 }
481481
482 - $new_messages = array();
 482+ // This function is run once for core and once for each extension,
 483+ // so make sure messages from previous runs aren't lost
 484+ $new_messages = self::readFile( $langcode );
483485
484486 //foreach ( $changedStrings as $key => $value ) {
485487 // HACK for r103763 CR: store all messages, even unchanged ones
@@ -503,6 +505,10 @@
504506 // Use that previous translation rather than falling back to the .i18n.php file
505507 $new_messages[$key] = $compare_messages[$key];
506508 }
 509+ // Other possible cases:
 510+ // * The messages is no longer in the SVN file, but is present in the local i18n file or in the cache
 511+ // * The message was changed in English, and there is no previous translation in the i18n file or in the cache
 512+ // In both cases, we can safely do nothing
507513 }
508514 self::writeFile( $langcode, $new_messages );
509515

Follow-up revisions

RevisionCommit summaryAuthorDate
r1063521.18wmf1: MFT r106351catrope18:43, 15 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103763(bug 31982) Handle fallback languages in LocalisationUpdate. Modified patch b...catrope15:25, 20 November 2011

Status & tagging log