You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/09/10 23:41:46 UTC

[jira] [Commented] (CB-9409) getPreferredLanguage crashes with index out of range exception when currentLocale does not contain an '_'

    [ https://issues.apache.org/jira/browse/CB-9409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14739652#comment-14739652 ] 

ASF subversion and git services commented on CB-9409:
-----------------------------------------------------

Commit 1e6f24ee0b8ea7b6be593fb1c4ef5e2beb134698 in cordova-plugin-globalization's branch refs/heads/master from [~eymorale]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-globalization.git;h=1e6f24e ]

CB-9409 check that localeIdentifier has underscore

CB-9409 change the condition checking for underscore. This closes #39

github: close #39


> getPreferredLanguage crashes with index out of range exception when currentLocale does not contain an '_'
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: CB-9409
>                 URL: https://issues.apache.org/jira/browse/CB-9409
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Globalization
>         Environment: iOS
>            Reporter: Edna Morales
>            Assignee: Edna Morales
>            Priority: Minor
>
> the getPreferredLanguage function assumes that the returned value of [NSLocale localeIdentifier] contains an '_'. This may be true most of the time, but we have ran into issues where the localeIdentifier does not contain any underscores (could be due to an invalid region being returned?). In any case, we need to handle gracefully when there is no underscore present to avoid an index out of bounds exception



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org