r100346 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100345‎ | r100346 | r100347 >
Date:14:05, 20 October 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Followup r100243: prevent reviewing fuzzy messages
Internationalization/#128
Modified paths:
  • /trunk/extensions/Translate/Translate.i18n.php (modified) (history)
  • /trunk/extensions/Translate/api/ApiTranslationReview.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/Translate.i18n.php
@@ -373,6 +373,7 @@
374374 'translate-messagereview-done' => 'Reviewed',
375375 'translate-messagereview-apierror-invalidrevision' => 'Translation was not found',
376376 'translate-messagereview-apierror-unknownmessage' => 'Message was not found',
 377+ 'translate-messagereview-apierror-fuzzymessage' => 'Message is marked as fuzzy',
377378 'translate-messagereview-reviews' => 'Reviewed by {{PLURAL:$1|one user|$1 users}}',
378379 'translate-messagereview-reviewswithyou' => 'Reviewed by {{PLURAL:$1|one user|$1 users}} including you',
379380 'translate-messagereview-reviewsyou' => 'Reviewed by you',
@@ -588,10 +589,11 @@
589590
590591 'translate-messagereview-submit' => 'Button label in Special:Translate review mode',
591592 'translate-messagereview-progress' => 'Button label in Special:Translate review mode. Button is disabled.',
592 - 'translate-messagereview-failure' => 'Button label in Special:Translate review mode. Button is disabled. $1 can be {{msg-mw|translate-messagereview-apierror-invalidrevision}} or {{msg-mw|translate-messagereview-apierror-unknownmessage}}.',
 593+ 'translate-messagereview-failure' => 'Button label in Special:Translate review mode. Button is disabled. $1 can be {{msg-mw|translate-messagereview-apierror-invalidrevision}} or {{msg-mw|translate-messagereview-apierror-unknownmessage}} or {{msg-mw|translate-messagereview-apierror-fuzzymessage}}.',
593594 'translate-messagereview-done' => 'Button label in Special:Translate review mode. Button is disabled.',
594595 'translate-messagereview-apierror-invalidrevision' => 'Error message for {{msg-mw|translate-messagereview-failure}}',
595596 'translate-messagereview-apierror-unknownmessage' => 'Error message for {{msg-mw|translate-messagereview-failure}}',
 597+ 'translate-messagereview-apierror-fuzzymessage' => 'Error message for {{msg-mw|translate-messagereview-failure}}',
596598 'translate-messagereview-reviews' => 'Status message in Special:Translate in review mode',
597599 'translate-messagereview-reviewswithyou' => 'Status message in Special:Translate in review mode',
598600 'translate-messagereview-reviewsyou' => 'Status message in Special:Translate in review mode',
Index: trunk/extensions/Translate/api/ApiTranslationReview.php
@@ -33,6 +33,10 @@
3434 $this->dieUsage( 'You made me confused :X', 'unknownmessage' );
3535 }
3636
 37+ if ( $handle->isFuzzy() ) {
 38+ $this->dieUsage( 'Cannot review fuzzy messages', 'fuzzymessage' );
 39+ }
 40+
3741 $dbw = wfGetDB( DB_MASTER );
3842 $table = 'translate_reviews';
3943 $row = array(
@@ -95,6 +99,7 @@
96100 return array_merge( parent::getPossibleErrors(), array(
97101 array( 'code' => 'permissiondenied', 'info' => 'You must have translate-messagereview right' ),
98102 array( 'code' => 'unknownmessage', 'info' => 'Title $1 does not belong to a message group' ),
 103+ array( 'code' => 'fuzzymessage', 'info' => 'Cannot review fuzzy messages' ),
99104 array( 'code' => 'invalidrevision', 'info' => 'Revision $1 is invalid' ),
100105 ) );
101106 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100243Api module for marking translations as reviewed....nikerabbit17:35, 19 October 2011

Status & tagging log