// The first line might come with a UTF-8 BOM, which should be removed.
$line =
str_replace("\xEF\xBB\xBF", '',
$line);
// Current plurality for 'msgstr[]'.
$this->currentPluralIndex = 0;
} // Track the line number for error reporting.
$this->lineNumber++;
// Initialize common values for error logging.
$log_vars =
[ '%uri' =>
$this->
getURI(),
'%line' =>
$this->lineNumber,
];
// Trim away the linefeed. \\n might appear at the end of the string if
// another line continuing the same string follows. We can remove that.
$line =
trim(strtr($line,
["\\\n" => ""
]));
if (!
strncmp('#',
$line, 1
)) { // Lines starting with '#' are comments.
if ($this->context == 'COMMENT'
) {