{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/activity-stream/pulls/comments/134536929","pull_request_review_id":57836090,"id":134536929,"diff_hunk":"@@ -87,16 +87,31 @@ describe(\"Localization Feed\", () => {\n         too: TEST_STRINGS[DEFAULT_LOCALE].too\n       });\n     });\n-    it(\"should use all default strings for unknown locale\", () => {\n-      const locale = \"xyz\";\n+    it(\"should use multiple fallback strings before default\", () => {\n+      const locale = \"ru\";\n       sandbox.stub(global.Services.locale, \"negotiateLanguages\")\n-        .returns([locale]);\n+        .returns([locale, \"it\", DEFAULT_LOCALE]);\n+\n       feed.updateLocale();\n \n       assert.calledOnce(feed.store.dispatch);\n       const arg = feed.store.dispatch.firstCall.args[0];\n       assert.propertyVal(arg, \"type\", at.LOCALE_UPDATED);\n       assert.propertyVal(arg.data, \"locale\", locale);\n+      assert.deepEqual(arg.data.strings, {\n+        foo: TEST_STRINGS[locale].foo,\n+        too: TEST_STRINGS.it.too\n+      });\n+    });\n+    it(\"should use all default strings for unknown locale\", () => {\n+      sandbox.stub(global.Services.locale, \"negotiateLanguages\")\n+        .returns([DEFAULT_LOCALE]);\n+      feed.updateLocale();","path":"system-addon/test/unit/lib/LocalizationFeed.test.js","position":44,"original_position":44,"commit_id":"a5b42502d2d0c19d0a90e97ab0277533be0cec36","original_commit_id":"a5b42502d2d0c19d0a90e97ab0277533be0cec36","user":{"login":"dmose","id":425657,"avatar_url":"https://avatars2.githubusercontent.com/u/425657?v=4","gravatar_id":"","url":"https://api.github.com/users/dmose","html_url":"https://github.com/dmose","followers_url":"https://api.github.com/users/dmose/followers","following_url":"https://api.github.com/users/dmose/following{/other_user}","gists_url":"https://api.github.com/users/dmose/gists{/gist_id}","starred_url":"https://api.github.com/users/dmose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmose/subscriptions","organizations_url":"https://api.github.com/users/dmose/orgs","repos_url":"https://api.github.com/users/dmose/repos","events_url":"https://api.github.com/users/dmose/events{/privacy}","received_events_url":"https://api.github.com/users/dmose/received_events","type":"User","site_admin":false},"body":"I'd suggest whitespace above this line, to keep with \"setup/execute/verify\" sections.","created_at":"2017-08-22T16:42:27Z","updated_at":"2017-08-22T16:44:39Z","html_url":"https://github.com/mozilla/activity-stream/pull/3207#discussion_r134536929","pull_request_url":"https://api.github.com/repos/mozilla/activity-stream/pulls/3207","_links":{"self":{"href":"https://api.github.com/repos/mozilla/activity-stream/pulls/comments/134536929"},"html":{"href":"https://github.com/mozilla/activity-stream/pull/3207#discussion_r134536929"},"pull_request":{"href":"https://api.github.com/repos/mozilla/activity-stream/pulls/3207"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/activity-stream/pulls/3207","id":136882008,"html_url":"https://github.com/mozilla/activity-stream/pull/3207","diff_url":"https://github.com/mozilla/activity-stream/pull/3207.diff","patch_url":"https://github.com/mozilla/activity-stream/pull/3207.patch","issue_url":"https://api.github.com/repos/mozilla/activity-stream/issues/3207","number":3207,"state":"open","locked":false,"title":"feat(l10n): Use strings from multiple locales in order of negotiated languages","user":{"login":"Mardak","id":438537,"avatar_url":"https://avatars0.githubusercontent.com/u/438537?v=4","gravatar_id":"","url":"https://api.github.com/users/Mardak","html_url":"https://github.com/Mardak","followers_url":"https://api.github.com/users/Mardak/followers","following_url":"https://api.github.com/users/Mardak/following{/other_user}","gists_url":"https://api.github.com/users/Mardak/gists{/gist_id}","starred_url":"https://api.github.com/users/Mardak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mardak/subscriptions","organizations_url":"https://api.github.com/users/Mardak/orgs","repos_url":"https://api.github.com/users/Mardak/repos","events_url":"https://api.github.com/users/Mardak/events{/privacy}","received_events_url":"https://api.github.com/users/Mardak/received_events","type":"User","site_admin":false},"body":"Fix #3052. r?@dmose Needed to update the test to have `negotiateLanguages` correctly return the default as part of the array. Also a slight behavior change of using the best negotiated language as the locale instead of what would have been returned by `getRequestedLocale`, e.g., \"xyz\" in the test.\r\n\r\nHere's a screenshot of pretending bn-IN had a top sites string of \"Llocs principals\" then falling back to bn-BD (see search) then en-US (see migration):\r\n\r\n<img width=\"167\" alt=\"image\" src=\"https://user-images.githubusercontent.com/438537/29546614-52dddf58-86aa-11e7-8d77-3a1982e01984.png\">\r\n","created_at":"2017-08-22T02:58:26Z","updated_at":"2017-08-22T16:44:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67ea097df8cae80b9f1ead0d5bdc6fab6b82c3f4","assignee":{"login":"dmose","id":425657,"avatar_url":"https://avatars2.githubusercontent.com/u/425657?v=4","gravatar_id":"","url":"https://api.github.com/users/dmose","html_url":"https://github.com/dmose","followers_url":"https://api.github.com/users/dmose/followers","following_url":"https://api.github.com/users/dmose/following{/other_user}","gists_url":"https://api.github.com/users/dmose/gists{/gist_id}","starred_url":"https://api.github.com/users/dmose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmose/subscriptions","organizations_url":"https://api.github.com/users/dmose/orgs","repos_url":"https://api.github.com/users/dmose/repos","events_url":"https://api.github.com/users/dmose/events{/privacy}","received_events_url":"https://api.github.com/users/dmose/received_events","type":"User","site_admin":false},"assignees":[{"login":"dmose","id":425657,"avatar_url":"https://avatars2.githubusercontent.com/u/425657?v=4","gravatar_id":"","url":"https://api.github.com/users/dmose","html_url":"https://github.com/dmose","followers_url":"https://api.github.com/users/dmose/followers","following_url":"https://api.github.com/users/dmose/following{/other_user}","gists_url":"https://api.github.com/users/dmose/gists{/gist_id}","starred_url":"https://api.github.com/users/dmose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmose/subscriptions","organizations_url":"https://api.github.com/users/dmose/orgs","repos_url":"https://api.github.com/users/dmose/repos","events_url":"https://api.github.com/users/dmose/events{/privacy}","received_events_url":"https://api.github.com/users/dmose/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/activity-stream/pulls/3207/commits","review_comments_url":"https://api.github.com/repos/mozilla/activity-stream/pulls/3207/comments","review_comment_url":"https://api.github.com/repos/mozilla/activity-stream/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/activity-stream/issues/3207/comments","statuses_url":"https://api.github.com/repos/mozilla/activity-stream/statuses/a5b42502d2d0c19d0a90e97ab0277533be0cec36","head":{"label":"Mardak:gh3052-cascade","ref":"gh3052-cascade","sha":"a5b42502d2d0c19d0a90e97ab0277533be0cec36","user":{"login":"Mardak","id":438537,"avatar_url":"https://avatars0.githubusercontent.com/u/438537?v=4","gravatar_id":"","url":"https://api.github.com/users/Mardak","html_url":"https://github.com/Mardak","followers_url":"https://api.github.com/users/Mardak/followers","following_url":"https://api.github.com/users/Mardak/following{/other_user}","gists_url":"https://api.github.com/users/Mardak/gists{/gist_id}","starred_url":"https://api.github.com/users/Mardak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mardak/subscriptions","organizations_url":"https://api.github.com/users/Mardak/orgs","repos_url":"https://api.github.com/users/Mardak/repos","events_url":"https://api.github.com/users/Mardak/events{/privacy}","received_events_url":"https://api.github.com/users/Mardak/received_events","type":"User","site_admin":false},"repo":{"id":64378674,"name":"activity-stream","full_name":"Mardak/activity-stream","owner":{"login":"Mardak","id":438537,"avatar_url":"https://avatars0.githubusercontent.com/u/438537?v=4","gravatar_id":"","url":"https://api.github.com/users/Mardak","html_url":"https://github.com/Mardak","followers_url":"https://api.github.com/users/Mardak/followers","following_url":"https://api.github.com/users/Mardak/following{/other_user}","gists_url":"https://api.github.com/users/Mardak/gists{/gist_id}","starred_url":"https://api.github.com/users/Mardak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mardak/subscriptions","organizations_url":"https://api.github.com/users/Mardak/orgs","repos_url":"https://api.github.com/users/Mardak/repos","events_url":"https://api.github.com/users/Mardak/events{/privacy}","received_events_url":"https://api.github.com/users/Mardak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mardak/activity-stream","description":" MVP prototype add-on for activity streams","fork":true,"url":"https://api.github.com/repos/Mardak/activity-stream","forks_url":"https://api.github.com/repos/Mardak/activity-stream/forks","keys_url":"https://api.github.com/repos/Mardak/activity-stream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mardak/activity-stream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mardak/activity-stream/teams","hooks_url":"https://api.github.com/repos/Mardak/activity-stream/hooks","issue_events_url":"https://api.github.com/repos/Mardak/activity-stream/issues/events{/number}","events_url":"https://api.github.com/repos/Mardak/activity-stream/events","assignees_url":"https://api.github.com/repos/Mardak/activity-stream/assignees{/user}","branches_url":"https://api.github.com/repos/Mardak/activity-stream/branches{/branch}","tags_url":"https://api.github.com/repos/Mardak/activity-stream/tags","blobs_url":"https://api.github.com/repos/Mardak/activity-stream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mardak/activity-stream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mardak/activity-stream/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mardak/activity-stream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mardak/activity-stream/statuses/{sha}","languages_url":"https://api.github.com/repos/Mardak/activity-stream/languages","stargazers_url":"https://api.github.com/repos/Mardak/activity-stream/stargazers","contributors_url":"https://api.github.com/repos/Mardak/activity-stream/contributors","subscribers_url":"https://api.github.com/repos/Mardak/activity-stream/subscribers","subscription_url":"https://api.github.com/repos/Mardak/activity-stream/subscription","commits_url":"https://api.github.com/repos/Mardak/activity-stream/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mardak/activity-stream/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mardak/activity-stream/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mardak/activity-stream/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mardak/activity-stream/contents/{+path}","compare_url":"https://api.github.com/repos/Mardak/activity-stream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mardak/activity-stream/merges","archive_url":"https://api.github.com/repos/Mardak/activity-stream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mardak/activity-stream/downloads","issues_url":"https://api.github.com/repos/Mardak/activity-stream/issues{/number}","pulls_url":"https://api.github.com/repos/Mardak/activity-stream/pulls{/number}","milestones_url":"https://api.github.com/repos/Mardak/activity-stream/milestones{/number}","notifications_url":"https://api.github.com/repos/Mardak/activity-stream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mardak/activity-stream/labels{/name}","releases_url":"https://api.github.com/repos/Mardak/activity-stream/releases{/id}","deployments_url":"https://api.github.com/repos/Mardak/activity-stream/deployments","created_at":"2016-07-28T08:39:26Z","updated_at":"2016-07-28T08:39:28Z","pushed_at":"2017-08-22T16:36:13Z","git_url":"git://github.com/Mardak/activity-stream.git","ssh_url":"git@github.com:Mardak/activity-stream.git","clone_url":"https://github.com/Mardak/activity-stream.git","svn_url":"https://github.com/Mardak/activity-stream","homepage":"","size":5393,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"c253b4c069499d341c2afcf8a7ec16dd135a5fb4","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":50695589,"name":"activity-stream","full_name":"mozilla/activity-stream","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/activity-stream","description":"A refreshed \"new tab page\" for Firefox","fork":false,"url":"https://api.github.com/repos/mozilla/activity-stream","forks_url":"https://api.github.com/repos/mozilla/activity-stream/forks","keys_url":"https://api.github.com/repos/mozilla/activity-stream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/activity-stream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/activity-stream/teams","hooks_url":"https://api.github.com/repos/mozilla/activity-stream/hooks","issue_events_url":"https://api.github.com/repos/mozilla/activity-stream/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/activity-stream/events","assignees_url":"https://api.github.com/repos/mozilla/activity-stream/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/activity-stream/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/activity-stream/tags","blobs_url":"https://api.github.com/repos/mozilla/activity-stream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/activity-stream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/activity-stream/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/activity-stream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/activity-stream/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/activity-stream/languages","stargazers_url":"https://api.github.com/repos/mozilla/activity-stream/stargazers","contributors_url":"https://api.github.com/repos/mozilla/activity-stream/contributors","subscribers_url":"https://api.github.com/repos/mozilla/activity-stream/subscribers","subscription_url":"https://api.github.com/repos/mozilla/activity-stream/subscription","commits_url":"https://api.github.com/repos/mozilla/activity-stream/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/activity-stream/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/activity-stream/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/activity-stream/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/activity-stream/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/activity-stream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/activity-stream/merges","archive_url":"https://api.github.com/repos/mozilla/activity-stream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/activity-stream/downloads","issues_url":"https://api.github.com/repos/mozilla/activity-stream/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/activity-stream/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/activity-stream/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/activity-stream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/activity-stream/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/activity-stream/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/activity-stream/deployments","created_at":"2016-01-29T22:28:26Z","updated_at":"2017-08-18T10:03:17Z","pushed_at":"2017-08-22T16:36:10Z","git_url":"git://github.com/mozilla/activity-stream.git","ssh_url":"git@github.com:mozilla/activity-stream.git","clone_url":"https://github.com/mozilla/activity-stream.git","svn_url":"https://github.com/mozilla/activity-stream","homepage":"","size":6047,"stargazers_count":115,"watchers_count":115,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":55,"mirror_url":null,"open_issues_count":135,"forks":55,"open_issues":135,"watchers":115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/activity-stream/pulls/3207"},"html":{"href":"https://github.com/mozilla/activity-stream/pull/3207"},"issue":{"href":"https://api.github.com/repos/mozilla/activity-stream/issues/3207"},"comments":{"href":"https://api.github.com/repos/mozilla/activity-stream/issues/3207/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/activity-stream/pulls/3207/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/activity-stream/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/activity-stream/pulls/3207/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/activity-stream/statuses/a5b42502d2d0c19d0a90e97ab0277533be0cec36"}}}}
{"actor":{"display_login":"dmose"}}