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
c59a44e2
Commit
c59a44e2
authored
Jul 20, 2009
by
Dries Buytaert
Browse files
- Patch
#334283
by Gábor Hojtsy: fixed context bug.
parent
666a1797
Changes
2
Hide whitespace changes
Inline
Side-by-side
includes/locale.inc
View file @
c59a44e2
...
...
@@ -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
));
...
...
modules/locale/locale.test
View file @
c59a44e2
...
...
@@ -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;
...
...
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