Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
Update Language Files
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Extensions
Update Language Files
Commits
04d71ee2
Commit
04d71ee2
authored
1 year ago
by
bgm
Committed by
Aegir user
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
getLastUpdateTime: use the first available non-en_US locale
parent
dfb9d112
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#1927
passed
1 year ago
Stage: test
Stage: prepare
Stage: release
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Uplang/Utils.php
+13
-1
13 additions, 1 deletion
CRM/Uplang/Utils.php
with
13 additions
and
1 deletion
CRM/Uplang/Utils.php
+
13
−
1
View file @
04d71ee2
...
...
@@ -34,9 +34,21 @@ class CRM_Uplang_Utils {
return
$l10n
;
}
public
static
function
getNonUSLocale
()
{
$locales
=
CRM_Core_I18n
::
uiLanguages
(
TRUE
);
foreach
(
$locales
as
$locale
)
{
if
(
$locale
!=
'en_US'
)
{
return
$locale
;
}
}
throw
new
Exception
(
E
::
ts
(
'Only en_US was found. Nothing to update.'
));
}
public
static
function
getLastUpdateTime
()
{
$l10n
=
CRM_Uplang_Utils
::
getDownloadDir
();
$locale
=
'fr_CA'
;
$locale
=
self
::
getNonUSLocale
()
;
$localFile
=
"
$l10n
/
$locale
/LC_MESSAGES/civicrm.mo"
;
$mtime
=
filemtime
(
$localFile
);
return
$mtime
;
...
...
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