Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
ebfbaa3f
Commit
ebfbaa3f
authored
Sep 28, 2007
by
Gábor Hojtsy
Browse files
#179234
by myself: language code regular experssion was too greedy for simple langcode.po names
parent
b03af772
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/locale/locale.module
View file @
ebfbaa3f
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment