r107642 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107641‎ | r107642 | r107643 >
Date:18:31, 30 December 2011
Author:amire80
Status:ok
Tags:
Comment:
Follow up to r107367. According to Niklas' request there, changed the parameters to the logging message for group review. $3 is now Special:Translate for the group and the language and $4 is the language. Also removed some unneeded comments.
Modified paths:
  • /trunk/extensions/Translate/Translate.i18n.php (modified) (history)
  • /trunk/extensions/Translate/TranslateHooks.php (modified) (history)
  • /trunk/extensions/Translate/api/ApiGroupReview.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslateHooks.php
@@ -328,6 +328,7 @@
329329
330330 if ( $action === 'group' ) {
331331 $languageCode = $params[0];
 332+ $groupLabel = $params[1];
332333 $languageNames = Language::getTranslatedLanguageNames( $languageCode );
333334 $languageName = "$languageNames[$languageCode] ($languageCode)";
334335 $oldState = $params[2];
@@ -340,8 +341,13 @@
341342 return wfMessage( 'logentry-groupreview-message' )->params(
342343 '', // User link in the new system
343344 '#', // User name for gender in the new system
 345+ Message::rawParam( $linker->link(
 346+ $title,
 347+ $groupLabel,
 348+ array(),
 349+ array( 'language' => $languageCode ) )
 350+ ),
344351 $languageName,
345 - $params[1], // group
346352 $oldState,
347353 $newState
348354 )->inLanguage( $language )->text();
Index: trunk/extensions/Translate/Translate.i18n.php
@@ -398,7 +398,7 @@
399399 'log-name-translationreview' => 'Translation review log',
400400 'log-description-translationreview' => 'Log of all reviews to translations and message groups.',
401401 'logentry-translationreview-message' => '$1 {{GENDER:$2|accepted}} translation $3',
402 - 'logentry-groupreview-message' => '$1 {{GENDER:$2|changed}} the status of $3 translations of message group $4 from $5 to $6',
 402+ 'logentry-groupreview-message' => '$1 {{GENDER:$2|changed}} the status of $4 translations of message group $3 from $5 to $6',
403403
404404 // The actual states, when set, come after the hyphen.
405405 // The dangling hyphen hints that it's unset.
@@ -663,8 +663,7 @@
664664 'logentry-groupreview-message' => '{{Logentry}}
665665
666666 Additional parameters:
667 -* $3: Language
668 -* $4: Message group name
 667+* $4: Language
669668 * $5: Previous workflow state
670669 * $6: New workflow state',
671670 'translate-workflow-state-' => 'Unselectable select option in Special:Translate if workflow state editing is on. The dangling hyphen in the message key hints that this state is unset; the actual states have the same key with something after the hyphen.',
@@ -9448,7 +9447,7 @@
94499448 'log-name-translationreview' => 'יומן סקירת תרגומים',
94509449 'log-description-translationreview' => 'יומן של כל הסקירות של תרגומים ושל קבוצות תרגומים.',
94519450 'logentry-translationreview-message' => '$1 {{GENDER:$2|אישר|אישרה}} את התרגום $3',
9452 - 'logentry-groupreview-message' => '$1 {{GENDER:$2|שינה|שינתה}} את מצב התרגום ל$3 של הקבוצה $4 מ"$5" ל"$6"',
 9451+ 'logentry-groupreview-message' => '$1 {{GENDER:$2|שינה|שינתה}} את מצב התרגום של הקבוצה $3 ל$4 מ"$5" ל"$6"',
94539452 'translate-workflow-state-' => '(לא מוגדר)',
94549453 'translate-workflowstatus' => 'מצב: $1',
94559454 'translate-workflow-set-do' => 'הגדרה',
Index: trunk/extensions/Translate/api/ApiGroupReview.php
@@ -33,7 +33,6 @@
3434 $this->dieUsageMsg( array( 'missingparam', 'group' ) );
3535 }
3636
37 - // XXX Is this part needed?
3837 $languages = Language::getLanguageNames( false );
3938 if ( !isset( $languages[$requestParams['language']] ) ) {
4039 $this->dieUsageMsg( array( 'missingparam', 'language' ) );
@@ -67,7 +66,7 @@
6867 );
6968 $logger->addEntry(
7069 'group',
71 - SpecialPage::getTitleFor( 'Translate', $groupid ), // It's not really a page
 70+ SpecialPage::getTitleFor( 'Translate', $groupid ),
7271 '', // No comments
7372 $logParams,
7473 $wgUser

Sign-offs

UserFlagDate
Nikerabbitinspected22:20, 30 December 2011
Nikerabbittested22:20, 30 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107367Workflow states logging.amire8008:01, 27 December 2011

Status & tagging log