https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106352
Revision: 106352
Author: catrope
Date: 2011-12-15 18:43:56 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
1.18wmf1: MFT r106351
Modified Paths:
--------------
branches/wmf/1.18wmf1/extensions/LocalisationUpdate/LocalisationUpdate.class.php
Property Changed:
----------------
branches/wmf/1.18wmf1/extensions/LocalisationUpdate/
Property changes on: branches/wmf/1.18wmf1/extensions/LocalisationUpdate
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/extensions/LocalisationUpdate:92477-106189,106192,106194,106199
/trunk/phase3/extensions/LocalisationUpdate:55198
+
/trunk/extensions/LocalisationUpdate:92477-106189,106192,106194,106199,106351
/trunk/phase3/extensions/LocalisationUpdate:55198
Modified:
branches/wmf/1.18wmf1/extensions/LocalisationUpdate/LocalisationUpdate.class.php
===================================================================
---
branches/wmf/1.18wmf1/extensions/LocalisationUpdate/LocalisationUpdate.class.php
2011-12-15 18:36:42 UTC (rev 106351)
+++
branches/wmf/1.18wmf1/extensions/LocalisationUpdate/LocalisationUpdate.class.php
2011-12-15 18:43:56 UTC (rev 106352)
@@ -478,7 +478,9 @@
return 0;
}
- $new_messages = array();
+ // This function is run once for core and once for each
extension,
+ // so make sure messages from previous runs aren't lost
+ $new_messages = self::readFile( $langcode );
//foreach ( $changedStrings as $key => $value ) {
// HACK for r103763 CR: store all messages, even unchanged ones
@@ -503,6 +505,10 @@
// Use that previous translation rather than
falling back to the .i18n.php file
$new_messages[$key] = $compare_messages[$key];
}
+ // Other possible cases:
+ // * The messages is no longer in the SVN file, but is
present in the local i18n file or in the cache
+ // * The message was changed in English, and there is
no previous translation in the i18n file or in the cache
+ // In both cases, we can safely do nothing
}
self::writeFile( $langcode, $new_messages );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs