You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Ryan Baxter (JIRA)" <ji...@apache.org> on 2012/05/30 14:46:30 UTC

[jira] [Updated] (SHINDIG-1743) gadgets.Prefs.getLang and .getCountry always return incorrect values

     [ https://issues.apache.org/jira/browse/SHINDIG-1743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan Baxter updated SHINDIG-1743:
---------------------------------

    Fix Version/s:     (was: 2.5.0)
                   2.5.0-beta2
    
> 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-beta1
>         Environment: Ubuntu 11.04, Firefox 10
>            Reporter: Michael Ahern
>             Fix For: 2.5.0-beta2
>
>
> 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