Add parameters to LanguageQqx-generated messages.

This avoids outputing bunch of unhelpful (parentheses) messages.

Change-Id: I55fab4f132f28be3fe7e4bc8f51d403b11d24284
This commit is contained in:
Niklas Laxström 2012-10-08 20:51:46 +00:00 committed by Gerrit Code Review
parent 1186fad8c1
commit a719f7ef12
2 changed files with 10 additions and 1 deletions

View file

@ -420,6 +420,15 @@ class Message {
return '<' . $key . '>';
}
# Replace $* with a list of parameters for &uselang=qqx.
if ( strpos( $string, '$*' ) !== false ) {
$paramlist = '';
if ( $this->parameters !== array() ) {
$paramlist = ': $' . implode( ', $', range( 1, count( $this->parameters ) ) );
}
$string = str_replace( '$*', $paramlist, $string );
}
# Replace parameters before text parsing
$string = $this->replaceParameters( $string, 'before' );

View file

@ -36,6 +36,6 @@ class LanguageQqx extends Language {
* @return string
*/
function getMessage( $key ) {
return "($key)";
return "($key$*)";
}
}