From: Bill Erickson Date: Fri, 18 May 2018 17:15:57 +0000 (-0400) Subject: LP#1770973 Webstaff loads locale-specific IDL X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=29a7f6e3744b0daf3ba0e3c8f1ec8e5d0526c8e9;p=working%2FEvergreen.git 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 Signed-off-by: Garry Collum --- diff --git a/Open-ILS/src/templates/staff/base_js.tt2 b/Open-ILS/src/templates/staff/base_js.tt2 index bc0a1754e5..1feeef01b2 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; +%] - + [% IF EXPAND_WEB_IMPORTS %]