Index: trunk/extensions/Translate/MessageGroups.php |
— | — | @@ -1107,6 +1107,9 @@ |
1108 | 1108 | } |
1109 | 1109 | |
1110 | 1110 | $id = $group->getId(); |
| 1111 | + if ( rand( 1, 100 ) < 50 ) { |
| 1112 | + return 'discouraged'; |
| 1113 | + } |
1111 | 1114 | return isset( $groups[$id] ) ? $groups[$id] : ''; |
1112 | 1115 | } |
1113 | 1116 | |
Index: trunk/extensions/Translate/tag/SpecialPageTranslation.php |
— | — | @@ -296,17 +296,18 @@ |
297 | 297 | * @param $old string |
298 | 298 | * @return string |
299 | 299 | */ |
300 | | - protected function actionLinks( $title, $rev, $latest, $old = 'old' ) { |
| 300 | + protected function actionLinks( $title, $rev, $latest, $type = 'old' ) { |
301 | 301 | $actions = array(); |
| 302 | + $linker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; |
302 | 303 | |
303 | 304 | if ( $this->user->isAllowed( 'pagetranslation' ) ) { |
304 | 305 | $token = $this->user->editToken(); |
305 | 306 | |
306 | 307 | if ( |
307 | | - ( $old === 'new' && $latest === $rev ) || |
308 | | - ( $old === 'old' && $latest !== $rev ) |
| 308 | + ( $type === 'new' && $latest === $rev ) || |
| 309 | + ( $type === 'old' && $latest !== $rev ) |
309 | 310 | ) { |
310 | | - $actions[] = $this->user->getSkin()->link( |
| 311 | + $actions[] = $linker->link( |
311 | 312 | $this->getTitle(), |
312 | 313 | wfMsgHtml( 'tpt-rev-mark-new' ), |
313 | 314 | array(), |
— | — | @@ -316,8 +317,8 @@ |
317 | 318 | 'token' => $token, |
318 | 319 | ) |
319 | 320 | ); |
320 | | - } elseif ( $old === 'stuck' ) { |
321 | | - $actions[] = $this->user->getSkin()->link( |
| 321 | + } elseif ( $type === 'stuck' ) { |
| 322 | + $actions[] = $linker->link( |
322 | 323 | $this->getTitle(), |
323 | 324 | wfMsgHtml( 'tpt-rev-unmark' ), |
324 | 325 | array(), |