{ "id": "107399", "key": "TIMOB-12457", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16586", "description": "Release 3.4.2", "name": "Release 3.4.2", "archived": false, "released": true, "releaseDate": "2017-03-11" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-11-10T21:35:37.000+0000", "created": "2013-01-05T09:04:06.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "locale", "module_locale" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "30637", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "117973", "key": "TIDOC-1221", "fields": { "summary": "Docs: getCurrentCountry() works on iOS", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "mdadu", "key": "mdadu", "displayName": "Muhammad Dadu", "active": false, "timeZone": "Europe/London" }, "updated": "2014-11-25T01:51:37.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h6.Ti.Locale issue\r\nTi.Locale is NOT working as expected after reading the doc.\r\n\r\nh6.Expected\r\ncurrentLocale and getCurrentLocale() to work like language i.e. http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Locale-method-getCurrentLocale\r\n\r\nh6.Repro sequence\r\n{code}\r\nTi.API.error(\"locale: \" + Ti.Locale.currentLocale);\r\nTi.API.error(\"country: \" + Ti.Locale.currentCountry);\r\nTi.API.error(\"language: \" + Ti.Locale.currentLanguage);\r\nTi.API.error(\"locale: \" + Ti.Locale.getCurrentLocale());\r\nTi.API.error(\"country: \" + Ti.Locale.getCurrentCountry());\r\nTi.API.error(\"language: \" + Ti.Locale.getCurrentLanguage());\r\n{code}\r\n\r\nh6.returns\r\n\r\n{code}\r\n[ERROR] locale: undefined\r\n[ERROR] country: undefined\r\n[ERROR] language: fr\r\n[ERROR] locale: fr-BE\r\n[ERROR] country: BE\r\n[ERROR] language: fr\r\n{code}\r\n\r\nh6.yet another console output\r\n{code}\r\n[ERROR] : \b\b \blocale: undefined\r\n[ERROR] : \b\b \bcountry: undefined\r\n[ERROR] : \b\b \blanguage: en\r\n[ERROR] : \b\b \blocale: en-US\r\n[ERROR] : \b\b \bcountry: US\r\n[ERROR] : \b\b \blanguage: en\r\n{code}\r\n\r\nI am not competent enough in objective-C and mobile SDK knowledge but the implementation of locale module here looks fishy to me (I would expect implementations for currentLocale and currentCountry). I tested w/ SDKs 1.8.2, 2.1.2.GA and 3.0.0.GA on Mac OSX for iOS.", "attachment": [], "flagged": false, "summary": "iOS: Ti.Locale.currentLocale and currentCountry issues", "creator": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium SDKs 1.8.2, 2.1.2.GA, 3.0.0.GA, 3.1.1.GA, 3.2 CI\r\niOS 5, 6\r\n", "closedSprints": [ { "id": 219, "state": "closed", "name": "2014 Sprint 19 SDK", "startDate": "2014-09-18T21:06:27.559Z", "endDate": "2014-09-27T00:00:00.000Z", "completeDate": "2014-09-29T13:58:58.022Z", "originBoardId": 114 }, { "id": 251, "state": "closed", "name": "2014 Sprint 23 SDK", "startDate": "2014-11-10T22:56:44.608Z", "endDate": "2014-11-22T01:00:00.000Z", "completeDate": "2014-11-22T05:03:36.553Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "245912", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \n\nTested with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 \nTitanium SDK version: 3.0.2 \niOS iPhone Simulator: iOS SDK version: 6.0", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-05T08:32:54.000+0000", "updated": "2013-04-05T08:32:54.000+0000" }, { "id": "285938", "author": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "body": "Issue reproduces.\r\n\r\nTested with Ti 3.2.0.GA :(", "updateAuthor": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "created": "2013-12-27T09:02:56.000+0000", "updated": "2013-12-27T09:02:56.000+0000" }, { "id": "302858", "author": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "body": "I have been working on a project for European Nordics markets and this method not working caused a lot of debugging and eventually having to concatenate my own version of this:\r\n\r\n{code:title=Locale.javascript|borderStyle=solid}\r\nCountries.getCurrentLocale = function(){\r\n var lang, country, locale;\r\n lang = Ti.Locale.getCurrentLanguage();\r\n country = Ti.Locale.getCurrentCountry();\r\n locale = lang +\"-\"+ country;\r\n return locale;\r\n};\r\n{code}\r\n\r\nIt most certainly has a bug - Ti.Locale.getCurrentLocale will return *en-US* no matter what the language/region configuration of the device. ", "updateAuthor": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "created": "2014-04-29T10:50:56.000+0000", "updated": "2014-04-29T10:50:56.000+0000" }, { "id": "324082", "author": { "name": "mdadu", "key": "mdadu", "displayName": "Muhammad Dadu", "active": false, "timeZone": "Europe/London" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/6106\r\n\r\nAdded the two missing properties to the SDK that were referenced in the docs.\r\n\r\nTesting sample code after implementation\r\n{code}\r\n[ERROR] locale: en-US\r\n[ERROR] country: US\r\n[ERROR] language: en\r\n[ERROR] locale: en-US\r\n[ERROR] country: US\r\n[ERROR] language: en\r\n{code}", "updateAuthor": { "name": "mdadu", "key": "mdadu", "displayName": "Muhammad Dadu", "active": false, "timeZone": "Europe/London" }, "created": "2014-09-16T22:16:33.000+0000", "updated": "2014-09-16T22:17:49.000+0000" }, { "id": "326971", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{code}\r\n[ERROR] : locale: undefined\r\n[ERROR] : country: undefined\r\n[ERROR] : language: en\r\n[ERROR] : locale: en-US\r\n[ERROR] : country: US\r\n[ERROR] : language: en\r\n{code}\r\n\r\nTested using\r\nMac osx 10.9.5 Mavericks\r\nAppcelerator Studio, build: 3.4.0.201409261245\r\nTitanium SDK, build: 3.4.1.v20141003114920\r\nacs@1.0.18\r\nalloy 1.5.1\r\ninstall@0.1.7\r\nnpm@1.4.23\r\nsudo@1.0.3\r\ntitanium 3.4.0\r\ntitanium-code-processor@1.1.1\r\nXcode6.1GM\r\nDevice:\r\niPhone 6 iOS 8.1\r\n\r\nClosing as fixed.", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-03T23:36:30.000+0000", "updated": "2014-10-03T23:38:14.000+0000" }, { "id": "331438", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR's merged\r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/6106\r\n3_4_X - https://github.com/appcelerator/titanium_mobile/pull/6331", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-11-10T21:35:37.000+0000", "updated": "2014-11-10T21:35:37.000+0000" }, { "id": "333536", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.10.1\r\nAppcelerator Studio, build: 3.4.1.201410281743\r\nTitanium SDK build: 3.5.0.v20141124114114, 3.6.0.v20141124111716\r\nTitanium CLI, build: 3.4.1\r\nAlloy: 1.5.1\r\nXcode 6.2 beta\r\niPhone 6 Plus (8.1), iPhone 6 Simulator (8.2)\r\n\r\nUsing the test case provided, built to both simulator and device and launched the app multiple times while changing the location and language in the settings.\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2014-11-25T01:48:58.000+0000", "updated": "2014-11-25T01:48:58.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }