{ "id": "110623", "key": "TIMOB-12960", "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": "15645", "description": "2013 Sprint 18 Core", "name": "2013 Sprint 18 Core", "archived": true, "released": true, "releaseDate": "2013-09-06" }, { "id": "15646", "description": "2013 Sprint 18", "name": "2013 Sprint 18", "archived": true, "released": true, "releaseDate": "2013-09-06" }, { "id": "15707", "description": "2013 Sprint 23", "name": "2013 Sprint 23", "archived": true, "released": true, "releaseDate": "2013-11-15" }, { "id": "15709", "description": "2013 Sprint 23 Core", "name": "2013 Sprint 23 Core", "archived": true, "released": true, "releaseDate": "2013-11-15" }, { "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-11-15T00:16:25.000+0000", "created": "2013-03-05T11:58:54.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "androidbuild", "cb-verified", "exalture", "ios", "mobilesdk", "module_label", "qe-testadded" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "33486", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "outwardIssue": { "id": "123134", "key": "TIMOB-15860", "fields": { "summary": "Android: KitchenSink: BaseUI > Views > Web Views > Local URL, Missing label 'Click Me to Hide the Toolbar'", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2013-12-04T00:08:53.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" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Use the following xml in the i18n en strings.xml file:\r\n{code}\r\nThere should be space \r\n of that thing.\r\n{code}\r\n\r\nAnd use the following in app js:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n layout: \"vertical\"\r\n});\r\n// build a string from the strings file that has built-in space.\r\nvar s = L(\"share\") + \"!on each side!\" + L(\"share2\");\r\nalert(s);\r\n{code}\r\n\r\nThe result is different in 3.0 vs 2.1.3. In 3.0, it seems all whitespaces from strings from the language file are trimmed.\r\nThe same behavior is seen in Android also.\r\n\r\n", "attachment": [ { "id": "43289", "filename": "androidNoSpaces.png", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-18T09:45:54.000+0000", "size": 31121, "mimeType": "image/png" } ], "flagged": false, "summary": "TiAPI: Cannot add a whitespace at the end of string in i18n strings.xml", "creator": { "name": "mpathak", "key": "mpathak", "displayName": "Meenakshi Pathak", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mpathak", "key": "mpathak", "displayName": "Meenakshi Pathak", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium mobile sdk,iOS 6.1,Android", "comment": { "comments": [ { "id": "249565", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "For Android, one could use unicode \\u0020 to add space", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-04-30T16:28:36.000+0000", "updated": "2013-04-30T16:28:36.000+0000" }, { "id": "250553", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Need a workaround or fix in IOS", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-05-07T14:17:52.000+0000", "updated": "2013-05-07T14:17:52.000+0000" }, { "id": "250779", "author": { "name": "soumyakantikar", "key": "soumyakantikar", "displayName": "Soumya Kanti Kar", "active": true, "timeZone": "America/Havana" }, "body": "Also facing the same issue. We are using 3.1.0GA. This issue is happening for both Android and iOS. In Android for space we need to add \\u0020 but for iOS we need to add \\U0020. This workaround is also of no use, cause \\u0020 is not understood in iOS.", "updateAuthor": { "name": "soumyakantikar", "key": "soumyakantikar", "displayName": "Soumya Kanti Kar", "active": true, "timeZone": "America/Havana" }, "created": "2013-05-08T13:53:26.000+0000", "updated": "2013-05-08T13:53:26.000+0000" }, { "id": "268476", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Pull request: https://github.com/appcelerator/titanium_mobile/pull/4612", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-08-27T22:37:03.000+0000", "updated": "2013-08-27T22:37:03.000+0000" }, { "id": "275605", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening the issue as issue not fixed for android.\r\nVerified the fix with:\r\n\r\nAppc-Studio: 3.2.0.201310170829\r\nSdk:3.2.0.v20131017152001\r\nalloy:1.2.2\r\nnpm:1.3.2\r\ntitanium:3.2.0\r\ntitanium-code-processor:1.0.3\r\nDevice:Google Nexus 7(v4.3),iPhone Simulator(v7.0)\r\nXcode: 5\r\n\r\nWhiteSpace successfully being added from i18n strings.xml file for iOS.\r\nBut for android no space are being added/reflected.\r\n\r\nCode used:\r\napp.js\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\nbackgroundColor:\"white\"\r\n});\r\n// build a string from the strings file that has built-in space.\r\nvar s = L(\"share\") + \"!on each side!\" + L(\"share2\");\r\nvar lbl=Ti.UI.createLabel({text:s,backgroundColor:'white',top:'30dp',color:'black',font:{fontSize: 32}});\r\nwin.add(lbl);\r\nwin.open();\r\n{code}\r\n\r\nstrings.xml file\r\n\r\n\r\n\r\n There should be space \r\n of that thing.\r\n\r\n\r\nScreenshot attached for android.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-18T09:44:01.000+0000", "updated": "2013-10-18T09:44:01.000+0000" }, { "id": "275606", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~pagarwal] This is fixed in the new Android build, but it hasn't been merged into master yet.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-10-18T09:50:50.000+0000", "updated": "2013-10-18T09:50:50.000+0000" }, { "id": "275818", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4781", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-19T01:22:43.000+0000", "updated": "2013-10-19T01:22:43.000+0000" }, { "id": "279498", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening the issue as issue is still reproducible for android.\r\nStill not getting whitespace for string when declared in strings.xml file.\r\n\r\nTested Environment:\r\n\r\nAppcelerator Studio: 3.2.0.201311122338\r\nSDK:3.2.0.v20131113183932\r\nalloy: 1.3.0\r\nacs: 1.0.7\r\nnpm: 1.3.2\r\ntitanium: 3.2.0\r\ntitanium-code-processor: 1.1.0\r\nXcode:5.0.2\r\nDevice: Google Nexus 7(v4.3)\r\nOS: Mac OSX 10.9\r\n", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-14T05:49:14.000+0000", "updated": "2013-11-14T05:49:14.000+0000" }, { "id": "279512", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "This is NOT a CLI issue. The strings are being written to the res/values/strings.xml file correctly. The problem is in the Ti.Locale.getString() function and also affects L().", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-11-14T07:21:20.000+0000", "updated": "2013-11-14T07:21:20.000+0000" }, { "id": "279613", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It looks like native Android is trimming spaces. One workaround is to denote a space as '\\u0020' in strings.xml (http://stackoverflow.com/questions/1587056/android-string-concatenate-how-to-keep-the-spaces-at-the-end-and-or-beginnin)", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-14T20:10:43.000+0000", "updated": "2013-11-14T20:10:43.000+0000" }, { "id": "279628", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Pull request: https://github.com/appcelerator/titanium_mobile/pull/4970", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-11-14T21:53:05.000+0000", "updated": "2013-11-14T21:53:05.000+0000" }, { "id": "279739", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Able to get whitespace at the end of strings from i18 strings xml file.\r\nClosing as fixed and verified.\r\n\r\nTested Environment:\r\n\r\nAppcelerator Studio: 3.2.0.201311140721\r\nSDK:3.2.0.v20131114184328\r\nalloy: 1.3.0\r\nacs: 1.0.7\r\nnpm: 1.3.2\r\ntitanium: 3.2.0\r\ntitanium-code-processor: 1.1.0\r\nXcode:5.0.2\r\nDevice: Iphone 5s(v7.0.2), Google Nexus7(v4.3)\r\nOS: Mac OSX 10.9", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-15T08:05:14.000+0000", "updated": "2013-11-15T08:05:14.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }