- Patch #72564 by Gabor: locale bugfix: undefined variable.
parent
5bbbf10ba8
commit
a871b96a48
|
@ -742,7 +742,7 @@ function _locale_import_read_po($op, $file, $mode = NULL, $lang = NULL) {
|
||||||
$current["#"][] = substr($line, 1);
|
$current["#"][] = substr($line, 1);
|
||||||
}
|
}
|
||||||
elseif (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) { // End current entry, start a new one
|
elseif (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) { // End current entry, start a new one
|
||||||
_locale_import_one_string($op, $current, $mode, $lang);
|
_locale_import_one_string($op, $current, $mode, $lang, $file);
|
||||||
$current = array();
|
$current = array();
|
||||||
$current["#"][] = substr($line, 1);
|
$current["#"][] = substr($line, 1);
|
||||||
$context = "COMMENT";
|
$context = "COMMENT";
|
||||||
|
@ -768,7 +768,7 @@ function _locale_import_read_po($op, $file, $mode = NULL, $lang = NULL) {
|
||||||
}
|
}
|
||||||
elseif (!strncmp("msgid", $line, 5)) {
|
elseif (!strncmp("msgid", $line, 5)) {
|
||||||
if ($context == "MSGSTR") { // End current entry, start a new one
|
if ($context == "MSGSTR") { // End current entry, start a new one
|
||||||
_locale_import_one_string($op, $current, $mode, $lang);
|
_locale_import_one_string($op, $current, $mode, $lang, $file);
|
||||||
$current = array();
|
$current = array();
|
||||||
}
|
}
|
||||||
elseif ($context == "MSGID") { // Already in this context? Parse error
|
elseif ($context == "MSGID") { // Already in this context? Parse error
|
||||||
|
@ -842,7 +842,7 @@ function _locale_import_read_po($op, $file, $mode = NULL, $lang = NULL) {
|
||||||
|
|
||||||
// End of PO file, flush last entry
|
// End of PO file, flush last entry
|
||||||
if (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) {
|
if (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) {
|
||||||
_locale_import_one_string($op, $current, $mode, $lang);
|
_locale_import_one_string($op, $current, $mode, $lang, $file);
|
||||||
}
|
}
|
||||||
elseif ($context != "COMMENT") {
|
elseif ($context != "COMMENT") {
|
||||||
_locale_import_message('The translation file %filename ended unexpectedly at line %line.', $file, $lineno);
|
_locale_import_message('The translation file %filename ended unexpectedly at line %line.', $file, $lineno);
|
||||||
|
@ -881,8 +881,10 @@ function _locale_import_message($message, $file, $lineno = NULL) {
|
||||||
* Should existing translations be replaced ('overwrite' or 'keep')
|
* Should existing translations be replaced ('overwrite' or 'keep')
|
||||||
* @param $lang
|
* @param $lang
|
||||||
* Language to store the string in
|
* Language to store the string in
|
||||||
|
* @param $file
|
||||||
|
* Object representation of file being imported, only required when op is 'db-store'
|
||||||
*/
|
*/
|
||||||
function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NULL) {
|
function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NULL, $file = NULL) {
|
||||||
static $additions = 0;
|
static $additions = 0;
|
||||||
static $updates = 0;
|
static $updates = 0;
|
||||||
static $headerdone = FALSE;
|
static $headerdone = FALSE;
|
||||||
|
|
Loading…
Reference in New Issue