From 677374dcf6260a9ed897916c1073769b9340cba8 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 10 Sep 2013 15:08:46 -0400 Subject: [PATCH] Pass EG-compliant locale string to TT context And set the IDL2js locale value to the eg_locale for staff web UIs. Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm | 4 +++- Open-ILS/src/templates/base.tt2 | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm index e5d5bb280a..1bf19c12cc 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm @@ -173,7 +173,9 @@ sub load_context { parse_accept_lang($r->headers_in->get('Accept-Language')); # set the editor default locale for each page load - $OpenILS::Utils::CStoreEditor::default_locale = parse_eg_locale($ctx->{locale}); + $ctx->{eg_locale} = parse_eg_locale($ctx->{locale}); + $OpenILS::Utils::CStoreEditor::default_locale = $ctx->{eg_locale}; + my $mprefix = $ctx->{media_prefix}; if($mprefix and $mprefix !~ /^http/ and $mprefix !~ /^\//) { diff --git a/Open-ILS/src/templates/base.tt2 b/Open-ILS/src/templates/base.tt2 index efdee63755..0ed51d93e6 100644 --- a/Open-ILS/src/templates/base.tt2 +++ b/Open-ILS/src/templates/base.tt2 @@ -5,7 +5,7 @@ - + -- 2.11.0