{ "id": "175673", "key": "AC-6619", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": null, "resolutiondate": null, "created": "2020-10-27T11:56:36.000+0000", "labels": [ "android", "internalization", "localization" ], "versions": [ { "id": "17038", "name": "Appcelerator Studio 4.5.0", "archived": false, "released": false } ], "issuelinks": [], "assignee": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-10-28T19:18:06.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." }, { "id": "14552", "name": "Appcelerator CLI", "description": "Please enter tickets related to Tooling and the CLI here" } ], "description": "Today on TiSlack (https://ti-slack.slack.com/archives/C03CVQX2A/p1603729246286000) I finally found the problem that doesn't load my strings causing this warning:\r\n\r\n{code:java}\r\n[WARN] KrollProxy: (main) [15,661] No localized string found for identifier: \r\n{code}\r\n\r\nThe problem is that during compile I saw GRADLE write:\r\n{code:java}\r\n[GRADLE] warn: removing resource it.yourapp.name:string/ without required default value.\r\n{code}\r\nFor every string in my strings.xml file.\r\n\r\n*Solution:*\r\nThe \"default\" GRADLE is searching for is the \"en\" folder in \"i18n\" insted I had only the \"it\".\r\nAfter adding that folder everything is working fine.\r\n\r\nI don't know if it fixable but maybe put an info inside the documentation.", "attachment": [], "flagged": false, "summary": "Not setting 'en' folder in 'i18n' causes to not retrive other localizations", "creator": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "environment": "Mac OSX\r\nVisual Studio Code", "comment": { "comments": [ { "id": "457357", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This has always been the default behavior on Android. If the app fails to find a string resource for the current locale, it will fallback to \"en\", and then finally to unlocalized strings under \"res/values/strings.xml\".\r\nhttps://developer.android.com/guide/topics/resources/multilingual-support\r\n\r\nSo, before Titanium 9.0.0, if you ran your app on a device without an \"it\" locale, your string lookups would have been {{null}} on Android. With Google's gradle build system, it's now validating your i18n string resources, logging build warnings if you have any string entries missing under the \"en\" which is the default fallback, and removing entries so that it behaves consistently in non-english locales. Basically, Google is letting you know your app has internationalization issues. I don't consider this a bug. Especially since a native Android developer would run into the same warnings.\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-10-27T16:40:32.000+0000", "updated": "2020-10-27T16:40:32.000+0000" }, { "id": "457369", "author": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "body": "I figured out what you say and it makes sense, but, in a normal use if someone coming from 8.x SDK transitioning to 9.x like me creates a bit of confusing and also noone has ever see it: https://ti-slack.slack.com/archives/C03CVQX2A/p1603729246286000\r\n\r\nI'm just asking to put in the guide to help others :)", "updateAuthor": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "created": "2020-10-28T08:27:58.000+0000", "updated": "2020-10-28T08:27:58.000+0000" }, { "id": "457376", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I suppose we can do things to make this easier and turn this into a feature request ticket.\r\n\r\nLike if you only have 1 language defined, then our build system should just automatically make it the default by duplicating the strings xml to the unlocalized Android {{./res/values}} folder. However, this won't handle the issue where an app has more than one non-English strings xml files.\r\n\r\nAnother possible approach may be to support a {{./i18n/default}} folder which would become the default strings fallback. On Android, we would just copy that default strings xml to the unlocalized {{./res/values}} folder. We would just have to see what we would have to do on the iOS side for parity.\r\n\r\nAnyways, those are just some ideas I'm throwing out here, because I do agree with you that it would be nice to make this more convenient for non-English apps.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-10-28T19:18:06.000+0000", "updated": "2020-10-28T19:18:06.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }