{"action":"created","issue":{"url":"https://api.github.com/repos/nicksnyder/go-i18n/issues/50","repository_url":"https://api.github.com/repos/nicksnyder/go-i18n","labels_url":"https://api.github.com/repos/nicksnyder/go-i18n/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/nicksnyder/go-i18n/issues/50/comments","events_url":"https://api.github.com/repos/nicksnyder/go-i18n/issues/50/events","html_url":"https://github.com/nicksnyder/go-i18n/issues/50","id":177930636,"number":50,"title":"[Feature] Command goi18n generate dynamic struct R.go ","user":{"login":"rodrigocorsi2","id":15876606,"avatar_url":"https://avatars.githubusercontent.com/u/15876606?v=3","gravatar_id":"","url":"https://api.github.com/users/rodrigocorsi2","html_url":"https://github.com/rodrigocorsi2","followers_url":"https://api.github.com/users/rodrigocorsi2/followers","following_url":"https://api.github.com/users/rodrigocorsi2/following{/other_user}","gists_url":"https://api.github.com/users/rodrigocorsi2/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigocorsi2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigocorsi2/subscriptions","organizations_url":"https://api.github.com/users/rodrigocorsi2/orgs","repos_url":"https://api.github.com/users/rodrigocorsi2/repos","events_url":"https://api.github.com/users/rodrigocorsi2/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigocorsi2/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nicksnyder/go-i18n/labels/enhancement","name":"enhancement","color":"0052cc"}],"state":"open","locked":false,"assignee":{"login":"rodrigocorsi2","id":15876606,"avatar_url":"https://avatars.githubusercontent.com/u/15876606?v=3","gravatar_id":"","url":"https://api.github.com/users/rodrigocorsi2","html_url":"https://github.com/rodrigocorsi2","followers_url":"https://api.github.com/users/rodrigocorsi2/followers","following_url":"https://api.github.com/users/rodrigocorsi2/following{/other_user}","gists_url":"https://api.github.com/users/rodrigocorsi2/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigocorsi2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigocorsi2/subscriptions","organizations_url":"https://api.github.com/users/rodrigocorsi2/orgs","repos_url":"https://api.github.com/users/rodrigocorsi2/repos","events_url":"https://api.github.com/users/rodrigocorsi2/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigocorsi2/received_events","type":"User","site_admin":false},"assignees":[{"login":"rodrigocorsi2","id":15876606,"avatar_url":"https://avatars.githubusercontent.com/u/15876606?v=3","gravatar_id":"","url":"https://api.github.com/users/rodrigocorsi2","html_url":"https://github.com/rodrigocorsi2","followers_url":"https://api.github.com/users/rodrigocorsi2/followers","following_url":"https://api.github.com/users/rodrigocorsi2/following{/other_user}","gists_url":"https://api.github.com/users/rodrigocorsi2/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigocorsi2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigocorsi2/subscriptions","organizations_url":"https://api.github.com/users/rodrigocorsi2/orgs","repos_url":"https://api.github.com/users/rodrigocorsi2/repos","events_url":"https://api.github.com/users/rodrigocorsi2/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigocorsi2/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2016-09-20T00:11:08Z","updated_at":"2016-09-20T19:15:03Z","closed_at":null,"body":"Working with Android/Java the IDE generates a dynamic class `R.java` with all strings ids, this method avoid a lot of bugs. In a big project is easy to reference an invalid id or to have a lot of unused ids.\r\n\r\nWhat do you think the command `goi18n` generates `R.go` ?\r\nExample:\r\n\r\nen-US.all.json\r\n```json\r\n[\r\n  {\r\n    \"id\": \"settings_title\",\r\n    \"translation\": \"Settings\"\r\n  }\r\n]\r\n```\r\n\r\n```bash\r\n$ goi18n -genconst en-US.all.json -outdir ./\r\n```\r\nthis command generates `R.go`\r\n```go\r\npackage R\r\nconst SettingsTitle string = \"settings_title\"\r\n```\r\n\r\nIn code the new way will be:\r\n```go\r\nT(R.SettingsTitle)\r\n```\r\nThis is only a suggestion, let me know what do you think.\r\nI can help with this change\r\nthanks"},"comment":{"url":"https://api.github.com/repos/nicksnyder/go-i18n/issues/comments/248403013","html_url":"https://github.com/nicksnyder/go-i18n/issues/50#issuecomment-248403013","issue_url":"https://api.github.com/repos/nicksnyder/go-i18n/issues/50","id":248403013,"user":{"login":"rodrigocorsi2","id":15876606,"avatar_url":"https://avatars.githubusercontent.com/u/15876606?v=3","gravatar_id":"","url":"https://api.github.com/users/rodrigocorsi2","html_url":"https://github.com/rodrigocorsi2","followers_url":"https://api.github.com/users/rodrigocorsi2/followers","following_url":"https://api.github.com/users/rodrigocorsi2/following{/other_user}","gists_url":"https://api.github.com/users/rodrigocorsi2/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigocorsi2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigocorsi2/subscriptions","organizations_url":"https://api.github.com/users/rodrigocorsi2/orgs","repos_url":"https://api.github.com/users/rodrigocorsi2/repos","events_url":"https://api.github.com/users/rodrigocorsi2/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigocorsi2/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T19:15:03Z","updated_at":"2016-09-20T19:15:03Z","body":"So it seems good to me, I'll do some tests once it is ready I will submit a PR"}}
{"actor":{"display_login":"rodrigocorsi2"}}