r67954 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67953‎ | r67954 | r67955 >
Date:15:35, 13 June 2010
Author:raymond
Status:ok
Tags:
Comment:
i18n tweaks: Use PLURAL for third argument of 'datatransclusion-bad-argument-by'
Use $wgContLang->commaList() to join array values (content language, because the error text is saved in the page)
Modified paths:
  • /trunk/extensions/DataTransclusion/DataTransclusion.i18n.php (modified) (history)
  • /trunk/extensions/DataTransclusion/DataTransclusionHandler.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DataTransclusion/DataTransclusion.i18n.php
@@ -23,9 +23,10 @@
2424 'datatransclusion-missing-source' => 'No data source specified.
2525 First argument is required.',
2626 'datatransclusion-unknown-source' => 'Bad data source specified.
27 -$1 is not known.',
 27+"$1" is not known.',
2828 'datatransclusion-bad-argument-by' => 'Bad key field specified.
29 -$2 is not a key field in data source $1, valid keys are: $3.',
 29+"$2" is not a key field in data source "$1".
 30+{{PLURAL:$4|Valid key|Valid keys are}}: $3.',
3031 'datatransclusion-missing-argument-key' => 'No key value specified.
3132 Second or "key" argument is required.',
3233 'datatransclusion-missing-argument-template' => 'No template specified.
Index: trunk/extensions/DataTransclusion/DataTransclusionHandler.php
@@ -112,8 +112,10 @@
113113
114114 $keyFields = $source->getKeyFields();
115115 if ( ! in_array( $by, $keyFields ) ) {
 116+ global $wgContLang;
116117 wfDebugLog( 'DataTransclusion', "bad 'by' argument: $by (not a known key field)\n" );
117 - return DataTransclusionHandler::errorMessage( 'datatransclusion-bad-argument-by', $asHTML, $sourceName, $by, join( ', ', $keyFields ) );
 118+ return DataTransclusionHandler::errorMessage( 'datatransclusion-bad-argument-by', $asHTML, $sourceName, $by,
 119+ $wgContLang->commaList( $keyFields ), count( $keyFields ) );
118120 }
119121
120122 if ( !empty( $argv['key'] ) ) {

Status & tagging log