diff options
author | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-03-16 14:03:58 +0000 |
---|---|---|
committer | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-03-16 14:03:58 +0000 |
commit | 9841e29a13777d39a28f70c5a8e959b7cef53d88 (patch) | |
tree | a176c9e366cb4afcffa6053f1fe93119cdee37ca /includes | |
parent | c7c9b57ec25791bcbe47b991fd6aa3dd528a2a3b (diff) | |
download | brdo-9841e29a13777d39a28f70c5a8e959b7cef53d88.tar.gz brdo-9841e29a13777d39a28f70c5a8e959b7cef53d88.tar.bz2 |
#54008, po import does not update strings, patch by timcn
Diffstat (limited to 'includes')
-rw-r--r-- | includes/locale.inc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/includes/locale.inc b/includes/locale.inc index fcaf82ca2..4f4470aec 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -156,10 +156,10 @@ function _locale_import_po($file, $lang, $mode) { } // Get strings from file (returns on failure after a partial import, or on success) - _locale_import_read_po($file, $lang); + _locale_import_read_po($file, $mode, $lang); // Get status information on import process - list($headerdone, $additions, $updates) = _locale_import_one_string('report'); + list($headerdone, $additions, $updates) = _locale_import_one_string('report', $mode); if (!$headerdone) { drupal_set_message(t('The translation file %filename appears to have a missing or malformed header.', array('%filename' => theme('placeholder', $file->filename))), 'error'); @@ -182,7 +182,7 @@ function _locale_import_po($file, $lang, $mode) { * @param $file Object with properties of local file to parse * @author Jacobo Tarrio */ -function _locale_import_read_po($file, $lang) { +function _locale_import_read_po($file, $mode, $lang) { $message = theme('placeholder', $file->filename); $fd = fopen($file->filepath, "rb"); // File will get closed by PHP on return @@ -206,7 +206,7 @@ function _locale_import_read_po($file, $lang) { $current["#"][] = substr($line, 1); } elseif (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) { // End current entry, start a new one - _locale_import_one_string($current, $lang); + _locale_import_one_string($current, $mode, $lang); $current = array(); $current["#"][] = substr($line, 1); $context = "COMMENT"; @@ -232,7 +232,7 @@ function _locale_import_read_po($file, $lang) { } elseif (!strncmp("msgid", $line, 5)) { if ($context == "MSGSTR") { // End current entry, start a new one - _locale_import_one_string($current, $lang); + _locale_import_one_string($current, $mode, $lang); $current = array(); } elseif ($context == "MSGID") { // Already in this context? Parse error @@ -306,7 +306,7 @@ function _locale_import_read_po($file, $lang) { // End of PO file, flush last entry if (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) { - _locale_import_one_string($current, $lang); + _locale_import_one_string($current, $mode, $lang); } elseif ($context != "COMMENT") { drupal_set_message(t('The translation file %filename ended unexpectedly at line %line.', array('%filename' => $message, '%line' => $lineno)), 'error'); @@ -321,7 +321,7 @@ function _locale_import_read_po($file, $lang) { * @param $value Information about the string * @author Jacobo Tarrio */ -function _locale_import_one_string($value, $lang = NULL) { +function _locale_import_one_string($value, $mode, $lang = NULL) { static $additions = 0; static $updates = 0; static $headerdone = FALSE; |