{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/160","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/160/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/160/events","html_url":"https://github.com/Automattic/wp-calypso/issues/160","id":117795331,"number":160,"title":"User Settings: Only fetch user settings data for translator when needed","user":{"login":"rachelmcr","id":8658164,"avatar_url":"https://avatars.githubusercontent.com/u/8658164?v=3","gravatar_id":"","url":"https://api.github.com/users/rachelmcr","html_url":"https://github.com/rachelmcr","followers_url":"https://api.github.com/users/rachelmcr/followers","following_url":"https://api.github.com/users/rachelmcr/following{/other_user}","gists_url":"https://api.github.com/users/rachelmcr/gists{/gist_id}","starred_url":"https://api.github.com/users/rachelmcr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rachelmcr/subscriptions","organizations_url":"https://api.github.com/users/rachelmcr/orgs","repos_url":"https://api.github.com/users/rachelmcr/repos","events_url":"https://api.github.com/users/rachelmcr/events{/privacy}","received_events_url":"https://api.github.com/users/rachelmcr/received_events","type":"User","site_admin":false},"labels":[{"id":285010037,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Translator","name":"Translator","color":"006b75","default":false},{"id":285010008,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Pri]%20Normal","name":"[Pri] Normal","color":"fad8c7","default":false},{"id":285009975,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Type]%20Bug","name":"[Type] Bug","color":"e11d21","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2015-11-19T11:36:09Z","updated_at":"2016-11-02T15:15:47Z","closed_at":"2016-11-02T15:15:47Z","body":"Right now, when the user interface language is set to a language other than English, we're fetching the user settings on every page load even if the data is not needed.\n\nThis is triggered by the community translator: We're checking userSettings.settings.enable_translator to know whether we should load the translator when the page loads. We could store this in `localStorage`.\n\nIt's also not urgent (in the sense that there's no point loading the translator before there's content to translate), so another option would be to push the translator loading back until after all the core stuff is loaded, although that wouldn't actually avoid loading userSettings, just delay it.\n\nA third option would be to move that setting into user (if appropriate) since i18n loads the user before communityTranslator.init() (in boot), and we're already using the user object for locale info.\n"},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/257895756","html_url":"https://github.com/Automattic/wp-calypso/issues/160#issuecomment-257895756","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/160","id":257895756,"user":{"login":"rachelmcr","id":8658164,"avatar_url":"https://avatars.githubusercontent.com/u/8658164?v=3","gravatar_id":"","url":"https://api.github.com/users/rachelmcr","html_url":"https://github.com/rachelmcr","followers_url":"https://api.github.com/users/rachelmcr/followers","following_url":"https://api.github.com/users/rachelmcr/following{/other_user}","gists_url":"https://api.github.com/users/rachelmcr/gists{/gist_id}","starred_url":"https://api.github.com/users/rachelmcr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rachelmcr/subscriptions","organizations_url":"https://api.github.com/users/rachelmcr/orgs","repos_url":"https://api.github.com/users/rachelmcr/repos","events_url":"https://api.github.com/users/rachelmcr/events{/privacy}","received_events_url":"https://api.github.com/users/rachelmcr/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T15:15:47Z","updated_at":"2016-11-02T15:15:47Z","body":"I tested and confirmed that in both EN and ES, with and without the translator enabled, user settings are only fetched once (first /me page load). Closing as resolved."}}
{"actor":{"display_login":"rachelmcr"}}