[open-ils-commits] [GIT] Evergreen ILS branch master updated. 0cc470d49fc4d41e49a9f6752120135af9ac6a8f
Evergreen Git
git at git.evergreen-ils.org
Wed Dec 19 09:56:35 EST 2012
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, master has been updated
via 0cc470d49fc4d41e49a9f6752120135af9ac6a8f (commit)
via dfe7598493edd0348045ed2a6cb26d10e95be99a (commit)
via 25e1b57aa03518edf86c2de9c15a1ab8b6d8c1d7 (commit)
from a51761578d5ffa187b28d433692734599b194ef2 (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 0cc470d49fc4d41e49a9f6752120135af9ac6a8f
Author: Dan Scott <dscott at laurentian.ca>
Date: Tue Dec 18 08:52:55 2012 -0500
Dojo IDL: Set the "Accept-Language" header
The internationalization support for /reports/fm_IDL.xml keys off of the
Accept-Language header - which, if not set to ^[a-z]{2}-[A-Z]{2}$, falls
back to en-US. Setting the header in the dojo.xhrGet() request makes
Apache able to serve up the right flavour of /reports/fm_IDL.xml
Signed-off-by: Dan Scott <dscott at laurentian.ca>
Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
diff --git a/Open-ILS/web/js/dojo/fieldmapper/IDL.js b/Open-ILS/web/js/dojo/fieldmapper/IDL.js
index 7efb967..8ccdca5 100644
--- a/Open-ILS/web/js/dojo/fieldmapper/IDL.js
+++ b/Open-ILS/web/js/dojo/fieldmapper/IDL.js
@@ -4,8 +4,7 @@ if(!dojo._hasResource["fieldmapper.IDL"]) {
dojo.provide("fieldmapper.IDL");
dojo.declare('fieldmapper.IDL', null, {
- _URL_PATH : '/reports/fm_IDL.xml', // XXX locale?
- // -- just need to set up xmlent and use '/reports/'+OpenSRF.locale+'/fm_IDL.xml'
+ _URL_PATH : '/reports/fm_IDL.xml',
NS_REPORTS : 'http://open-ils.org/spec/opensrf/IDL/reporter/v1',
NS_PERSIST : 'http://open-ils.org/spec/opensrf/IDL/persistence/v1',
NS_OBJ : 'http://open-ils.org/spec/opensrf/IDL/objects/v1',
@@ -56,6 +55,7 @@ if(!dojo._hasResource["fieldmapper.IDL"]) {
handleAs : 'xml',
sync : true,
timeout : 10000,
+ headers : {"Accept-Language": OpenSRF.locale},
load : function (response) {
self._parse(response);
fieldmapper.IDL.loaded = true;
commit dfe7598493edd0348045ed2a6cb26d10e95be99a
Author: Dan Scott <dscott at laurentian.ca>
Date: Tue Dec 18 07:39:18 2012 -0500
Set locale properly in Apache configuration
A RewriteCond only applies to the next RewriteRule, while our config was
attempting to apply multiple rules for a single condition. Fix that up
by using skip (S) rules to apply blocks of rules for the condition in
question.
Also, use the HTTP:Accept-Language value directly, rather than relying
on a backreference (which did not seem to be working as desired).
These fixes enable screens like the Register Patron interface to present
field labels from the IDL in the correct locale, whereas previously they
would always default to en-US.
Signed-off-by: Dan Scott <dscott at laurentian.ca>
Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
index 81903c9..b797832 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -216,19 +216,17 @@ RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ /opac/%1/extras/slimpa
# ----------------------------------------------------------------------------------
# Run server-side XUL and XHTML through xmlent to load the correct XML entities
# ----------------------------------------------------------------------------------
-RewriteCond %{HTTP:Accept-Language} ([a-z]{2}-[A-Z]{2})
-RewriteRule ^/xul/ - [E=locale:%1]
-RewriteRule ^/reports/ - [E=locale:%1]
-
+RewriteCond %{HTTP:Accept-Language} ^([a-z]{2}-[A-Z]{2})$
# Default to en-US if we haven't matched a locale of the form xx-YY
-RewriteCond %{HTTP:Accept-Language} !([a-z]{2}-[A-Z]{2})
-RewriteRule ^/xul/ - [E=locale:en-US]
-RewriteRule ^/reports/ - [E=locale:en-US]
-
-# Default to en-US if we are just given en
-RewriteCond %{ENV:locale} ^$ [OR]
-RewriteCond %{ENV:locale} ^en$
-RewriteRule . - [E=locale:en-US]
+RewriteRule .? - [S=4]
+RewriteRule ^/xul/ - [E=locale:en-US]
+RewriteRule ^/reports/ - [E=locale:en-US]
+RewriteRule .? - [E=locale:en-US]
+RewriteRule .? - [S=3]
+# Otherwise, set our real locale
+RewriteRule ^/xul/ - [E=locale:%{HTTP:Accept-Language}]
+RewriteRule ^/reports/ - [E=locale:%{HTTP:Accept-Language}]
+RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
<LocationMatch /xul/.*\.x?html$>
Options +Includes
commit 25e1b57aa03518edf86c2de9c15a1ab8b6d8c1d7
Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
Date: Sun Dec 2 22:49:42 2012 +0200
LP#1078596: Cannot translate strings handled by fieldmapper
Strings that should be translatable only show up in English,
for example in the Patron Registration screen.
There's a bug in the fieldmapper where it sets a variable to
an empty array, but later in the code only checks whether that
particular variable exists, not if it's an empty array.
Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
Signed-off-by: Dan Scott <dscott at laurentian.ca>
diff --git a/Open-ILS/web/js/dojo/fieldmapper/IDL.js b/Open-ILS/web/js/dojo/fieldmapper/IDL.js
index 9cc7a3c..7efb967 100644
--- a/Open-ILS/web/js/dojo/fieldmapper/IDL.js
+++ b/Open-ILS/web/js/dojo/fieldmapper/IDL.js
@@ -32,7 +32,7 @@ if(!dojo._hasResource["fieldmapper.IDL"]) {
window._preload_fieldmapper_IDL = null;
}
- if(!fieldmapper.IDL.fmclasses || (classlist && classlist.length)) {
+ if(!fieldmapper.IDL.fmclasses || !fieldmapper.IDL.fmclasses.length || (classlist && classlist.length)) {
var idl_url = this._URL_PATH;
if (classlist.length && (classlist.length > 1 || classlist[0] != '*')) {
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/examples/apache/eg_vhost.conf | 22 ++++++++++------------
Open-ILS/web/js/dojo/fieldmapper/IDL.js | 6 +++---
2 files changed, 13 insertions(+), 15 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list