Commit c59a44e2 authored by Dries's avatar Dries

- Patch #334283 by Gábor Hojtsy: fixed context bug.

parent 666a1797
......@@ -1298,7 +1298,7 @@ function _locale_import_read_po($op, $file, $mode = NULL, $lang = NULL, $group =
$current = array();
}
elseif (!empty($current["msgctxt"])) { // Already in this context? Parse error
_locale_import_message('The translation file %filename contains an error: "msgctxt" is unexpected on line %line.', $file, lineno);
_locale_import_message('The translation file %filename contains an error: "msgctxt" is unexpected on line %line.', $file, $lineno);
return FALSE;
}
$line = trim(substr($line, 7));
......
......@@ -689,7 +689,7 @@ class LocaleImportFunctionalTest extends DrupalWebTestCase {
));
$this->assertIdentical(t('May', array(), array('langcode' => 'hr', 'context' => 'Long month name')), 'Svibanj', t('Long month name context is working.'));
$this->assertIdentical(t('May', array(), array('langcode' => 'hr', 'context' => 'Short month name')), 'Svi.', t('Short month name context is working.'));
$this->assertIdentical(t('May', array(), array('langcode' => 'hr')), 'Svi.', t('Default context is working.'));
}
/**
......@@ -810,7 +810,6 @@ msgctxt "Long month name"
msgid "May"
msgstr "Svibanj"
msgctxt "Short month name"
msgid "May"
msgstr "Svi."
EOF;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment