TPAC: Decode translated strings into UTF8
authorDan Scott <dscott@laurentian.ca>
Fri, 20 Jul 2012 17:41:50 +0000 (13:41 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 24 Jul 2012 21:25:56 +0000 (17:25 -0400)
Without the _decode pragma, Locale::Maketext::Lexixcon did not
understand that it was being handed Unicode and generated some funky
output in the TPAC templates.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>

Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm

index 34bb486..71a520c 100644 (file)
@@ -284,6 +284,9 @@ sub load_locale_handlers {
             package OpenILS::WWW::EGWeb::I18N::$tag;
             use base 'OpenILS::WWW::EGWeb::I18N$parent_tag';
             if(\$messages) {
+                use Locale::Maketext::Lexicon {
+                    _decode => 1
+                };
                 use Locale::Maketext::Lexicon::Gettext;
                 if(open F, '$messages') {
                     our %Lexicon = (%Lexicon, %{ Locale::Maketext::Lexicon::Gettext->parse(<F>) });