diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-07-30 08:40:22 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-07-30 08:40:22 +0000 |
commit | cee4af4b436df90424f209a60f6538a7de622f4b (patch) | |
tree | 3a8c7f8b00e1d8880b45b040c4621db6c4f711bc | |
parent | 365c421d1b56221bf8e174ff13b308b4e33a9809 (diff) | |
download | brdo-cee4af4b436df90424f209a60f6538a7de622f4b.tar.gz brdo-cee4af4b436df90424f209a60f6538a7de622f4b.tar.bz2 |
- Patch #522176 by espie, mikey_p: improved the error message that one gets when importing a translation file fails.
-rw-r--r-- | includes/locale.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/locale.inc b/includes/locale.inc index 9ca99b5be..4adbae975 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -1441,7 +1441,7 @@ function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NUL $header = _locale_import_parse_header($value['msgstr']); // Get the plural formula and update in database. - if (isset($header["Plural-Forms"]) && $p = _locale_import_parse_plural_forms($header["Plural-Forms"], $file->filename)) { + if (isset($header["Plural-Forms"]) && $p = _locale_import_parse_plural_forms($header["Plural-Forms"], $file->filepath)) { list($nplurals, $plural) = $p; db_update('languages') ->fields(array( @@ -1636,13 +1636,13 @@ function _locale_import_parse_header($header) { * * @param $pluralforms * A string containing the Plural-Forms entry - * @param $filename - * A string containing the filename + * @param $filepath + * A string containing the filepath * @return * An array containing the number of plurals and a * formula in PHP for computing the plural form */ -function _locale_import_parse_plural_forms($pluralforms, $filename) { +function _locale_import_parse_plural_forms($pluralforms, $filepath) { // First, delete all whitespace $pluralforms = strtr($pluralforms, array(" " => "", "\t" => "")); @@ -1669,7 +1669,7 @@ function _locale_import_parse_plural_forms($pluralforms, $filename) { return array($nplurals, $plural); } else { - drupal_set_message(t('The translation file %filename contains an error: the plural formula could not be parsed.', array('%filename' => $filename)), 'error'); + drupal_set_message(t('The translation file %filepath contains an error: the plural formula could not be parsed.', array('%filepath' => $filepath)), 'error'); return FALSE; } } |