{ "id": "105701", "key": "TIMOB-11898", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": [], "resolution": null, "resolutiondate": null, "created": "2012-11-29T22:10:47.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "cb-tooling" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2016-08-26T04:28:21.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": "13103", "name": "CLI", "description": "Node-based command line interface" } ], "description": "Make it so __() and __n() return an object instead of a string with a toString() method that outputs the translated string. The object would also expose the original English string.\r\n\r\nWhy is this needed? So that a logger can output one language to the terminal and the original string to the log file.\r\n\r\nFor example, say someone has their locale set to {{es_ES}} and they run a build, then the build log would be in Spanish. Then they run into a problem and they need to create a ticket and attach the build log. The developer fixing the ticket will need to know Spanish in order to track down where exactly in the build the issue is occurring.\r\n\r\nBy outputting the translated string to the screen and the original to the log file, we can understand the logs better.\r\n\r\nI experimented with ways of doing this. Returning an object is going to be tricky. The problem is we do a bunch of {{logger.info(__('howdy') + '\\n')}} and that forces {{toString()}} all the time. Maybe there's a way to use multiple streams and/or integrate the i18n functions into the logger mechanism so that they are aware of each other?", "attachment": [], "flagged": false, "summary": "CLI: Refactor i18n functions to return an object containing original English string", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }