LP#1078596: Cannot translate strings handled by fieldmapper
authorPasi Kallinen <pasi.kallinen@pttk.fi>
Sun, 2 Dec 2012 20:49:42 +0000 (22:49 +0200)
committerDan Scott <dscott@laurentian.ca>
Wed, 19 Dec 2012 14:55:58 +0000 (09:55 -0500)
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@pttk.fi>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/web/js/dojo/fieldmapper/IDL.js

index 9cc7a3c..7efb967 100644 (file)
@@ -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] != '*')) {