gadgets.Prefs.getLang and .getCountry always return incorrect values
--------------------------------------------------------------------

                 Key: SHINDIG-1743
                 URL: https://issues.apache.org/jira/browse/SHINDIG-1743
             Project: Shindig
          Issue Type: Bug
          Components: Javascript 
    Affects Versions: 2.5.0
         Environment: Ubuntu 11.04, Firefox 10
            Reporter: Michael Ahern


In the gadget.Prefs section for setting the language, the language and country 
values are defined as strings:

var language = 'en';
var country = 'US';

And later on used as objects:

else if (i === 'country') {
  country[mid] = params[i];
} else if (i === 'lang') {
  language[mid] = params[i];
} 

Because the type was initialized as a string 'language[mid]' has no meaning and 
the value for langauge and country are never stored correctly.  This problem 
can easily be solved by initializing both variables as objects earlier like so:

var language = {};
language[mid] = 'en';
var country = {};
country[mid] = 'US';

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to