$messages[]=$this->formatPlural($counters[L10N_COUNT_DUPLICATE],'1 duplicate translation not saved','@count duplicate translations not saved');
}
if(!empty($counters[L10N_COUNT_IGNORED])){
$messages[]=$this->formatPlural($counters[L10N_COUNT_IGNORED],'1 source string not found; its translation was ignored','@count source strings not found; their translations were ignored');
elseif(!empty($current["msgctxt"])){// Already in this context? Parse error
elseif(!empty($current["msgctxt"])){
// Already in this context? Parse error.
\Drupal::messenger()->addError($this->t('%filename contains an error: "msgctxt" is unexpected on line %line.',[
'%filename'=>$file->getFileUri(),
'%line'=>$lineno,
@@ -159,7 +174,8 @@ class L10nPo {
$context="MSGCTXT";
}
elseif(!strncmp("msgstr[",$line,7)){
if(($context!="MSGID")&&($context!="MSGCTXT")&&($context!="MSGID_PLURAL")&&($context!="MSGSTR_ARR")){// Must come after msgid, msgxtxt, msgid_plural, or msgstr[]
$messages[]=$this->formatPlural($counters[L10N_COUNT_DUPLICATE],'1 duplicate translation not saved','@count duplicate translations not saved');
}
if(!empty($counters[L10N_COUNT_IGNORED])){
$messages[]=$this->formatPlural($counters[L10N_COUNT_IGNORED],'1 source string not found; its translation was ignored','@count source strings not found; their translations were ignored');