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=5615a6ecc50206e5089ccc128ba0fc9ea7df04e0;p=contrib%2FConifer.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 11ec8ec1d1..51d9c42dc0 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; +%] - +