Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
2c994156
Commit
2c994156
authored
12 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1808374
by SebCorbin: Fixed Wrong plural for french in locale tests.
parent
594be7b5
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/modules/locale/lib/Drupal/locale/Tests/LocalePluralFormatTest.php
+6
-6
6 additions, 6 deletions
...locale/lib/Drupal/locale/Tests/LocalePluralFormatTest.php
with
6 additions
and
6 deletions
core/modules/locale/lib/Drupal/locale/Tests/LocalePluralFormatTest.php
+
6
−
6
View file @
2c994156
...
...
@@ -74,7 +74,7 @@ function testGetPluralFormat() {
1
=>
'@count hours'
,
),
'fr'
=>
array
(
0
=>
'
1
heure'
,
0
=>
'
@count
heure'
,
1
=>
'@count heures'
,
),
'hr'
=>
array
(
...
...
@@ -153,7 +153,7 @@ function testPluralEditExport() {
// Ensure our imported translations exist in the file.
$this
->
assertRaw
(
"msgid
\"
Monday
\"\n
msgstr
\"
lundi
\"
"
,
t
(
'French translations present in exported file.'
));
// Check for plural export specifically.
$this
->
assertRaw
(
"msgid
\"
1 hour
\"\n
msgid_plural
\"
@count hours
\"\n
msgstr[0]
\"
1
heure
\"\n
msgstr[1]
\"
@count heures
\"
"
,
t
(
'Plural translations exported properly.'
)
)
;
$this
->
assertRaw
(
"msgid
\"
1 hour
\"\n
msgid_plural
\"
@count hours
\"\n
msgstr[0]
\"
@count
heure
\"\n
msgstr[1]
\"
@count heures
\"
"
,
'Plural translations exported properly.'
);
// Get the Croatian translations.
$this
->
drupalPost
(
'admin/config/regional/translate/export'
,
array
(
...
...
@@ -196,13 +196,13 @@ function testPluralEditExport() {
);
$this
->
drupalPost
(
'admin/config/regional/translate/translate'
,
$search
,
t
(
'Filter'
));
// Plural values for the langcode fr.
$this
->
assertText
(
'
1
heure'
);
$this
->
assertText
(
'
@count
heure'
);
$this
->
assertText
(
'@count heures'
);
$this
->
assertNoText
(
'2. plural form'
);
// Edit langcode fr translations and see if that took effect.
$edit
=
array
(
'strings[10][translations][0]'
=>
'
1
heure edited'
,
'strings[10][translations][0]'
=>
'
@count
heure edited'
,
);
$this
->
drupalPost
(
$path
,
$edit
,
t
(
'Save translations'
));
...
...
@@ -245,7 +245,7 @@ function testPluralEditExport() {
'langcode'
=>
'fr'
,
),
t
(
'Export'
));
// Check for plural export specifically.
$this
->
assertRaw
(
"msgid
\"
1 hour
\"\n
msgid_plural
\"
@count hours
\"\n
msgstr[0]
\"
1
heure edited
\"\n
msgstr[1]
\"
@count heures
\"
"
,
t
(
'Edited French plural translations for hours exported properly.'
)
)
;
$this
->
assertRaw
(
"msgid
\"
1 hour
\"\n
msgid_plural
\"
@count hours
\"\n
msgstr[0]
\"
@count
heure edited
\"\n
msgstr[1]
\"
@count heures
\"
"
,
'Edited French plural translations for hours exported properly.'
);
$this
->
assertRaw
(
"msgid
\"
1 day
\"\n
msgid_plural
\"
@count days
\"\n
msgstr[0]
\"
1 jour
\"\n
msgstr[1]
\"
@count jours
\"
"
,
t
(
'Added French plural translations for days exported properly.'
));
// Get the Croatian translations.
...
...
@@ -288,7 +288,7 @@ function getPoFileWithSimplePlural() {
msgid
"1 hour"
msgid_plural
"@count hours"
msgstr
[
0
]
"
1
heure"
msgstr
[
0
]
"
@count
heure"
msgstr
[
1
]
"@count heures"
msgid
"Monday"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment