{"action":"created","issue":{"url":"https://api.github.com/repos/substance/substance/issues/104","labels_url":"https://api.github.com/repos/substance/substance/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/substance/substance/issues/104/comments","events_url":"https://api.github.com/repos/substance/substance/issues/104/events","html_url":"https://github.com/substance/substance/issues/104","id":109931438,"number":104,"title":"Add i18n to Component API?","user":{"login":"oliver----","id":284099,"avatar_url":"https://avatars.githubusercontent.com/u/284099?v=3","gravatar_id":"","url":"https://api.github.com/users/oliver----","html_url":"https://github.com/oliver----","followers_url":"https://api.github.com/users/oliver----/followers","following_url":"https://api.github.com/users/oliver----/following{/other_user}","gists_url":"https://api.github.com/users/oliver----/gists{/gist_id}","starred_url":"https://api.github.com/users/oliver----/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliver----/subscriptions","organizations_url":"https://api.github.com/users/oliver----/orgs","repos_url":"https://api.github.com/users/oliver----/repos","events_url":"https://api.github.com/users/oliver----/events{/privacy}","received_events_url":"https://api.github.com/users/oliver----/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/substance/substance/milestones/2","html_url":"https://github.com/substance/substance/milestones/Beta%202","labels_url":"https://api.github.com/repos/substance/substance/milestones/2/labels","id":1271177,"number":2,"title":"Beta 2","description":"","creator":{"login":"michael","id":2931,"avatar_url":"https://avatars.githubusercontent.com/u/2931?v=3","gravatar_id":"","url":"https://api.github.com/users/michael","html_url":"https://github.com/michael","followers_url":"https://api.github.com/users/michael/followers","following_url":"https://api.github.com/users/michael/following{/other_user}","gists_url":"https://api.github.com/users/michael/gists{/gist_id}","starred_url":"https://api.github.com/users/michael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael/subscriptions","organizations_url":"https://api.github.com/users/michael/orgs","repos_url":"https://api.github.com/users/michael/repos","events_url":"https://api.github.com/users/michael/events{/privacy}","received_events_url":"https://api.github.com/users/michael/received_events","type":"User","site_admin":false},"open_issues":27,"closed_issues":35,"state":"open","created_at":"2015-08-25T10:35:03Z","updated_at":"2015-10-06T09:27:54Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-10-06T03:58:07Z","updated_at":"2015-10-06T10:45:16Z","closed_at":null,"body":"ATM we rely on a global instance of polyglot, which is not nice: 1. it is a global, 2. making polyglot a hard dependency.\r\n\r\nInstead I would like to introduce an i18n abstraction API which would be configured and injected on app level and used in components via `this.getLabel()` being a convenience method for `this.context.i18n.getLabel()` plus some fail-safe checking.\r\nThis should be convenient enough, and still provide all flexibility, i.e. we could just use a simple hash for looking up labels for now.\r\n"},"comment":{"url":"https://api.github.com/repos/substance/substance/issues/comments/145819363","html_url":"https://github.com/substance/substance/issues/104#issuecomment-145819363","issue_url":"https://api.github.com/repos/substance/substance/issues/104","id":145819363,"user":{"login":"Integral","id":182010,"avatar_url":"https://avatars.githubusercontent.com/u/182010?v=3","gravatar_id":"","url":"https://api.github.com/users/Integral","html_url":"https://github.com/Integral","followers_url":"https://api.github.com/users/Integral/followers","following_url":"https://api.github.com/users/Integral/following{/other_user}","gists_url":"https://api.github.com/users/Integral/gists{/gist_id}","starred_url":"https://api.github.com/users/Integral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Integral/subscriptions","organizations_url":"https://api.github.com/users/Integral/orgs","repos_url":"https://api.github.com/users/Integral/repos","events_url":"https://api.github.com/users/Integral/events{/privacy}","received_events_url":"https://api.github.com/users/Integral/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T10:45:16Z","updated_at":"2015-10-06T10:45:16Z","body":"Oh yes! That would be great, even outside of writer...\n\nOn Tue, Oct 6, 2015, 10:54 Michael Aufreiter <notifications@github.com>\nwrote:\n\n> this.getLabel() [image: :+1:] but maybe in a writer-specific\n> basecomponent class than in component.js directly.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/substance/substance/issues/104#issuecomment-145789562>\n> .\n>\n"}}