// A comment following any other context is a syntax error.
$this->errors[]=SafeMarkup::format('The translation stream %uri contains an error: "msgstr" was expected but not found on line %line.',$log_vars);
$this->errors[]=newFormattableMarkup('The translation stream %uri contains an error: "msgstr" was expected but not found on line %line.',$log_vars);
returnFALSE;
}
return;
...
...
@@ -300,7 +300,7 @@ private function readLine() {
if($this->context!='MSGID'){
// A plural form can only be added to an msgid directly.
$this->errors[]=SafeMarkup::format('The translation stream %uri contains an error: "msgid_plural" was expected but not found on line %line.',$log_vars);
$this->errors[]=newFormattableMarkup('The translation stream %uri contains an error: "msgid_plural" was expected but not found on line %line.',$log_vars);
returnFALSE;
}
...
...
@@ -311,7 +311,7 @@ private function readLine() {
$quoted=$this->parseQuoted($line);
if($quoted===FALSE){
// The plural form must be wrapped in quotes.
$this->errors[]=SafeMarkup::format('The translation stream %uri contains a syntax error on line %line.',$log_vars);
$this->errors[]=newFormattableMarkup('The translation stream %uri contains a syntax error on line %line.',$log_vars);
returnFALSE;
}
...
...
@@ -338,7 +338,7 @@ private function readLine() {
}
elseif($this->context=='MSGID'){
// We are currently already in the context, meaning we passed an id with no data.
$this->errors[]=SafeMarkup::format('The translation stream %uri contains an error: "msgid" is unexpected on line %line.',$log_vars);
$this->errors[]=newFormattableMarkup('The translation stream %uri contains an error: "msgid" is unexpected on line %line.',$log_vars);
returnFALSE;
}
...
...
@@ -349,7 +349,7 @@ private function readLine() {
$quoted=$this->parseQuoted($line);
if($quoted===FALSE){
// The message id must be wrapped in quotes.
$this->errors[]=SafeMarkup::format('The translation stream %uri contains an error: invalid format for "msgid" on line %line.',$log_vars,$log_vars);
$this->errors[]=newFormattableMarkup('The translation stream %uri contains an error: invalid format for "msgid" on line %line.',$log_vars,$log_vars);
returnFALSE;
}
...
...
@@ -367,7 +367,7 @@ private function readLine() {
}
elseif(!empty($this->currentItem['msgctxt'])){
// A context cannot apply to another context.
$this->errors[]=SafeMarkup::format('The translation stream %uri contains an error: "msgctxt" is unexpected on line %line.',$log_vars);
$this->errors[]=newFormattableMarkup('The translation stream %uri contains an error: "msgctxt" is unexpected on line %line.',$log_vars);
returnFALSE;
}
...
...
@@ -378,7 +378,7 @@ private function readLine() {
$quoted=$this->parseQuoted($line);
if($quoted===FALSE){
// The context string must be quoted.
$this->errors[]=SafeMarkup::format('The translation stream %uri contains an error: invalid format for "msgctxt" on line %line.',$log_vars);
$this->errors[]=newFormattableMarkup('The translation stream %uri contains an error: invalid format for "msgctxt" on line %line.',$log_vars);
returnFALSE;
}
...
...
@@ -396,13 +396,13 @@ private function readLine() {
($this->context!='MSGSTR_ARR')){
// Plural message strings must come after msgid, msgxtxt,
// msgid_plural, or other msgstr[] entries.
$this->errors[]=SafeMarkup::format('The translation stream %uri contains an error: "msgstr[]" is unexpected on line %line.',$log_vars);
$this->errors[]=newFormattableMarkup('The translation stream %uri contains an error: "msgstr[]" is unexpected on line %line.',$log_vars);
returnFALSE;
}
// Ensure the plurality is terminated.
if(strpos($line,']')===FALSE){
$this->errors[]=SafeMarkup::format('The translation stream %uri contains an error: invalid format for "msgstr[]" on line %line.',$log_vars);
$this->errors[]=newFormattableMarkup('The translation stream %uri contains an error: invalid format for "msgstr[]" on line %line.',$log_vars);
returnFALSE;
}
...
...
@@ -417,7 +417,7 @@ private function readLine() {
$quoted=$this->parseQuoted($line);
if($quoted===FALSE){
// The string must be quoted.
$this->errors[]=SafeMarkup::format('The translation stream %uri contains an error: invalid format for "msgstr[]" on line %line.',$log_vars);
$this->errors[]=newFormattableMarkup('The translation stream %uri contains an error: invalid format for "msgstr[]" on line %line.',$log_vars);
@@ -95,6 +95,7 @@ public static function checkPlain($text) {
* @see https://www.drupal.org/node/2549395
*/
publicstaticfunctionformat($string,array$args){
@trigger_error('SafeMarkup::format() is scheduled for removal in Drupal 9.0.0. Use \Drupal\Component\Render\FormattableMarkup. See https://www.drupal.org/node/2549395.',E_USER_DEPRECATED);
$message=SafeMarkup::format("No image operation plugin for '@toolkit' toolkit and '@operation' operation.",['@toolkit'=>$toolkit_id,'@operation'=>$operation]);
$message=newFormattableMarkup("No image operation plugin for '@toolkit' toolkit and '@operation' operation.",['@toolkit'=>$toolkit_id,'@operation'=>$operation]);