https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106351
Revision: 106351
Author: catrope
Date: 2011-12-15 18:36:42 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
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: trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php
===================================================================
--- trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php
2011-12-15 18:29:47 UTC (rev 106350)
+++ trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php
2011-12-15 18:36:42 UTC (rev 106351)
@@ -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