[open-ils-commits] [GIT] Evergreen ILS branch master updated. 5615a6ecc50206e5089ccc128ba0fc9ea7df04e0
Evergreen Git
git at git.evergreen-ils.org
Mon Jul 30 14:16:16 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, master has been updated
via 5615a6ecc50206e5089ccc128ba0fc9ea7df04e0 (commit)
from 26581c762f386104c5002b68b9dd99fb0a68116e (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 5615a6ecc50206e5089ccc128ba0fc9ea7df04e0
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 11ec8ec..51d9c42 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',
@@ -56,7 +63,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>
<!-- IDL / opensrf (network) -->
-----------------------------------------------------------------------
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