From 5615a6ecc50206e5089ccc128ba0fc9ea7df04e0 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 18 May 2018 13:15:57 -0400 Subject: [PATCH] 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 --- Open-ILS/src/templates/staff/base_js.tt2 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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; +%] - + -- 2.43.2