{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/pontoon/issues/1126","repository_url":"https://api.github.com/repos/mozilla/pontoon","labels_url":"https://api.github.com/repos/mozilla/pontoon/issues/1126/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/pontoon/issues/1126/comments","events_url":"https://api.github.com/repos/mozilla/pontoon/issues/1126/events","html_url":"https://github.com/mozilla/pontoon/pull/1126","id":379100699,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NjQ1ODUw","number":1126,"title":"Fix bug 1505825 - Load locales list via AJAX.","user":{"login":"adngdb","id":328790,"node_id":"MDQ6VXNlcjMyODc5MA==","avatar_url":"https://avatars1.githubusercontent.com/u/328790?v=4","gravatar_id":"","url":"https://api.github.com/users/adngdb","html_url":"https://github.com/adngdb","followers_url":"https://api.github.com/users/adngdb/followers","following_url":"https://api.github.com/users/adngdb/following{/other_user}","gists_url":"https://api.github.com/users/adngdb/gists{/gist_id}","starred_url":"https://api.github.com/users/adngdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adngdb/subscriptions","organizations_url":"https://api.github.com/users/adngdb/orgs","repos_url":"https://api.github.com/users/adngdb/repos","events_url":"https://api.github.com/users/adngdb/events{/privacy}","received_events_url":"https://api.github.com/users/adngdb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-11-09T10:13:43Z","updated_at":"2018-11-13T15:59:06Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/mozilla/pontoon/pulls/1126","html_url":"https://github.com/mozilla/pontoon/pull/1126","diff_url":"https://github.com/mozilla/pontoon/pull/1126.diff","patch_url":"https://github.com/mozilla/pontoon/pull/1126.patch"},"body":"Passing the locales list through the template cannot work with django < 2, so we need to pass them differently. This patch makes a call to a new django endpoint to get the preferred locale for the current user, and then loads translation files when the list is received."},"comment":{"url":"https://api.github.com/repos/mozilla/pontoon/issues/comments/438319269","html_url":"https://github.com/mozilla/pontoon/pull/1126#issuecomment-438319269","issue_url":"https://api.github.com/repos/mozilla/pontoon/issues/1126","id":438319269,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODMxOTI2OQ==","user":{"login":"adngdb","id":328790,"node_id":"MDQ6VXNlcjMyODc5MA==","avatar_url":"https://avatars1.githubusercontent.com/u/328790?v=4","gravatar_id":"","url":"https://api.github.com/users/adngdb","html_url":"https://github.com/adngdb","followers_url":"https://api.github.com/users/adngdb/followers","following_url":"https://api.github.com/users/adngdb/following{/other_user}","gists_url":"https://api.github.com/users/adngdb/gists{/gist_id}","starred_url":"https://api.github.com/users/adngdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adngdb/subscriptions","organizations_url":"https://api.github.com/users/adngdb/orgs","repos_url":"https://api.github.com/users/adngdb/repos","events_url":"https://api.github.com/users/adngdb/events{/privacy}","received_events_url":"https://api.github.com/users/adngdb/received_events","type":"User","site_admin":false},"created_at":"2018-11-13T15:59:06Z","updated_at":"2018-11-13T15:59:06Z","author_association":"MEMBER","body":"There are a few misunderstanding here, so let me try to make things a bit clearer. @stasm or @Pike might want to chime in and complete what I'm saying.\r\n\r\nFluent can handle a list of locales to fallback to, in an ordered manner. That means that for some languages, it might be interesting to not fallback directly to `en-US` when a message is not localized. Let's say you are in Argentina and your locale of choice is `es-AR`. If the translation is incomplete for that locale, it would probably be a lot better for the user to fallback to `es`, or `es-ES`, before showing `en-US`. Those fallback chains should be generated automatically.\r\n\r\nThat means we won't give users the option to define a list of locales. They would get to choose their primary one, and then we would automatically compute the best possible fallbacks. I hope such a thing already exists out there. \r\n\r\nSo, for an end user, they can: \r\n - do nothing, get the UI shown in the locale that their browser is configured to show (basic language negociation), and benefit from smart fallbacks ; or\r\n - go to their settings page, force a specific locale, and benefit from smart fallbacks.\r\n\r\nDoes that sound better? \r\n\r\nIn all cases, that means a page would potentially show messages in various locales, and thus the `lang` attribute becomes less consistent and useful. However, we should indeed update it when we get the preferred user's locale. "}}
{"actor":{"display_login":"adngdb"}}