From: Bill Erickson <berick@esilibrary.com>
Date: Tue, 27 Mar 2012 14:25:36 +0000 (-0400)
Subject: Template processor always falls back to en_us
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c21ad6192ea00305f5a293bf4917294bcf3213df;p=evergreen%2Fmasslnc.git

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>
---

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) {