Index: trunk/extensions/Translate/Translate.i18n.php |
— | — | @@ -398,6 +398,8 @@ |
399 | 399 | 'log-description-translationreview' => 'Log of all reviews to translations and message groups.', |
400 | 400 | 'logentry-translationreview-message' => '$1 {{GENDER:$2|accepted}} translation $3', |
401 | 401 | |
| 402 | + // The actual states, when set, come after the hyphen. |
| 403 | + // The dangling hyphen hints that it's unset. |
402 | 404 | 'translate-workflow-state-' => '(unset)', |
403 | 405 | 'translate-workflowstatus' => 'Status: $1', |
404 | 406 | 'translate-workflow-set-do' => 'Set', |
— | — | @@ -643,7 +645,7 @@ |
644 | 646 | 'group-translate-proofr-member' => '{{doc-group|translate-proofr|member}}', |
645 | 647 | 'grouppage-translate-proofr' => '{{doc-group|translate-proofr|page}}', |
646 | 648 | 'logentry-translationreview-message' => '{{Logentry}}', |
647 | | - 'translate-workflow-state-' => 'Unselectable select option in Special:Translate if workflow state editing is on', |
| 649 | + '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.', |
648 | 650 | 'translate-workflowstatus' => 'In Special:Translate if workflow states are in use, $1 is selector or the current state', |
649 | 651 | 'translate-workflow-set-do' => 'Submit button text when active', |
650 | 652 | 'translate-workflow-set-doing' => 'Submit button text when waiting for reply from server', |
Index: trunk/extensions/Translate/specials/SpecialTranslate.php |
— | — | @@ -524,7 +524,9 @@ |
525 | 525 | $selector->setDefault( $current ); |
526 | 526 | $selector->addOption( wfMessage( 'translate-workflow-state-' )->text(), '' ); |
527 | 527 | foreach ( $wgTranslateWorkflowStates as $state ) { |
528 | | - $selector->addOption( $state ); |
| 528 | + $stateMessage = wfMessage( "translate-workflow-state-$state" ); |
| 529 | + $stateText = $stateMessage->isBlank() ? $state : $stateMessage->text(); |
| 530 | + $selector->addOption( $stateText, $state ); |
529 | 531 | } |
530 | 532 | $state = $selector->getHTML(); |
531 | 533 | |
Index: trunk/extensions/Translate/specials/SpecialMessageGroupStats.php |
— | — | @@ -182,7 +182,9 @@ |
183 | 183 | if ( $wgTranslateWorkflowStates ) { |
184 | 184 | $state = isset( $this->states[$code] ) ? $this->states[$code] : ''; |
185 | 185 | $sort = isset( $this->statemap[$state] ) ? $this->statemap[$state] + 1 : -1; |
186 | | - $out .= "\n\t\t" . $this->table->element( $state, false, $sort ); |
| 186 | + $stateMessage = wfMessage( "translate-workflow-state-$state" ); |
| 187 | + $stateText = $stateMessage->isBlank() ? $state : $stateMessage->text(); |
| 188 | + $out .= "\n\t\t" . $this->table->element( $stateText, false, $sort ); |
187 | 189 | } |
188 | 190 | $out .= "\n\t" . Html::closeElement( 'tr' ) . "\n"; |
189 | 191 | return $out; |
— | — | @@ -213,12 +215,16 @@ |
214 | 216 | |
215 | 217 | protected static function getWorkflowStates( $group ) { |
216 | 218 | $db = wfGetDB( DB_SLAVE ); |
217 | | - $res = $db->select( 'translate_groupreviews', array( 'tgr_state', 'tgr_lang' ), array( 'tgr_group' => $group ), __METHOD__ ); |
| 219 | + $res = $db->select( |
| 220 | + 'translate_groupreviews', |
| 221 | + array( 'tgr_state', 'tgr_lang' ), |
| 222 | + array( 'tgr_group' => $group ), |
| 223 | + __METHOD__ |
| 224 | + ); |
218 | 225 | $states = array(); |
219 | 226 | foreach ( $res as $row ) { |
220 | 227 | $states[$row->tgr_lang] = $row->tgr_state; |
221 | 228 | } |
222 | 229 | return $states; |
223 | 230 | } |
224 | | - |
225 | 231 | } |