From ebfbaa3fdae910594aed240ae9fc647c717b34ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= <gabor@hojtsy.hu>
Date: Fri, 28 Sep 2007 18:11:27 +0000
Subject: [PATCH] #179234 by myself: language code regular experssion was too
 greedy for simple langcode.po names

---
 modules/locale/locale.module | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 03e4fbfa0e1c..95d1fe9d395c 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -501,7 +501,7 @@ function _locale_batch_import($filepath, &$context) {
   include_once 'includes/locale.inc';
   // 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;
-- 
GitLab