[TIMOB-2563] Android: region-specific i18n files need to be copied to res with "r" in front of region
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:59:27.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M02 |
Components | Android |
Labels | android, defect, release-1.6.0 |
Reporter | Bill Dawson |
Assignee | Bill Dawson |
Created | 2011-04-15T03:22:54.000+0000 |
Updated | 2014-05-24T16:07:43.000+0000 |
Description
Yourproject/i18n/pt-PT/strings.xml works fine for iOS, but when built for Android it causes a build error:
[ERROR] invalid resource directory name: /Users/bill/projects/ti/Strings/build/android/res/values-pt-BR
[ERROR] Error generating R.java from manifest
Reason is because in android it needs to be values-pt-rBR (the little 'r' before BR). See Language and Region section of Android's http://developer.android.com/guide/topics/resources/providing-resources.html"> Providing Resources doc.
Attachments
File | Date | Size |
---|---|---|
lh2563.zip | 2011-04-15T03:22:56.000+0000 | 777359 |
To QA,
For testing, the attached ZIP file contains a project you can import. It has the i18n directory that we use for localized strings, and one of the subfolders there is fr-BE, for belgian french. In the failing versions of the sdk, if you try to build it you'll get an error about that folder being a bad name. In the fixed version, it should build without problem.
(from [34d7f80a2a35d83721ef6bbdb932b3a26be472b2]) [#2563 state:fixed-in-qa] For i18n folders with region-specifications, like fr-BE, make sure the file copied to Android's res folder gets an 'r' in front of the region. https://github.com/appcelerator/titanium_mobile/commit/34d7f80a2a35d83721ef6bbdb932b3a26be472b2"> https://github.com/appcelerator/titanium_mobile/commit/34d7f80a2a35...
built without an issue for 1.6 and 2.2.1, Do not have device with belgian french available though. itanium SDK version: 1.6.0 (01/04/11 08:01 e49700d)
this is happening again in 3.2.0 .. at least when I am trying with 'zh-TW'.
Brian is right, this is happening again. I have an i18n folder with an en and pt-PT folder and it works when I deploy on iOS, if I deploy an Android it aborts the build with an error. if I change to pt-rPT it works on Android but then when I deploy on iOS it won't work, falling back to en strings.xml values, even though the system language is pt-PT. Please fix this, it is a major inconvenience for app localisation.