r112667 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112666‎ | r112667 | r112668 >
Date:05:07, 29 February 2012
Author:santhosh
Status:ok
Tags:
Comment:
Logging for Language preference changes for a translatable page.
Modified paths:
  • /trunk/extensions/Translate/PageTranslation.i18n.php (modified) (history)
  • /trunk/extensions/Translate/TranslateHooks.php (modified) (history)
  • /trunk/extensions/Translate/tag/PageTranslationHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/tag/PageTranslationHooks.php
@@ -584,8 +584,14 @@
585585 return wfMsgExt( 'pt-log-delete-full-ok', $opts, $title->getPrefixedText(), $user );
586586 } elseif ( $action === 'deletelok' ) {
587587 return wfMsgExt( 'pt-log-delete-lang-ok', $opts, $title->getPrefixedText(), $user );
 588+ } elseif ( $action === 'prioritylanguages' ) {
 589+ if ( $_['force'] === 'on' ) {
 590+ return wfMsgExt( 'pt-log-priority-langs-force', $opts, $title->getPrefixedText(), $user, $_['languages'] );
 591+ } else {
 592+ return wfMsgExt( 'pt-log-priority-langs', $opts, $title->getPrefixedText(), $user , $_['languages'] );
 593+ }
588594 }
589 - return '';
 595+ return '';
590596 }
591597
592598 /// Hook: SpecialPage_initList
Index: trunk/extensions/Translate/TranslateHooks.php
@@ -67,6 +67,7 @@
6868 $wgLogActionsHandlers['pagetranslation/deletefok'] = 'PageTranslationHooks::formatLogEntry';
6969 $wgLogActionsHandlers['pagetranslation/deletelnok'] = 'PageTranslationHooks::formatLogEntry';
7070 $wgLogActionsHandlers['pagetranslation/deletefnok'] = 'PageTranslationHooks::formatLogEntry';
 71+ $wgLogActionsHandlers['pagetranslation/prioritylanguages'] = 'PageTranslationHooks::formatLogEntry';
7172
7273 global $wgJobClasses;
7374 $wgJobClasses['RenderJob'] = 'RenderJob';
Index: trunk/extensions/Translate/PageTranslation.i18n.php
@@ -123,6 +123,8 @@
124124 'pt-log-delete-full-nok' => '{{GENDER:$2|encountered}} a problem while deleting translatable page [[:$1]]',
125125 'pt-log-delete-lang-ok' => '{{GENDER:$2|completed}} deletion of translation page $1',
126126 'pt-log-delete-lang-nok' => '{{GENDER:$2|encountered}} a problem while deleting translation page [[:$1]]',
 127+ 'pt-log-priority-langs' => '{{GENDER:$2|set}} preferred languages for translation page [[:$1]] as $3',
 128+ 'pt-log-priority-langs-force' => '{{GENDER:$2|restricted}} languages for translation page [[:$1]] as $3',
127129
128130
129131 # move page replacement
@@ -256,6 +258,8 @@
257259 'pt-log-unmark' => 'Used on [[Special:Log/pagetranslation]]',
258260 'pt-log-moveok' => 'Used on [[Special:Log/pagetranslation]]',
259261 'pt-log-movenok' => 'Used on [[Special:Log/pagetranslation]]',
 262+ 'pt-log-priority-langs' => 'Used on [[Special:Log/pagetranslation]]. $3 is comma seperated list of languages.',
 263+ 'pt-log-priority-langs-force' => 'Used on [[Special:Log/pagetranslation]]. $3 is comma seperated list of languages.',
260264 'pt-movepage-block-base-exists' => "'''base page''' refers to the untranslated version of the translatable page.",
261265 'pt-movepage-block-tp-exists' => 'translation page is a translated version of a translatable page',
262266 'pt-movepage-block-section-exists' => 'Section page is a translation of one section. Translation page consists of many translation sections.',

Follow-up revisions

RevisionCommit summaryAuthorDate
r112670Wording tweaks, ping r112667 and r112666nikerabbit08:36, 29 February 2012
r112782* Improve logging...nikerabbit08:52, 1 March 2012

Status & tagging log