{"action":"created","issue":{"url":"https://api.github.com/repos/AliSoftware/SwiftGen/issues/181","repository_url":"https://api.github.com/repos/AliSoftware/SwiftGen","labels_url":"https://api.github.com/repos/AliSoftware/SwiftGen/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/AliSoftware/SwiftGen/issues/181/comments","events_url":"https://api.github.com/repos/AliSoftware/SwiftGen/issues/181/events","html_url":"https://github.com/AliSoftware/SwiftGen/issues/181","id":180522615,"number":181,"title":"Is this particular type of strings output possible?","user":{"login":"Krisiacik","id":9870899,"avatar_url":"https://avatars.githubusercontent.com/u/9870899?v=3","gravatar_id":"","url":"https://api.github.com/users/Krisiacik","html_url":"https://github.com/Krisiacik","followers_url":"https://api.github.com/users/Krisiacik/followers","following_url":"https://api.github.com/users/Krisiacik/following{/other_user}","gists_url":"https://api.github.com/users/Krisiacik/gists{/gist_id}","starred_url":"https://api.github.com/users/Krisiacik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krisiacik/subscriptions","organizations_url":"https://api.github.com/users/Krisiacik/orgs","repos_url":"https://api.github.com/users/Krisiacik/repos","events_url":"https://api.github.com/users/Krisiacik/events{/privacy}","received_events_url":"https://api.github.com/users/Krisiacik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-02T17:08:04Z","updated_at":"2016-10-02T23:05:31Z","closed_at":"2016-10-02T17:22:00Z","body":"Hi..\r\nLet's say we have a task to-do app. Here is localizable.strings file:\r\n\r\n    \"common.buttons.ok\" = \"OK\"\r\n    \"common.buttons.cancel\" = \"Cancel\";\r\n    \"common.buttons.retry\" = \"Retry\";\r\n    \"common.buttons.ago\" = \"Ago\";\r\n    \"taskList.task\" = \"Task\";\r\n     \"taskList.date\" = \"date\";\r\n    \"taskList.priority\" = \"Priority\";\r\n    \"addTask.buttons.reschedule\" = \"Reschedule\";\r\n    \"addTask.buttons.freeze\" = \"Freeze\";\r\n\r\nI want swiftgen to generate hierarchically organized `structs` from it:\r\n\r\n\r\n    func localize(key: String) -> String {\r\n        return NSLocalizedString(key, comment: \"\")\r\n    }\r\n\r\n    struct Localization {\r\n    \r\n        struct Common {\r\n        \r\n            struct Buttons {\r\n                static var ok: String { return localize(\"common.buttons.ok\")}\r\n                static var cancel: String { return localize(\"common.buttons.cancel\")}\r\n                static var retry: String { return localize(\"common.buttons.retry\")}\r\n                static var ago: String { return localize(\"common.buttons.ago\") }\r\n            }\r\n        }\r\n    \r\n        struct TaskList {\r\n        \r\n                static var task: String { return localize(\"taskList.task\")}\r\n                static var date: String { return localize(\"taskList.date\")}\r\n                static var priority: String { return localize(\"taskList.priority\")}\r\n        }\r\n    \r\n        struct AddTask {\r\n            \r\n            struct Buttons {\r\n                static var reschedule: String { return localize(\"addTask.buttons.reschedule\")}\r\n                static var freeze: String { return localize(\"addTask.buttons.freeze\") }\r\n            }\r\n        }\r\n    }\r\n\r\nThis way it is very easy to reference localized strings while having the Xcode Code Completion right in the tree junctions for each more specific group which is amazing:\r\n\r\n![localize](https://cloud.githubusercontent.com/assets/9870899/19022269/66bcd12a-8889-11e6-9763-5b5d80ee1a8d.png)\r\n\r\n\r\nIs this currently possible?\r\n   \r\n"},"comment":{"url":"https://api.github.com/repos/AliSoftware/SwiftGen/issues/comments/251002493","html_url":"https://github.com/AliSoftware/SwiftGen/issues/181#issuecomment-251002493","issue_url":"https://api.github.com/repos/AliSoftware/SwiftGen/issues/181","id":251002493,"user":{"login":"AliSoftware","id":216089,"avatar_url":"https://avatars.githubusercontent.com/u/216089?v=3","gravatar_id":"","url":"https://api.github.com/users/AliSoftware","html_url":"https://github.com/AliSoftware","followers_url":"https://api.github.com/users/AliSoftware/followers","following_url":"https://api.github.com/users/AliSoftware/following{/other_user}","gists_url":"https://api.github.com/users/AliSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/AliSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliSoftware/subscriptions","organizations_url":"https://api.github.com/users/AliSoftware/orgs","repos_url":"https://api.github.com/users/AliSoftware/repos","events_url":"https://api.github.com/users/AliSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/AliSoftware/received_events","type":"User","site_admin":false},"created_at":"2016-10-02T23:05:31Z","updated_at":"2016-10-02T23:05:31Z","body":"That's not related to the template but that you gave wrong or empty input when invoking the command; for example the path to your input Localizable.strings didn't exist"}}
{"actor":{"display_login":"AliSoftware"}}