{ "id": "121891", "key": "TIMOB-15628", "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": "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-08T21:57:41.000+0000", "created": "2013-10-31T13:44:46.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "androidbuild", "module_android", "qe-manualtest", "qe-testadded", "triage" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2014-11-19T18:26:30.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": "I need to use this version of the sdk as it fixes some big bugs, but the strings.xml don't seem to keep the attributes - formatted=\"false\" - so the build will fail :(\r\n{code}\r\n[ERROR] Failed to package application:\r\n[ERROR] \r\n[ERROR] /Volumes/Work/clients/tobias_group_time/TEAMWIRE/gt/build/android/res/values/strings.xml:49: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted=\"false\" attribute?\r\n[ERROR] /Volumes/Work/clients/tobias_group_time/TEAMWIRE/gt/build/android/res/values/strings.xml:49: error: Unexpected end tag string\r\n[ERROR] /Volumes/Work/clients/tobias_group_time/TEAMWIRE/gt/build/android/res/values-de/strings.xml:19: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted=\"false\" attribute?\r\n[ERROR] /Volumes/Work/clients/tobias_group_time/TEAMWIRE/gt/build/android/res/values-de/strings.xml:19: error: Unexpected end tag string\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: i18n strings.xml lose the formatted=false attr after compiling", "creator": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Ti SDK 3.2.0.v20131030184044\r\nAndroid", "comment": { "comments": [ { "id": "277541", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "@Dan, do your strings contain a single quote? Can you send me a sample strings.xml file (preferably from the i18n folder)? Can you do this soon?", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-10-31T19:40:43.000+0000", "updated": "2013-10-31T19:40:43.000+0000" }, { "id": "277649", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "Another issue seems to be that the *values-de* folder is not being created.\r\nI cleaned the project and got this:\r\n{code}\r\n[INFO] Compiling localization files\r\n[DEBUG] Processing i18n file: de/strings.xml\r\n[DEBUG] Processing i18n file: en/strings.xml\r\n[DEBUG] Writing de strings => /Volumes/Work/clients/tobias_group_time/TEAMWIRE/gt/build/android/res/values-de/strings.xml\r\n\r\nfs.js:427\r\n return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);\r\n ^\r\nError: ENOENT, no such file or directory '/Volumes/Work/clients/tobias_group_time/TEAMWIRE/gt/build/android/res/values-de/strings.xml'\r\n\r\n{code}\r\n\r\n", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-11-01T08:41:32.000+0000", "updated": "2013-11-01T08:41:32.000+0000" }, { "id": "277650", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "@Chris - yes it does have a single quote.\r\nPlease download the i18n folder from here (no idea how to attach it in Jira)\r\n\r\nhttps://www.dropbox.com/s/jh8t4al6xv6fhtb/i18n_dan_tamas.zip \r\n\r\nI cleaned all the ' in the files but it does the same.\r\n\r\nA hacky solution is to check in _build.js in generateI18N function if the string has some substitution parts and add formatted false to the node (inside the forEach loop)\r\n\r\n{code}\r\n data[locale].strings[name].match(/%[s,d,i]/g) && node.setAttribute('formatted', 'false');\r\n{code} \r\n\r\n(I only test for s/d/i)\r\n\r\n", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-11-01T08:44:22.000+0000", "updated": "2013-11-01T18:11:08.000+0000" }, { "id": "277663", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "We experienced the ENOENT error when we tested 3.2.x two nights ago.\r\nProject still had the default en and ja language string files in place.\r\nRemoved, project built just fine. Just a reference point.", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2013-11-01T12:17:53.000+0000", "updated": "2013-11-01T12:17:53.000+0000" }, { "id": "277665", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "If I add after the first failed build the folder in place, and build without cleaning it will go through.", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-11-01T12:23:50.000+0000", "updated": "2013-11-01T12:23:50.000+0000" }, { "id": "277720", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "Medium ? :(", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-11-01T18:10:03.000+0000", "updated": "2013-11-01T18:10:03.000+0000" }, { "id": "277722", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thank you @Ingo :)", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-11-01T18:20:12.000+0000", "updated": "2013-11-01T18:20:12.000+0000" }, { "id": "278707", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~rborn] I did some thinking and talked about it with the other guys and we have come to the conclusion to set formatted=\"false\" on ALL strings in strings.xml. For strings that don't have a %, it should be fine. Then we don't have to do any funky regular expressions.\n\nWe are not clear yet if this is going to cause other issues, specifically with older Android target SDKs, but I suppose we'll find out soon enough. :)", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-11-07T21:31:33.000+0000", "updated": "2013-11-07T21:31:33.000+0000" }, { "id": "278708", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Pull request: https://github.com/appcelerator/titanium_mobile/pull/4927", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-11-07T21:31:39.000+0000", "updated": "2013-11-07T21:31:39.000+0000" }, { "id": "278759", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "Not a bad idea, I guess :) \r\n\r\nBut what happens with the strings that have % ? In this case we would need to have '%%' to show the % char, and this might break the ios version - just throwing questions here, didn't test it.\r\n", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-11-08T09:37:00.000+0000", "updated": "2013-11-08T09:37:00.000+0000" }, { "id": "278775", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "If a string has %, nothing happens. Nothing is formatted. You can have a bunch of % and it'll be fine. :)", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-11-08T16:12:59.000+0000", "updated": "2013-11-08T16:12:59.000+0000" }, { "id": "278779", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "Neh, ignore me, was thinking the wrong case (no formatting=false) but I have the perfect excuse: didn't drink my coffee yet :P", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-11-08T17:09:47.000+0000", "updated": "2013-11-08T17:09:47.000+0000" }, { "id": "279619", "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.v20131114120849\nCLI: 3.2.0\nAlloy: 1.3.0\nAndroid Emulator : 2.3.3, 4.4\n\nLocalization file doesn't lose formatted=false attribute after compilation.\ni18n folder used from comments.\nClosing.", "updateAuthor": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-14T21:11:25.000+0000", "updated": "2013-11-14T21:11:25.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }