[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. d73230bdb66a2465ff4faeef222dd3fa8366aa0b

Evergreen Git git at git.evergreen-ils.org
Mon Jul 30 14:16:37 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_1 has been updated
       via  d73230bdb66a2465ff4faeef222dd3fa8366aa0b (commit)
      from  9689fc182c45921f1401e0968f37848f90bc2ea8 (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 d73230bdb66a2465ff4faeef222dd3fa8366aa0b
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 e2e88de..78e3769 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