Index: trunk/extensions/Translate/tag/SpecialPageTranslation.php |
— | — | @@ -83,11 +83,16 @@ |
84 | 84 | 'tgr_state' => 'discouraged', |
85 | 85 | ); |
86 | 86 | |
| 87 | + $logger = new LogPage( 'pagetranslation' ); |
| 88 | + $params = array( 'user' => $wgUser->getName() ); |
| 89 | + |
87 | 90 | if ( $action === 'encourage' ) { |
88 | 91 | $dbw->delete( $table, $row, __METHOD__ ); |
| 92 | + $logger->addEntry( 'encourage', $page->getTitle(), null, array( serialize( $params ) ) ); |
89 | 93 | } else { |
90 | 94 | $index = array( 'tgr_group', 'tgr_lang' ); |
91 | 95 | $dbw->replace( $table, array( $index ), $row, __METHOD__ ); |
| 96 | + $logger->addEntry( 'discourage', $page->getTitle(), null, array( serialize( $params ) ) ); |
92 | 97 | } |
93 | 98 | |
94 | 99 | $this->listPages(); |
— | — | @@ -315,7 +320,6 @@ |
316 | 321 | } |
317 | 322 | $out->addHtml( '</ol>' ); |
318 | 323 | } |
319 | | - |
320 | 324 | } |
321 | 325 | |
322 | 326 | /** |
Index: trunk/extensions/Translate/tag/PageTranslationHooks.php |
— | — | @@ -608,6 +608,10 @@ |
609 | 609 | return wfMsgExt( 'pt-log-delete-full-ok', $opts, $title->getPrefixedText(), $user ); |
610 | 610 | } elseif ( $action === 'deletelok' ) { |
611 | 611 | return wfMsgExt( 'pt-log-delete-lang-ok', $opts, $title->getPrefixedText(), $user ); |
| 612 | + } elseif ( $action === 'encourage' ) { |
| 613 | + return wfMsgExt( 'pt-log-encourage', $opts, $title->getPrefixedText(), $user ); |
| 614 | + } elseif ( $action === 'discourage' ) { |
| 615 | + return wfMsgExt( 'pt-log-discourage', $opts, $title->getPrefixedText(), $user ); |
612 | 616 | } elseif ( $action === 'prioritylanguages' ) { |
613 | 617 | if ( $_['languages'] === false ) { |
614 | 618 | return wfMsgExt( 'pt-log-priority-langs-unset', $opts, $title->getPrefixedText(), $user ); |
Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | /** |
17 | 17 | * Version number used in extension credits and in other placed where needed. |
18 | 18 | */ |
19 | | -define( 'TRANSLATE_VERSION', '2012-02-26' ); |
| 19 | +define( 'TRANSLATE_VERSION', '2012-03-02' ); |
20 | 20 | |
21 | 21 | /** |
22 | 22 | * Extension credits properties. |
Index: trunk/extensions/Translate/TranslateHooks.php |
— | — | @@ -67,6 +67,8 @@ |
68 | 68 | $wgLogActionsHandlers['pagetranslation/deletefok'] = 'PageTranslationHooks::formatLogEntry'; |
69 | 69 | $wgLogActionsHandlers['pagetranslation/deletelnok'] = 'PageTranslationHooks::formatLogEntry'; |
70 | 70 | $wgLogActionsHandlers['pagetranslation/deletefnok'] = 'PageTranslationHooks::formatLogEntry'; |
| 71 | + $wgLogActionsHandlers['pagetranslation/encourage'] = 'PageTranslationHooks::formatLogEntry'; |
| 72 | + $wgLogActionsHandlers['pagetranslation/discourage'] = 'PageTranslationHooks::formatLogEntry'; |
71 | 73 | $wgLogActionsHandlers['pagetranslation/prioritylanguages'] = 'PageTranslationHooks::formatLogEntry'; |
72 | 74 | |
73 | 75 | global $wgJobClasses; |
Index: trunk/extensions/Translate/PageTranslation.i18n.php |
— | — | @@ -134,11 +134,12 @@ |
135 | 135 | 'pt-log-delete-full-nok' => '{{GENDER:$2|encountered}} a problem while deleting translatable page [[:$1]]', |
136 | 136 | 'pt-log-delete-lang-ok' => '{{GENDER:$2|completed}} deletion of translation page $1', |
137 | 137 | 'pt-log-delete-lang-nok' => '{{GENDER:$2|encountered}} a problem while deleting translation page [[:$1]]', |
| 138 | + 'pt-log-encourage' => '{{GENDER:$2|encouraged}} translation for page [[:$1]]', |
| 139 | + 'pt-log-discourage' => '{{GENDER:$2|discouraged}} translation for page [[:$1]]', |
138 | 140 | 'pt-log-priority-langs-unset' => '{{GENDER:$2|removed}} priority languages from translatable page [[:$1]]', |
139 | 141 | 'pt-log-priority-langs' => '{{GENDER:$2|set}} the priority languages for translatable page [[:$1]] to $3', |
140 | 142 | 'pt-log-priority-langs-force' => '{{GENDER:$2|limited}} languages for translatable page [[:$1]] to $3', |
141 | 143 | |
142 | | - |
143 | 144 | # move page replacement |
144 | 145 | 'pt-movepage-title' => 'Move translatable page $1', |
145 | 146 | 'pt-movepage-blockers' => 'The translatable page cannot be moved to a new name because of the following {{PLURAL:$1|error|errors}}:', |