? modules/locale/.svn ? modules/locale/tests/.svn ? modules/locale/tests/translations/.svn Index: includes/locale.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/locale.inc,v retrieving revision 1.258 diff -u -p -r1.258 locale.inc --- includes/locale.inc 30 Jul 2010 02:47:27 -0000 1.258 +++ includes/locale.inc 11 Aug 2010 14:38:23 -0000 @@ -526,7 +526,7 @@ function _locale_import_read_po($op, $fi $context = "MSGID_PLURAL"; } elseif (!strncmp("msgid", $line, 5)) { - if ($context == "MSGSTR") { // End current entry, start a new one + if (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) { // End current entry, start a new one _locale_import_one_string($op, $current, $mode, $lang, $file, $group); $current = array(); } @@ -544,7 +544,7 @@ function _locale_import_read_po($op, $fi $context = "MSGID"; } elseif (!strncmp("msgctxt", $line, 7)) { - if ($context == "MSGSTR") { // End current entry, start a new one + if (($context == "MSGSTR") || ($context == "MSGSTR_ARR")) { // End current entry, start a new one _locale_import_one_string($op, $current, $mode, $lang, $file, $group); $current = array(); } Index: modules/locale/locale.test =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.test,v retrieving revision 1.74 diff -u -p -r1.74 locale.test --- modules/locale/locale.test 30 Jul 2010 01:52:54 -0000 1.74 +++ modules/locale/locale.test 11 Aug 2010 14:38:23 -0000 @@ -611,7 +611,7 @@ class LocaleImportFunctionalTest extends $this->assertRaw(t('The language %language has been created.', array('%language' => 'French')), t('The language has been automatically created.')); // The import should have created 7 strings. - $this->assertRaw(t('The translation was successfully imported. There are %number newly created translated strings, %update strings were updated and %delete strings were removed.', array('%number' => 7, '%update' => 0, '%delete' => 0)), t('The translation file was successfully imported.')); + $this->assertRaw(t('The translation was successfully imported. There are %number newly created translated strings, %update strings were updated and %delete strings were removed.', array('%number' => 9, '%update' => 0, '%delete' => 0)), t('The translation file was successfully imported.')); // This import should have saved plural forms to have 2 variants. $this->assert(db_query("SELECT plurals FROM {languages} WHERE language = 'fr'")->fetchField() == 2, t('Plural number initialized.')); @@ -778,6 +778,11 @@ msgstr "" "Content-Transfer-Encoding: 8bit\\n" "Plural-Forms: nplurals=2; plural=(n > 1);\\n" +msgid "One sheep" +msgid_plural "@count sheep" +msgstr[0] "un mouton" +msgstr[1] "@count moutons" + msgid "Monday" msgstr "lundi" @@ -1989,4 +1994,3 @@ class LocaleDateFormatsFunctionalTest ex $this->assertText($french_date, t('French date format appears')); } } -