{ "id": "107103", "key": "TIMOB-12161", "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": "15646", "description": "2013 Sprint 18", "name": "2013 Sprint 18", "archived": true, "released": true, "releaseDate": "2013-09-06" }, { "id": "15690", "description": "2013 Sprint 18 API", "name": "2013 Sprint 18 API", "archived": true, "released": true, "releaseDate": "2013-09-06" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-08-26T23:28:47.000+0000", "created": "2012-12-27T05:58:46.000+0000", "priority": null, "labels": [ "android", "localization" ], "versions": [], "issuelinks": [ { "id": "30587", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "103393", "key": "TIMOB-11681", "fields": { "summary": "Android: Localization Keys cannot contain a . (dot)", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-10-10T08:56:08.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Issue*\r\n\r\nIt is known that the strings.xml file is less flexible in Android as it is used to generate the R.java file. (E.g. a build will fail if a string name starts with an integer or includes a '+', etc.)\r\n\r\nThe above stated, if a string name includes a '.' character, a build will succeed but replace the '.' characters with '_'. \r\n\r\n{code:xml}\r\n\r\n\r\n Hello World\r\n\r\n\r\n{code}\r\n\r\nSince the replacement is silent, the dev is unaware of the change so the following will not work.\r\n\r\n{code:javascript}\r\nalert(L(\"my.value\"});\r\n{code}\r\n\r\n*Temporary Work Around*\r\n\r\nFor large code bases that cannot change the naming convention, the L function can be redefined, e.g.:\r\n\r\n{code:javascript}\r\n(function(object) {\r\n if (exports.osname ===\"android\") {\r\n object.L = function(lookup, defaults) {\r\n return Ti.Locale.getString(lookup.replace(/\\./g,\"_\"), defaults);\r\n };\r\n }\r\n})(this);\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Localization of string names with '.'", "creator": { "name": "dbankier", "key": "dbankier", "displayName": "David Bankier", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dbankier", "key": "dbankier", "displayName": "David Bankier", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android *, TiSDK *", "comment": { "comments": [ { "id": "267433", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/4589", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-21T00:56:19.000+0000", "updated": "2013-08-21T00:56:19.000+0000" }, { "id": "279605", "author": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified Fixed on:\nMac OSX 10.9 Mavericks\nTitanium Studio, build: 3.2.0.201311140700\nTitanium SDK, build: 3.2.0.v20131113183932\nCLI: 3.2.0\nAlloy: 1.3.0\nAndroid Simulator: 2.3.3, 4.4\n\nLocalization string my.value was picked up and displayed on screen using the above code.\nClosing.", "updateAuthor": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-14T19:34:23.000+0000", "updated": "2013-11-14T19:34:23.000+0000" }, { "id": "327586", "author": { "name": "michaelkaaring", "key": "michaelkaaring", "displayName": "Michael Kåring", "active": true, "timeZone": "America/Los_Angeles" }, "body": "where and how do you redefine the L function as shown in the example?", "updateAuthor": { "name": "michaelkaaring", "key": "michaelkaaring", "displayName": "Michael Kåring", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-10T08:56:08.000+0000", "updated": "2014-10-10T08:56:08.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }