Add parameters to LanguageQqx-generated messages.
This avoids outputing bunch of unhelpful (parentheses) messages. Change-Id: I55fab4f132f28be3fe7e4bc8f51d403b11d24284
This commit is contained in:
parent
1186fad8c1
commit
a719f7ef12
2 changed files with 10 additions and 1 deletions
|
|
@ -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' );
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,6 @@ class LanguageQqx extends Language {
|
|||
* @return string
|
||||
*/
|
||||
function getMessage( $key ) {
|
||||
return "($key)";
|
||||
return "($key$*)";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue