Template processor always falls back to en_us
authorBill Erickson <berick@esilibrary.com>
Tue, 27 Mar 2012 14:25:36 +0000 (10:25 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 27 Mar 2012 18:04:57 +0000 (14:04 -0400)
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

index afc50dc..66fb47e 100644 (file)
@@ -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) {