Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | |
14 | 14 | $wgExtensionCredits['specialpage'][] = array( |
15 | 15 | 'name' => 'Translate', |
16 | | - 'version' => '4.0-rc3', |
| 16 | + 'version' => '4.0-rc4', |
17 | 17 | 'author' => 'Niklas Laxström', |
18 | 18 | 'description' => 'Special page for translating Mediawiki and beyond' |
19 | 19 | ); |
Index: trunk/extensions/Translate/TranslateUtils.php |
— | — | @@ -6,12 +6,7 @@ |
7 | 7 | const MSG = "translate-"; |
8 | 8 | |
9 | 9 | public static function databaseLanguageSuffix( $language ) { |
10 | | - global $wgContLang; |
11 | | - if ( $wgContLang->getCode() !== $language ) { |
12 | | - return '/' . $language; |
13 | | - } else { |
14 | | - return ''; |
15 | | - } |
| 10 | + return '/' . $language; |
16 | 11 | } |
17 | 12 | |
18 | 13 | public static function title( $key, $language ) { |
— | — | @@ -46,7 +41,6 @@ |
47 | 42 | $messages[$key]['optional'] = false; |
48 | 43 | $messages[$key]['ignored'] = false; |
49 | 44 | $messages[$key]['changed'] = false; |
50 | | - $messages[$key]['defined'] = false; |
51 | 45 | $messages[$key]['pageexists'] = false; |
52 | 46 | $messages[$key]['talkexists'] = false; |
53 | 47 | } |
— | — | @@ -180,7 +174,7 @@ |
181 | 175 | return $tableheader; |
182 | 176 | } |
183 | 177 | |
184 | | - public static function makeListing( $messages, $language ) { |
| 178 | + public static function makeListing( $messages, $language, $group ) { |
185 | 179 | global $wgUser; |
186 | 180 | $sk = $wgUser->getSkin(); |
187 | 181 | wfLoadExtensionMessages( 'Translate' ); |
— | — | @@ -218,8 +212,6 @@ |
219 | 213 | |
220 | 214 | $page['edit'] = $uimsg['edit']; |
221 | 215 | if ( $wgUser->isAllowed( 'translate' ) ) { |
222 | | - // UGLY HACK |
223 | | - $group = $GLOBALS['wgRequest']->getText('group', ''); |
224 | 216 | $page['edit'] = $sk->makeKnownLinkObj( $page['object'], $uimsg['edit'], "action=edit&loadgroup=$group" ); |
225 | 217 | } |
226 | 218 | $page['history'] = $sk->makeKnownLinkObj( $page['object'], $uimsg['history'], 'action=history' ); |
Index: trunk/extensions/Translate/TranslateTasks.php |
— | — | @@ -132,7 +132,7 @@ |
133 | 133 | |
134 | 134 | return |
135 | 135 | $tableheader . |
136 | | - TranslateUtils::makeListing( $this->messages, $this->options->getLanguage() ) . |
| 136 | + TranslateUtils::makeListing( $this->messages, $this->options->getLanguage(), $this->messageGroup->getId() ) . |
137 | 137 | $tablefooter; |
138 | 138 | } |
139 | 139 | |
— | — | @@ -212,7 +212,7 @@ |
213 | 213 | protected function filterUnchanged() { |
214 | 214 | foreach ( $this->messages as $key => $o ) { |
215 | 215 | $translation = $o['database'] ? $o['database'] : $o['infile']; |
216 | | - if ( $o['pageexists'] && $translation != $o['definition'] ) { |
| 216 | + if ( $o['pageexists'] || ( $translation !== null && $translation != $o['definition'] ) ) { |
217 | 217 | $this->messages[$key]['changed'] = true; |
218 | 218 | } else { |
219 | 219 | unset( $this->messages[$key] ); |
Index: trunk/extensions/Translate/MessageGroups.php |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | } |
58 | 58 | } |
59 | 59 | if ( $translation === $fallback ) { |
60 | | - if ( $m['defined'] ) { |
| 60 | + if ( $m['pageexists'] ) { |
61 | 61 | $comment = "#identical but defined"; |
62 | 62 | return true; |
63 | 63 | } else { |
— | — | @@ -231,6 +231,7 @@ |
232 | 232 | $this->exportStart ) . "\n"; |
233 | 233 | |
234 | 234 | foreach ($this->msgArray['en'] as $key => $msg) { |
| 235 | + if ( !isset( $array[$key] ) ) { continue; } |
235 | 236 | $line = $this->exportLine($key, $array[$key], $this->exportPad); |
236 | 237 | if ( $line !== null ) { |
237 | 238 | $txt .= $this->exportLineP . $line; |
— | — | @@ -485,7 +486,7 @@ |
486 | 487 | protected $messageFile = 'CategoryTree/CategoryTree.i18n.php'; |
487 | 488 | protected $filePattern = 'CategoryTree/CategoryTree.i18n.$CODE.php'; |
488 | 489 | |
489 | | - protected $exportStart = '$messages[\'$CODE\'] = array('; |
| 490 | + protected $exportStart = '$messages = array('; |
490 | 491 | protected $exportEnd = '),'; |
491 | 492 | |
492 | 493 | } |
— | — | @@ -552,7 +553,7 @@ |
553 | 554 | protected $messageFile = 'ContactPage/ContactPage.i18n.php'; |
554 | 555 | protected $filePattern = 'ContactPage/ContactPage.i18n.$CODE.php'; |
555 | 556 | |
556 | | - protected $exportStart = '$messages[\'$CODE\'] = array('; |
| 557 | + protected $exportStart = '$messages = array('; |
557 | 558 | protected $exportLineP = ''; |
558 | 559 | protected $exportEnd = '),'; |
559 | 560 | |
— | — | @@ -681,7 +682,7 @@ |
682 | 683 | protected $arrName = 'RevisionreviewMessages'; |
683 | 684 | protected $messageFile = 'FlaggedRevs/FlaggedRevsPage.i18n.php'; |
684 | 685 | |
685 | | - protected $exportStart = '$RevisionreviewMessage[\'$CODE\'] = array('; |
| 686 | + protected $exportStart = '$RevisionreviewMessages[\'$CODE\'] = array('; |
686 | 687 | protected $exportPrefix= ''; |
687 | 688 | protected $exportLineP = "\t"; |
688 | 689 | protected $exportEnd = ');'; |