summaryrefslogtreecommitdiff
path: root/extensions/LocalisationUpdate/LocalisationUpdate.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/LocalisationUpdate/LocalisationUpdate.class.php')
-rw-r--r--extensions/LocalisationUpdate/LocalisationUpdate.class.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/extensions/LocalisationUpdate/LocalisationUpdate.class.php b/extensions/LocalisationUpdate/LocalisationUpdate.class.php
index 39368b7c..66b63232 100644
--- a/extensions/LocalisationUpdate/LocalisationUpdate.class.php
+++ b/extensions/LocalisationUpdate/LocalisationUpdate.class.php
@@ -144,8 +144,8 @@ class LocalisationUpdate {
// Create a full path.
$svnfile = str_replace(
- array( '$1', '$2' ),
- array( $ext, $extFile ),
+ array( '$1', '$2', '$3', '$4' ),
+ array( $ext, $extFile, urlencode( $ext ), urlencode( $extFile ) ),
$extUrl
);
@@ -165,7 +165,11 @@ class LocalisationUpdate {
public static function updateMediawikiMessages( $verbose, $coreUrl ) {
// Find the changed English strings (as these messages won't be updated in ANY language).
$localUrl = Language::getMessagesFileName( 'en' );
- $repoUrl = str_replace( '$2', 'languages/messages/MessagesEn.php', $coreUrl );
+ $repoUrl = str_replace(
+ array( '$2', '$4' ),
+ array( 'languages/messages/MessagesEn.php', 'languages%2Fmessages%2FMessagesEn.php' ),
+ $coreUrl
+ );
$changedEnglishStrings = self::compareFiles( $repoUrl, $localUrl, $verbose );
// Count the changes.
@@ -176,7 +180,11 @@ class LocalisationUpdate {
$localUrl = Language::getMessagesFileName( $code );
// Not prefixed with $IP
$filename = Language::getFilename( 'languages/messages/Messages', $code );
- $repoUrl = str_replace( '$2', $filename, $coreUrl );
+ $repoUrl = str_replace(
+ array( '$2', '$4' ),
+ array( $filename, urlencode( $filename ) ),
+ $coreUrl
+ );
// Compare the files.
$changedCount += self::compareFiles( $repoUrl, $localUrl, $verbose, $changedEnglishStrings, false, true );