Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace wfMsg* calls #100

Merged
merged 4 commits into from
Jan 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions includes/criteria/CriterionIsNonNumeric.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ protected function doValidation( $value, Parameter $parameter, array $parameters
* @see ItemParameterCriterion::getItemErrorMessage
*/
protected function getItemErrorMessage( Parameter $parameter ) {
return wfMsgExt( 'validation-error-no-non-numeric', 'parsemag', $parameter->getOriginalName() );
return wfMessage( 'validation-error-no-non-numeric', $parameter->getOriginalName() )->parse();
}

/**
* @see ItemParameterCriterion::getFullListErrorMessage
*/
protected function getFullListErrorMessage( Parameter $parameter ) {
global $wgLang;
return wfMsgExt( 'validation-error-no-non-numerics', 'parsemag', $parameter->getOriginalName() );
return wfMessage( 'validation-error-no-non-numerics', $parameter->getOriginalName() )->parse();
}
}
}
4 changes: 2 additions & 2 deletions includes/criteria/CriterionMapLayer.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ protected function doValidation( $value, Parameter $parameter, array $parameters
* @see ItemParameterCriterion::getItemErrorMessage
*/
protected function getItemErrorMessage( Parameter $parameter ) {
return wfMsgExt( 'validation-error-invalid-layer', 'parsemag', $parameter->getOriginalName() );
return wfMessage( 'validation-error-invalid-layer', $parameter->getOriginalName() )->parse();
}

/**
* @see ItemParameterCriterion::getFullListErrorMessage
*/
protected function getFullListErrorMessage( Parameter $parameter ) {
return wfMsgExt( 'validation-error-invalid-layers', 'parsemag', $parameter->getOriginalName() );
return wfMessage( 'validation-error-invalid-layers', $parameter->getOriginalName() )->parse();
}

}
3 changes: 0 additions & 3 deletions includes/parserhooks/Maps_LayerDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,6 @@ protected function getLayerDefinitionTable( MapsLayer $layer ) {
count( $messages )
)->inContentLanguage()->escaped() .
"</td><td class=\"mapslayerpropval\">{$warnings}</td></tr>";


//$out .= $this->errorbox( wfMsgHtml( 'maps-error-invalid-layerdef' ) . $warnings );

$outWarning .= Html::rawElement(
'table',
Expand Down
4 changes: 2 additions & 2 deletions includes/parserhooks/Maps_MapsDoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function render( array $parameters ) {
protected function msg() {
$args = func_get_args();
$key = array_shift( $args );
return wfMsgReal( $key, $args, true, $this->language );
return wfMessage( $key, $args )->inLanguage( $this->language )->text();
}

/**
Expand Down Expand Up @@ -205,4 +205,4 @@ public function getMessage() {
return 'maps-mapsdoc-description';
}

}
}