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
7b58a06d
Verified
Commit
7b58a06d
authored
4 weeks ago
by
Dave Long
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3478408
by jaydev bhatt, quietone, goonerw: Fix errors in update-countries.sh
(cherry picked from commit
61dfd43e
)
parent
2e5c2144
No related branches found
No related tags found
1 merge request
!12235
3526426-warning-for-missing
Pipeline
#487928
canceled
4 weeks ago
Stage: 🪄 Lint
Stage: 🗜️ Test
Pipeline: drupal
#487931
Changes
1
Pipelines
10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/scripts/update-countries.sh
+11
-1
11 additions, 1 deletion
core/scripts/update-countries.sh
with
11 additions
and
1 deletion
core/scripts/update-countries.sh
+
11
−
1
View file @
7b58a06d
...
...
@@ -35,6 +35,16 @@
exit
(
'CLDR data file not found. ('
.
$uri
.
")
\n\n
"
.
$usage
.
"
\n
"
)
;
}
// Fake the t
()
function
used
in
CountryManager.php instead of attempting a full
// Drupal bootstrap of core/includes/bootstrap.inc
(
where t
()
is declared
)
.
if
(!
function_exists
(
't'
))
{
function
t
(
$string
)
: string
{
return
$string
;
}
}
// Read
in
existing codes.
// @todo Allow to remove previously existing country codes.
// @see https://www.drupal.org/node/1436754
...
...
@@ -93,7 +103,7 @@
foreach
(
$countries
as
$code
=>
$name
)
{
// For .po translation file
's sake, use double-quotes instead of escaped
// single-quotes.
$name = str_contains($name, '
\'
' ? '
"' .
$name
. '"
' : "'
" .
$name
. "
'"
)
;
$name = str_contains($name, '
\'
'
)
? '
"' .
$name
. '"
' : "'
" .
$name
. "
'";
$out .= '
' . var_export($code, TRUE) . '
=>
t
(
' . $name . '
)
,
' . "\n";
}
...
...
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