{ "id": "64663", "key": "TIMOB-3639", "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": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2015-12-30T07:24:34.000+0000", "created": "2011-04-21T11:27:03.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2016-09-08T12:21:22.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" }, { "id": "10207", "name": "Tooling" } ], "description": "Our internationalization facilities for Chinese localizations has a problem where the required naming conventions for the folders in the i18n directory are different for one platform versus the other.\r\n\r\nThe example that was brought to my attention required the following set up for iOS:\r\n\r\n/i18n\r\n /zh-Hant\r\n /zh-Hans\r\n\r\nand the following setup for Android\r\n\r\n/i18n\r\n /zh-rTW\r\n /zh-rCN\r\n\r\nWhen trying to use the iOS configuration for Android, the Python build scripts report an error that the \"resource directory name is invalid\". Both configurations work on their platforms, but not when tested on the other platform. It's a major problem for localizations in East Asian markets.", "attachment": [ { "id": "50948", "filename": "Chinese.zip", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-03T11:29:40.000+0000", "size": 3311829, "mimeType": "application/zip" }, { "id": "18378", "filename": "TiBountyHunter220.zip", "author": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-21T11:58:36.000+0000", "size": 2771471, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android and iOS: Localization issues for Chinese dialects", "creator": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "environment": "Android 4.4, iOS 8.1", "closedSprints": [ { "id": 536, "state": "closed", "name": "2015 Sprint 25 SDK", "startDate": "2015-12-05T01:30:40.415Z", "endDate": "2015-12-19T01:30:00.000Z", "completeDate": "2015-12-29T03:19:42.127Z", "originBoardId": 114 }, { "id": 345, "state": "closed", "name": "2015 Sprint 04 SDK", "startDate": "2015-02-14T01:00:53.297Z", "endDate": "2015-03-01T01:00:00.000Z", "completeDate": "2015-02-28T15:39:43.652Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "162069", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It looks like zh-Hant and zh-Hans locales aren't supported by Android, so I'm not sure that anything can be done on the Android side. Have you tried using zh-TW / zh-CN (without the \"r\" prefix) on both, to see if that fixes the problem?", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-05T18:16:51.000+0000", "updated": "2011-08-05T18:16:51.000+0000" }, { "id": "163645", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving forward to 1.9.0 TBS, workaround should exist (see comments), and there isn't a clear path of support from Android for the alternative locales", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-22T12:16:02.000+0000", "updated": "2011-08-22T12:16:02.000+0000" }, { "id": "166294", "author": { "name": "bdurette", "key": "bdurette", "displayName": "Brandon DuRette", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It would be nice if the build tools simply ignored (or perhaps issued a warning) about i18n directories that it does not understand rather than failing outright. This would at least allow for a single project to include zh-hans and zh-rcn and not have it fail to build. \r\n\r\nThe workaround suggested above (zh-CN) does not work. Works fine on Android, but not in iOS.", "updateAuthor": { "name": "bdurette", "key": "bdurette", "displayName": "Brandon DuRette", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-16T14:25:09.000+0000", "updated": "2011-09-16T14:25:09.000+0000" }, { "id": "231024", "author": { "name": "mark.henderson@snagr.co.uk", "key": "mark.henderson@snagr.co.uk", "displayName": "Mark Henderson", "active": true, "timeZone": "Europe/London" }, "body": "Can I champion this issue.. It seems straight forward that any build script simply ignore unsupported folder names.. At the moment I'm in a non-cross-platform compliant project situation because my app supports chinese localisation? I'm going to have to swap the folders out each time I want to build?", "updateAuthor": { "name": "mark.henderson@snagr.co.uk", "key": "mark.henderson@snagr.co.uk", "displayName": "Mark Henderson", "active": true, "timeZone": "Europe/London" }, "created": "2012-12-12T12:15:53.000+0000", "updated": "2012-12-12T12:15:53.000+0000" }, { "id": "236014", "author": { "name": "eric-hu", "key": "eric-hu", "displayName": "Eric Hu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Even nicer would be if a build script allowed one folder to be used for ios/android, perhaps with symlinking or setting config flags on the iOS/Android side", "updateAuthor": { "name": "eric-hu", "key": "eric-hu", "displayName": "Eric Hu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-25T21:45:18.000+0000", "updated": "2013-01-25T21:45:18.000+0000" }, { "id": "238812", "author": { "name": "sevenbai", "key": "sevenbai", "displayName": "Seven Bai", "active": true, "timeZone": "Asia/Taipei" }, "body": "I tried to modify Titanium Mobile SDK build script, localecompiler.py, as below and it works (tested on SDK 3.0.2).\r\n{code}\r\ndef compile_for_ios(self,file):\r\n locale = self.get_locale(file)\r\n> if locale == 'zh-TW': locale = 'zh-Hant'\r\n> if locale == 'zh-CN': locale = 'zh-Hans'\r\n build_dir = self.get_ios_dir()\r\n{code}\r\nHopefully this issue can be fixed officially by Appcelerator soon.", "updateAuthor": { "name": "sevenbai", "key": "sevenbai", "displayName": "Seven Bai", "active": true, "timeZone": "Asia/Taipei" }, "created": "2013-02-18T08:01:07.000+0000", "updated": "2013-02-18T09:11:38.000+0000" }, { "id": "238813", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "we need to re-test with the new CLI / 3.0.2 release.", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-02-18T08:56:00.000+0000", "updated": "2013-02-18T08:56:00.000+0000" }, { "id": "238814", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "@Steven Bai -- i'm not sure that localecompiler.py is used in 3.0.2 since we are now using the new CLI project at http://github.com/appcelerator/titanium and for iphone and the ios build script for locale is at https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/commands/_build.js#L1818.\n\n", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-02-18T09:16:14.000+0000", "updated": "2013-02-18T09:16:14.000+0000" }, { "id": "238815", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "localecompiler.py is still used by Android's build script. iOS and Mobile Web use the new i18n mechanism.\n\nWe need to gather some data about the various platform's Chinese dialect names. I'm concerned that the fix forces the locale to \"zh-Hant\" when Marshall's first comments says it doesn't look like Android supports zh-Hant.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-02-18T09:30:13.000+0000", "updated": "2013-02-18T09:30:13.000+0000" }, { "id": "238821", "author": { "name": "sevenbai", "key": "sevenbai", "displayName": "Seven Bai", "active": true, "timeZone": "Asia/Taipei" }, "body": "@Jeff Haynie - My fault! You are right, I tested my above solution in 2.1.4 instead of 3.x. For 3.x, it can be solved by similar approach - create .lproj with correct file name, and it works too.\r\n@Chris Barber - Agree, it is better to gather and handle all the difference between these platforms inside Titanium Mobile SDK, and define a uniform rule for Titanium Mobile SDK user.", "updateAuthor": { "name": "sevenbai", "key": "sevenbai", "displayName": "Seven Bai", "active": true, "timeZone": "Asia/Taipei" }, "created": "2013-02-18T15:34:46.000+0000", "updated": "2013-02-18T15:34:46.000+0000" }, { "id": "285674", "author": { "name": "calebcox314", "key": "calebcox314", "displayName": "Caleb Cox", "active": true, "timeZone": "America/Chicago" }, "body": "With Titanium SDK 3.2.0, I found that using zh-rCN works on both iOS and Android.", "updateAuthor": { "name": "calebcox314", "key": "calebcox314", "displayName": "Caleb Cox", "active": true, "timeZone": "America/Chicago" }, "created": "2013-12-23T20:43:06.000+0000", "updated": "2013-12-23T20:43:06.000+0000" }, { "id": "303191", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Need more information before we are able to prioritize properly.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-01T17:35:25.000+0000", "updated": "2014-05-01T17:35:25.000+0000" }, { "id": "321551", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Locale strings for Chinese simplified and Chinese traditional work on Android. I have used the folder names 'zh-rCN' for Simplified Chinese and 'zh-rTW' for Traditional Chinese. Attached Sample \"Chinese.zip\" for verification.\r\n\r\nTitanium Command-Line Interface, CLI version 3.3.0, Titanium SDK version 3.3.0.GA, Xperia Play device with Android 4.0.4 (API level 14) \r\n\r\n{code}\r\n//Sample Code:\r\nvar str = Ti.Locale.getString('holiday_greeting');\r\nalert(str);\r\nalert(Ti.Locale.getCurrentLanguage());\r\n//Output:\r\n[INFO] : ALERT: (KrollRuntimeThread) [241,241] 新年快乐!\r\n[INFO] : ALERT: (KrollRuntimeThread) [0,241] zh\r\n{code}", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-03T11:29:14.000+0000", "updated": "2014-09-03T11:29:14.000+0000" }, { "id": "334112", "author": { "name": "buddyguards", "key": "buddyguards", "displayName": "grebulon", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "There's a suggested fix at [the support site|https://developer.appcelerator.com/question/148383/language-code-if-include-country-code#answer-257000].\r\n\r\nPersonally, I think it's about time to fix this...", "updateAuthor": { "name": "buddyguards", "key": "buddyguards", "displayName": "grebulon", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2014-12-01T11:47:30.000+0000", "updated": "2014-12-01T11:47:30.000+0000" }, { "id": "345221", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The android system is pretty simple as explained here\r\nhttp://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources\r\n\r\nThe language is defined by a two-letter ISO 639-1 language code, optionally followed by a two letter ISO 3166-1-alpha-2 region code (preceded by lowercase \"r\"). \r\n\r\niOS seems to be all over the place. Following standards when possible otherwise doing their own thing. \r\n\r\nFor example chinese in Taiwan would be zh-rTW on Android. On iOS according to xcode settings it would be zh-Hant-TW.(Traditional chinese taiwan)\r\niOS also seems to support non ISO 639-1 language codes.\r\n\r\nOne thing me might do is restrict the i18n folder to only allow ISO 639-1 language codes.\r\n\r\nThen allow region specific localization strings in the platform specific folder under Resources//i18n. \r\n\r\nOr we could allow the Android standard in i18N(without the r prefix) and also allow platform specific localization stings under Resources//i18n.\r\n", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-03-05T23:00:30.000+0000", "updated": "2015-03-12T19:06:47.000+0000" }, { "id": "345872", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Everyone, to confirm, the workaround specified https://developer.appcelerator.com/question/148383/language-code-if-include-country-code#answer-257000 does NOT work?\r\n\r\nAlso, I'd like to know if there is a preference based on Vishal's suggestions.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-03-12T19:07:14.000+0000", "updated": "2015-03-12T19:07:14.000+0000" }, { "id": "345953", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this to 4.1.0 while we await feedback. If we can find an appropriate workaround or solution before then, we will release in a patch update.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-03-13T16:32:29.000+0000", "updated": "2015-03-13T16:32:29.000+0000" }, { "id": "351788", "author": { "name": "Cryde", "key": "cryde", "displayName": "Jérémy Tonneau", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi,\r\n\r\nAny news on this ?\r\nIs it not possible to backport this feature in 3.5.2 for instance ?\r\n\r\nThanks !", "updateAuthor": { "name": "Cryde", "key": "cryde", "displayName": "Jérémy Tonneau", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-06T11:41:36.000+0000", "updated": "2015-05-06T11:41:36.000+0000" }, { "id": "351821", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~Cryde] I asked if the workaround continued to work. Does it?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-06T17:13:00.000+0000", "updated": "2015-05-06T17:13:00.000+0000" }, { "id": "355469", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Still awaiting feedback. Moving to 4.1.1 while we wait.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-18T15:45:53.000+0000", "updated": "2015-06-18T15:45:53.000+0000" }, { "id": "360031", "author": { "name": "mark.henderson@snagr.co.uk", "key": "mark.henderson@snagr.co.uk", "displayName": "Mark Henderson", "active": true, "timeZone": "Europe/London" }, "body": "To confirm the workaround specified above will NOT work. The function compileI18N has changed significantly in the 2 years since it was first proposed.\r\n\r\nAlso to add, a lot of Android device manufacturers put in extra localisations into their devices. For example I have a client who can choose Hong Kong Chinese as an option on a standard Samsung tablet device. The only way Traditional Chinese will work with my app is if they change the device to Taiwan Chinese (again another localisation not supported natively by Android).\r\n\r\nSee [here|http://stackoverflow.com/a/4250246/181197]", "updateAuthor": { "name": "mark.henderson@snagr.co.uk", "key": "mark.henderson@snagr.co.uk", "displayName": "Mark Henderson", "active": true, "timeZone": "Europe/London" }, "created": "2015-08-17T08:05:59.000+0000", "updated": "2015-08-17T08:05:59.000+0000" }, { "id": "363857", "author": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I use zh_TW for iOS. Today I found that when building for Android, there is no longer an error! What happened?\r\n\r\nSDK 4.1.1", "updateAuthor": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-14T23:30:23.000+0000", "updated": "2015-09-14T23:30:23.000+0000" }, { "id": "367044", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Can other users confirm this?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-10-16T22:51:16.000+0000", "updated": "2015-10-16T22:51:16.000+0000" }, { "id": "372957", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "Using zh_TW did work on iOS and Android. \r\n\r\nAppcelerator Studio build: 4.4.0.201511241829\r\nCLI: 5.1.0\r\niOS: 9.1\r\nAndroid: 5.1.1", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-12-15T04:26:20.000+0000", "updated": "2015-12-15T04:29:45.000+0000" }, { "id": "373250", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "I can't reproduce this.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-12-17T19:50:51.000+0000", "updated": "2015-12-17T19:50:51.000+0000" }, { "id": "395576", "author": { "name": "mark.henderson@snagr.co.uk", "key": "mark.henderson@snagr.co.uk", "displayName": "Mark Henderson", "active": true, "timeZone": "Europe/London" }, "body": "I got this when submitting to Apple:\r\n\r\nUnrecognized Locale -\r\nThe directory located at ( 'Payload/YouRApp.app/zh-rCN.lproj' ) has an unrecognized locale name. Refer to the Language and Locale Designations guide for more information on naming your language-specific directories.\r\n\r\n\r\n", "updateAuthor": { "name": "mark.henderson@snagr.co.uk", "key": "mark.henderson@snagr.co.uk", "displayName": "Mark Henderson", "active": true, "timeZone": "Europe/London" }, "created": "2016-09-08T05:22:32.000+0000", "updated": "2016-09-08T05:22:49.000+0000" }, { "id": "395598", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~fmiao] FYI", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-08T12:21:22.000+0000", "updated": "2016-09-08T12:21:22.000+0000" } ], "maxResults": 30, "total": 30, "startAt": 0 } } }