{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/dashboard/issues/1217","repository_url":"https://api.github.com/repos/kubernetes/dashboard","labels_url":"https://api.github.com/repos/kubernetes/dashboard/issues/1217/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/dashboard/issues/1217/comments","events_url":"https://api.github.com/repos/kubernetes/dashboard/issues/1217/events","html_url":"https://github.com/kubernetes/dashboard/issues/1217","id":176383208,"number":1217,"title":"Next iteration of i18n framework","user":{"login":"bryk","id":1159999,"avatar_url":"https://avatars.githubusercontent.com/u/1159999?v=3","gravatar_id":"","url":"https://api.github.com/users/bryk","html_url":"https://github.com/bryk","followers_url":"https://api.github.com/users/bryk/followers","following_url":"https://api.github.com/users/bryk/following{/other_user}","gists_url":"https://api.github.com/users/bryk/gists{/gist_id}","starred_url":"https://api.github.com/users/bryk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryk/subscriptions","organizations_url":"https://api.github.com/users/bryk/orgs","repos_url":"https://api.github.com/users/bryk/repos","events_url":"https://api.github.com/users/bryk/events{/privacy}","received_events_url":"https://api.github.com/users/bryk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-12T14:02:08Z","updated_at":"2016-09-12T14:02:28Z","closed_at":null,"body":"I have some thoughts on our i18n framework. It is generally super cool, but has some issues around developer productivity. I.e., it significantly slows me down when coding. \r\n\r\nHow about enhancing the framework so that we keep 90% of our texts in the html files, never touching controllers.\r\n\r\nRough idea:\r\n1. In templates we write text to be translated in `[[]]` brackets. Syntax is: `[[Hello world | Text that appears on initial page load]]`\r\n2. This is all put in .html templates. E.g, my file named hello.html would be:\r\n```html\r\n<div>\r\n  [[Hello world | Text that appears on initial page load]]\r\n</div>\r\n```\r\n3. Then, during build, this file is processed into hello.html.js, with the following content:\r\n```js\r\n\r\n/** @desc Text that appears on initial page load */\r\nconst MSG_HELLO_WORLD = 'Hello World';\r\n\r\nangular.module(['app']).config(($templateCache) => {\r\n$templateCache.put('path/to/file/hello.html', <div>${MSG_HELLO_WORLD}</div>`); \r\n});\r\n```\r\n4. Then this file is passed to normal build pipeline and compiled\r\n\r\n\r\nPros: I write text in templates and don't have to bloat my controllers. Harder to make mistakes. "},"comment":{"url":"https://api.github.com/repos/kubernetes/dashboard/issues/comments/246356711","html_url":"https://github.com/kubernetes/dashboard/issues/1217#issuecomment-246356711","issue_url":"https://api.github.com/repos/kubernetes/dashboard/issues/1217","id":246356711,"user":{"login":"bryk","id":1159999,"avatar_url":"https://avatars.githubusercontent.com/u/1159999?v=3","gravatar_id":"","url":"https://api.github.com/users/bryk","html_url":"https://github.com/bryk","followers_url":"https://api.github.com/users/bryk/followers","following_url":"https://api.github.com/users/bryk/following{/other_user}","gists_url":"https://api.github.com/users/bryk/gists{/gist_id}","starred_url":"https://api.github.com/users/bryk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryk/subscriptions","organizations_url":"https://api.github.com/users/bryk/orgs","repos_url":"https://api.github.com/users/bryk/repos","events_url":"https://api.github.com/users/bryk/events{/privacy}","received_events_url":"https://api.github.com/users/bryk/received_events","type":"User","site_admin":false},"created_at":"2016-09-12T14:02:28Z","updated_at":"2016-09-12T14:02:28Z","body":"@batikanu @cheld What do you think? "}}
{"actor":{"display_login":"bryk"}}