[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. a63ef776e349a359a58d84d6b5fdf3e719cb627f

Evergreen Git git at git.evergreen-ils.org
Mon Aug 5 10:52:41 EDT 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_3_1 has been updated
       via  a63ef776e349a359a58d84d6b5fdf3e719cb627f (commit)
      from  9dc1d022b48ec9c67dfb6cd1766f9637ede0e205 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a63ef776e349a359a58d84d6b5fdf3e719cb627f
Author: Jane Sandberg <sandbej at linnbenton.edu>
Date:   Mon Jul 29 11:56:31 2019 -0700

    LP1802593: Correct formatting of language code in Angularjs, KPAC
    
    EgWeb offers two different formats of the current locale: ctx.locale and
    ctx.eg_locale.  This commit configures the lang attribute in AngularJS
    staff client, OPAC, and KPAC to use eg_locale, since it has the
    appropriate format (e.g. en-US, fr-CA).
    
    Also adds some tests for EgWeb's handling of language codes.
    
    Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/perlmods/t/15-OpenILS-WWW.t b/Open-ILS/src/perlmods/t/15-OpenILS-WWW.t
index d55e809519..f78a4fa4a8 100644
--- a/Open-ILS/src/perlmods/t/15-OpenILS-WWW.t
+++ b/Open-ILS/src/perlmods/t/15-OpenILS-WWW.t
@@ -1,6 +1,6 @@
 #!perl -T
 
-use Test::More tests => 9;
+use Test::More tests => 11;
 
 use_ok( 'OpenILS::WWW::BadDebt' );
 use_ok( 'OpenILS::WWW::EGWeb' );
@@ -11,3 +11,6 @@ use_ok( 'OpenILS::WWW::Redirect' );
 use_ok( 'OpenILS::WWW::TemplateBatchBibUpdate' );
 use_ok( 'OpenILS::WWW::Vandelay' );
 use_ok( 'OpenILS::WWW::XMLRPCGateway' );
+
+is( OpenILS::WWW::EGWeb::parse_eg_locale('hy_am'), 'hy-AM', 'correctly formatted Armenian language code' );
+is( OpenILS::WWW::EGWeb::parse_eg_locale(), 'en-US', 'correctly formatted default language code' );
diff --git a/Open-ILS/src/templates/base.tt2 b/Open-ILS/src/templates/base.tt2
index a6f4b8c8bb..ee988bb312 100644
--- a/Open-ILS/src/templates/base.tt2
+++ b/Open-ILS/src/templates/base.tt2
@@ -1,5 +1,5 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
+<html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.eg_locale %]' xml:lang='[% ctx.eg_locale %]'>
     <head>
         <title>[% ctx.page_title %]</title>
         <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
diff --git a/Open-ILS/src/templates/kpac/parts/base.tt2 b/Open-ILS/src/templates/kpac/parts/base.tt2
index 94364c643b..4711c3f73a 100644
--- a/Open-ILS/src/templates/kpac/parts/base.tt2
+++ b/Open-ILS/src/templates/kpac/parts/base.tt2
@@ -1,5 +1,5 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
+<html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.eg_locale %]' xml:lang='[% ctx.eg_locale %]'>
     <head>
         <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
         <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/default/kpac/style.css[% ctx.cache_key %]" />
diff --git a/Open-ILS/src/templates/opac/parts/base.tt2 b/Open-ILS/src/templates/opac/parts/base.tt2
index aa12e39ebe..b28f45ceb8 100644
--- a/Open-ILS/src/templates/opac/parts/base.tt2
+++ b/Open-ILS/src/templates/opac/parts/base.tt2
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang='[% ctx.locale.replace('_', '-') %]'>
+<html lang='[% ctx.eg_locale %]'>
     <head prefix="og: http://ogp.me/ns#">
         <meta charset="utf-8" />
         <meta http-equiv="X-UA-Compatible" content="IE=edge" />
diff --git a/Open-ILS/src/templates/staff/base.tt2 b/Open-ILS/src/templates/staff/base.tt2
index 7ce42ae73f..78b393b37f 100644
--- a/Open-ILS/src/templates/staff/base.tt2
+++ b/Open-ILS/src/templates/staff/base.tt2
@@ -1,6 +1,6 @@
 <!doctype html>
 [%- PROCESS 'staff/config.tt2' %]
-<html lang="[% ctx.locale %]"
+<html lang="[% ctx.eg_locale %]"
     [%- IF ctx.page_app %] ng-app="[% ctx.page_app %]"[% END -%]
     [%- IF ctx.page_ctrl %] ng-controller="[% ctx.page_ctrl %]"[% END %]>
   <head>

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/perlmods/t/15-OpenILS-WWW.t   | 5 ++++-
 Open-ILS/src/templates/base.tt2            | 2 +-
 Open-ILS/src/templates/kpac/parts/base.tt2 | 2 +-
 Open-ILS/src/templates/opac/parts/base.tt2 | 2 +-
 Open-ILS/src/templates/staff/base.tt2      | 2 +-
 5 files changed, 8 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list