From c21ad6192ea00305f5a293bf4917294bcf3213df Mon Sep 17 00:00:00 2001 From: Bill Erickson <berick@esilibrary.com> Date: Tue, 27 Mar 2012 10:25:36 -0400 Subject: [PATCH] Template processor always falls back to en_us When no locales are registered and/or when a given locale is missing a translation, fall back to en_us as the default locale. Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca> --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm | 4 ++-- 1 file changed, 2 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 afc50dc91d..66fb47ed6a 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm @@ -230,8 +230,8 @@ sub load_locale_handlers { my @locale_tags = sort { length($a) <=> length($b) } keys %locales; - # If no locales are defined, fall back to en_us so that at least 1 handler exists - push(@locale_tags, 'en_us') unless @registered_locales or @locale_tags; + # always fall back to en_us, the assumed template language + push(@locale_tags, 'en_us'); for my $idx (0..$#locale_tags) { -- 2.11.0