{"action":"created","issue":{"url":"https://api.github.com/repos/nicksnyder/go-i18n/issues/88","repository_url":"https://api.github.com/repos/nicksnyder/go-i18n","labels_url":"https://api.github.com/repos/nicksnyder/go-i18n/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/nicksnyder/go-i18n/issues/88/comments","events_url":"https://api.github.com/repos/nicksnyder/go-i18n/issues/88/events","html_url":"https://github.com/nicksnyder/go-i18n/issues/88","id":300020114,"number":88,"title":"Template execution consideration","user":{"login":"dgricci","id":6443544,"avatar_url":"https://avatars0.githubusercontent.com/u/6443544?v=4","gravatar_id":"","url":"https://api.github.com/users/dgricci","html_url":"https://github.com/dgricci","followers_url":"https://api.github.com/users/dgricci/followers","following_url":"https://api.github.com/users/dgricci/following{/other_user}","gists_url":"https://api.github.com/users/dgricci/gists{/gist_id}","starred_url":"https://api.github.com/users/dgricci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgricci/subscriptions","organizations_url":"https://api.github.com/users/dgricci/orgs","repos_url":"https://api.github.com/users/dgricci/repos","events_url":"https://api.github.com/users/dgricci/events{/privacy}","received_events_url":"https://api.github.com/users/dgricci/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"nicksnyder","id":754768,"avatar_url":"https://avatars1.githubusercontent.com/u/754768?v=4","gravatar_id":"","url":"https://api.github.com/users/nicksnyder","html_url":"https://github.com/nicksnyder","followers_url":"https://api.github.com/users/nicksnyder/followers","following_url":"https://api.github.com/users/nicksnyder/following{/other_user}","gists_url":"https://api.github.com/users/nicksnyder/gists{/gist_id}","starred_url":"https://api.github.com/users/nicksnyder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicksnyder/subscriptions","organizations_url":"https://api.github.com/users/nicksnyder/orgs","repos_url":"https://api.github.com/users/nicksnyder/repos","events_url":"https://api.github.com/users/nicksnyder/events{/privacy}","received_events_url":"https://api.github.com/users/nicksnyder/received_events","type":"User","site_admin":false},"assignees":[{"login":"nicksnyder","id":754768,"avatar_url":"https://avatars1.githubusercontent.com/u/754768?v=4","gravatar_id":"","url":"https://api.github.com/users/nicksnyder","html_url":"https://github.com/nicksnyder","followers_url":"https://api.github.com/users/nicksnyder/followers","following_url":"https://api.github.com/users/nicksnyder/following{/other_user}","gists_url":"https://api.github.com/users/nicksnyder/gists{/gist_id}","starred_url":"https://api.github.com/users/nicksnyder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicksnyder/subscriptions","organizations_url":"https://api.github.com/users/nicksnyder/orgs","repos_url":"https://api.github.com/users/nicksnyder/repos","events_url":"https://api.github.com/users/nicksnyder/events{/privacy}","received_events_url":"https://api.github.com/users/nicksnyder/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/nicksnyder/go-i18n/milestones/1","html_url":"https://github.com/nicksnyder/go-i18n/milestone/1","labels_url":"https://api.github.com/repos/nicksnyder/go-i18n/milestones/1/labels","id":3115472,"number":1,"title":"v2","description":"A collection of issues that may require a breaking API change or should be done if a breaking API change is being made for other reasons.","creator":{"login":"nicksnyder","id":754768,"avatar_url":"https://avatars1.githubusercontent.com/u/754768?v=4","gravatar_id":"","url":"https://api.github.com/users/nicksnyder","html_url":"https://github.com/nicksnyder","followers_url":"https://api.github.com/users/nicksnyder/followers","following_url":"https://api.github.com/users/nicksnyder/following{/other_user}","gists_url":"https://api.github.com/users/nicksnyder/gists{/gist_id}","starred_url":"https://api.github.com/users/nicksnyder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicksnyder/subscriptions","organizations_url":"https://api.github.com/users/nicksnyder/orgs","repos_url":"https://api.github.com/users/nicksnyder/repos","events_url":"https://api.github.com/users/nicksnyder/events{/privacy}","received_events_url":"https://api.github.com/users/nicksnyder/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":10,"state":"open","created_at":"2018-02-14T05:52:38Z","updated_at":"2018-04-15T05:24:44Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-02-25T11:56:09Z","updated_at":"2018-04-15T05:27:19Z","closed_at":"2018-04-15T04:58:49Z","author_association":"NONE","body":"Hi,\r\n\r\nFirst of all, thank you for this nice tool !\r\n\r\nMy use case : \r\n* use [cobra](https://github.com/spf13/cobra/cobra) and its templates ;\r\n* use [go-i18n](https://github.com/nicksnyder/go-i18n) to have translation of the templates.\r\n\r\nI am facing what follows with templates :\r\n1. in the `toml` files : the template contains client application functions : `goi18n` application fails to convert it the flat file into `json` because those client applications functions are not known at that moment ;\r\n    * I have to write by my self the `json` files ;\r\n2. in my application, I just want to get the template as pass it to the client application for processing : again, it fails cause the `Execute()` function is called when getting the template and there is no arguments so far to make the execution correctly.\r\n    * I don't known how to get this working in the end ...\r\n\r\nDigging into the code, I must admit that the `Execute()` function on template is always called even if there is no arguments (https://github.com/nicksnyder/go-i18n/blob/master/i18n/translation/template.go#L37 called by https://github.com/nicksnyder/go-i18n/blob/master/i18n/bundle/bundle.go#L387).\r\n\r\nDo you have any clue on how to manage this use case : let client application handle template execution ?\r\n"},"comment":{"url":"https://api.github.com/repos/nicksnyder/go-i18n/issues/comments/381381250","html_url":"https://github.com/nicksnyder/go-i18n/issues/88#issuecomment-381381250","issue_url":"https://api.github.com/repos/nicksnyder/go-i18n/issues/88","id":381381250,"user":{"login":"nicksnyder","id":754768,"avatar_url":"https://avatars1.githubusercontent.com/u/754768?v=4","gravatar_id":"","url":"https://api.github.com/users/nicksnyder","html_url":"https://github.com/nicksnyder","followers_url":"https://api.github.com/users/nicksnyder/followers","following_url":"https://api.github.com/users/nicksnyder/following{/other_user}","gists_url":"https://api.github.com/users/nicksnyder/gists{/gist_id}","starred_url":"https://api.github.com/users/nicksnyder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicksnyder/subscriptions","organizations_url":"https://api.github.com/users/nicksnyder/orgs","repos_url":"https://api.github.com/users/nicksnyder/repos","events_url":"https://api.github.com/users/nicksnyder/events{/privacy}","received_events_url":"https://api.github.com/users/nicksnyder/received_events","type":"User","site_admin":false},"created_at":"2018-04-15T05:27:19Z","updated_at":"2018-04-15T05:27:19Z","author_association":"OWNER","body":"I just tagged [2.0.0.beta.1](https://github.com/nicksnyder/go-i18n/releases/tag/v2.0.0.beta.1). Please start using it and report any issues that you have."}}
{"actor":{"display_login":"nicksnyder"}}