Commit ebfbaa3f authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#179234 by myself: language code regular experssion was too greedy for simple langcode.po names

parent b03af772
......@@ -501,7 +501,7 @@ function _locale_batch_import($filepath, &$context) {
include_once 'includes/';
// The filename is either {langcode}.po or {prefix}.{langcode}.po, so
// we can extract the language code to use for the import from the end.
if (preg_match('!(/|\.)([^\.]+)\.po$!', $filepath, $langcode)) {
if (preg_match('!(/|\.)([^\./]+)\.po$!', $filepath, $langcode)) {
$file = (object) array('filename' => basename($filepath), 'filepath' => $filepath);
_locale_import_read_po('db-store', $file, LOCALE_IMPORT_KEEP, $langcode[2]);
$context['results'][] = $filepath;
Supports Markdown
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