[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. 29a7f6e3744b0daf3ba0e3c8f1ec8e5d0526c8e9
Evergreen Git
git at git.evergreen-ils.org
Mon Jul 30 14:16:56 EDT 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_3_0 has been updated
via 29a7f6e3744b0daf3ba0e3c8f1ec8e5d0526c8e9 (commit)
from bc754a2c0df22d9f98b406688bfa11ec972539b5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 29a7f6e3744b0daf3ba0e3c8f1ec8e5d0526c8e9
Author: Bill Erickson <berickxx at gmail.com>
Date: Fri May 18 13:15:57 2018 -0400
LP#1770973 Webstaff loads locale-specific IDL
Fetch the locale-specific version of the /IDL2js data so that IDL-based
labels in the UI may be correctly translated.
Signed-off-by: Bill Erickson <berickxx at gmail.com>
Signed-off-by: Garry Collum <gcollum at gmail.com>
diff --git a/Open-ILS/src/templates/staff/base_js.tt2 b/Open-ILS/src/templates/staff/base_js.tt2
index bc0a175..1feeef0 100644
--- a/Open-ILS/src/templates/staff/base_js.tt2
+++ b/Open-ILS/src/templates/staff/base_js.tt2
@@ -10,6 +10,13 @@ the UpUp resource list!
%]
+[%
+# $locale is encoded as aa_bb. The IDL needs aa-BB.
+SET idl_locale = '';
+IF ctx.locale;
+ idl_locale = ctx.locale.split('_').0 _ '-' _ ctx.locale.split('_').1.upper;
+END;
+%]
<script src="/upup.min.js"></script>
<script>
@@ -18,7 +25,7 @@ UpUp.start({
'cache-version': '[% USE date(format = '%Y-%m-%d'); date.format; %]',
'service-worker-url': '/upup.sw.min.js',
'assets': [
- '/IDL2js',
+ '/IDL2js?locale=[% idl_locale %]',
'[% ctx.media_prefix %]/js/ui/default/staff/build/css/bootstrap.min.css',
'[% ctx.media_prefix %]/js/ui/default/staff/build/css/hotkeys.min.css',
'[% ctx.media_prefix %]/js/ui/default/staff/build/css/ngToast.min.css',
@@ -91,7 +98,7 @@ UpUp.start({
});
</script>
-<script src="/IDL2js"></script>
+<script src="/IDL2js?locale=[% idl_locale %]"></script>
<script src="[% ctx.media_prefix %]/js/dojo/opensrf/md5.js"></script>
[% IF EXPAND_WEB_IMPORTS %]
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/templates/staff/base_js.tt2 | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list