{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/comments/105742766","pull_request_review_id":26635521,"id":105742766,"diff_hunk":"@@ -0,0 +1,165 @@\n+#! /usr/bin/env node\n+\n+/* eslint-disable promise/avoid-new */\n+\n+const propertiesParser = require('properties-parser');\n+const path = require('path');\n+const FS = require('q-io/fs');\n+const argv = require('minimist')(process.argv.slice(2));\n+\n+const Habitat = require('habitat');\n+Habitat.load();\n+\n+const regexPlaceholders = /\\{([A-Za-z0-9_@]*)\\}/g;\n+let supportedLocales = process.env.SUPPORTED_LOCALES || '*';\n+\n+const config = {\n+  'dest': argv.dest || 'dist/_locales',\n+  'src': argv.src || 'locales',\n+  'default_locale': argv.locale || 'en-US'\n+};\n+\n+function log(...args) {\n+  console.log(...args);  // eslint-disable-line no-console\n+}\n+\n+function error(...args) {\n+  console.error(...args);  // eslint-disable-line no-console\n+}\n+\n+function getListLocales() {\n+  return new Promise((resolve, reject) => {\n+    if (supportedLocales === '*') {\n+      FS.listDirectoryTree(path.join(process.cwd(), config.src)).then((dirTree) => {\n+        const localeList = [];\n+\n+        // Get rid of the top level, we're only interested with what's inside it\n+        dirTree.splice(0,1);\n+        dirTree.forEach((localeLocation) => {\n+          // Get the locale code from the end of the path. We're expecting the structure of Pontoon's output here\n+          const langcode = localeLocation.split(path.sep).slice(-1)[0];\n+\n+          if (langcode) {\n+            localeList.push(langcode);","path":"bin/pontoon-to-webext.js","position":43,"original_position":43,"commit_id":"063c2b4e993e88c8e13fb1eead26341e245e34db","original_commit_id":"063c2b4e993e88c8e13fb1eead26341e245e34db","user":{"login":"ianb","id":44390,"avatar_url":"https://avatars2.githubusercontent.com/u/44390?v=3","gravatar_id":"","url":"https://api.github.com/users/ianb","html_url":"https://github.com/ianb","followers_url":"https://api.github.com/users/ianb/followers","following_url":"https://api.github.com/users/ianb/following{/other_user}","gists_url":"https://api.github.com/users/ianb/gists{/gist_id}","starred_url":"https://api.github.com/users/ianb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianb/subscriptions","organizations_url":"https://api.github.com/users/ianb/orgs","repos_url":"https://api.github.com/users/ianb/repos","events_url":"https://api.github.com/users/ianb/events{/privacy}","received_events_url":"https://api.github.com/users/ianb/received_events","type":"User","site_admin":false},"body":"Why wouldn't this be present?  Seems like it should be a warning.","created_at":"2017-03-13T18:54:17Z","updated_at":"2017-03-13T19:05:02Z","html_url":"https://github.com/mozilla-services/pageshot/pull/2358#discussion_r105742766","pull_request_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/2358","_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/comments/105742766"},"html":{"href":"https://github.com/mozilla-services/pageshot/pull/2358#discussion_r105742766"},"pull_request":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/2358"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/2358","id":110232799,"html_url":"https://github.com/mozilla-services/pageshot/pull/2358","diff_url":"https://github.com/mozilla-services/pageshot/pull/2358.diff","patch_url":"https://github.com/mozilla-services/pageshot/pull/2358.patch","issue_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/2358","number":2358,"state":"open","locked":false,"title":"2294 pontoon to webextension","user":{"login":"6a68","id":96396,"avatar_url":"https://avatars0.githubusercontent.com/u/96396?v=3","gravatar_id":"","url":"https://api.github.com/users/6a68","html_url":"https://github.com/6a68","followers_url":"https://api.github.com/users/6a68/followers","following_url":"https://api.github.com/users/6a68/following{/other_user}","gists_url":"https://api.github.com/users/6a68/gists{/gist_id}","starred_url":"https://api.github.com/users/6a68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6a68/subscriptions","organizations_url":"https://api.github.com/users/6a68/orgs","repos_url":"https://api.github.com/users/6a68/repos","events_url":"https://api.github.com/users/6a68/events{/privacy}","received_events_url":"https://api.github.com/users/6a68/received_events","type":"User","site_admin":false},"body":"This is built on top of the string extraction commit from #2344, which hasn't landed yet.\r\n\r\nCommit message pretty much says it all:\r\n\r\n-----\r\n\r\nAdd pontoon strings & build step to transform into webextension strings\r\n\r\n- Add pontoon-to-webext.js script from bwinton/SnoozeTabs repo and\r\n  related npm dependencies (to be removed when/if that script is\r\n  published on npm as a standalone module).\r\n\r\n- Add extracted strings to a properties file at the location expected by\r\n  Pontoon.\r\n\r\n- Add a pontoon-to-webextension build step to the Makefile\r\n\r\n- Also, replace the hand made messages.json with the more nicely-formatted\r\n  script output.\r\n\r\nThis commit, together with the fix for #2344, closes #2294.","created_at":"2017-03-11T00:00:04Z","updated_at":"2017-03-13T19:05:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59fcf4dca98d751a26d960cf9c98ebe900b6afff","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/2358/commits","review_comments_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/2358/comments","review_comment_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/2358/comments","statuses_url":"https://api.github.com/repos/mozilla-services/pageshot/statuses/063c2b4e993e88c8e13fb1eead26341e245e34db","head":{"label":"6a68:2294-pontoon-to-webextension","ref":"2294-pontoon-to-webextension","sha":"063c2b4e993e88c8e13fb1eead26341e245e34db","user":{"login":"6a68","id":96396,"avatar_url":"https://avatars0.githubusercontent.com/u/96396?v=3","gravatar_id":"","url":"https://api.github.com/users/6a68","html_url":"https://github.com/6a68","followers_url":"https://api.github.com/users/6a68/followers","following_url":"https://api.github.com/users/6a68/following{/other_user}","gists_url":"https://api.github.com/users/6a68/gists{/gist_id}","starred_url":"https://api.github.com/users/6a68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6a68/subscriptions","organizations_url":"https://api.github.com/users/6a68/orgs","repos_url":"https://api.github.com/users/6a68/repos","events_url":"https://api.github.com/users/6a68/events{/privacy}","received_events_url":"https://api.github.com/users/6a68/received_events","type":"User","site_admin":false},"repo":{"id":26831771,"name":"pageshot","full_name":"6a68/pageshot","owner":{"login":"6a68","id":96396,"avatar_url":"https://avatars0.githubusercontent.com/u/96396?v=3","gravatar_id":"","url":"https://api.github.com/users/6a68","html_url":"https://github.com/6a68","followers_url":"https://api.github.com/users/6a68/followers","following_url":"https://api.github.com/users/6a68/following{/other_user}","gists_url":"https://api.github.com/users/6a68/gists{/gist_id}","starred_url":"https://api.github.com/users/6a68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6a68/subscriptions","organizations_url":"https://api.github.com/users/6a68/orgs","repos_url":"https://api.github.com/users/6a68/repos","events_url":"https://api.github.com/users/6a68/events{/privacy}","received_events_url":"https://api.github.com/users/6a68/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/6a68/pageshot","description":null,"fork":true,"url":"https://api.github.com/repos/6a68/pageshot","forks_url":"https://api.github.com/repos/6a68/pageshot/forks","keys_url":"https://api.github.com/repos/6a68/pageshot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/6a68/pageshot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/6a68/pageshot/teams","hooks_url":"https://api.github.com/repos/6a68/pageshot/hooks","issue_events_url":"https://api.github.com/repos/6a68/pageshot/issues/events{/number}","events_url":"https://api.github.com/repos/6a68/pageshot/events","assignees_url":"https://api.github.com/repos/6a68/pageshot/assignees{/user}","branches_url":"https://api.github.com/repos/6a68/pageshot/branches{/branch}","tags_url":"https://api.github.com/repos/6a68/pageshot/tags","blobs_url":"https://api.github.com/repos/6a68/pageshot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/6a68/pageshot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/6a68/pageshot/git/refs{/sha}","trees_url":"https://api.github.com/repos/6a68/pageshot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/6a68/pageshot/statuses/{sha}","languages_url":"https://api.github.com/repos/6a68/pageshot/languages","stargazers_url":"https://api.github.com/repos/6a68/pageshot/stargazers","contributors_url":"https://api.github.com/repos/6a68/pageshot/contributors","subscribers_url":"https://api.github.com/repos/6a68/pageshot/subscribers","subscription_url":"https://api.github.com/repos/6a68/pageshot/subscription","commits_url":"https://api.github.com/repos/6a68/pageshot/commits{/sha}","git_commits_url":"https://api.github.com/repos/6a68/pageshot/git/commits{/sha}","comments_url":"https://api.github.com/repos/6a68/pageshot/comments{/number}","issue_comment_url":"https://api.github.com/repos/6a68/pageshot/issues/comments{/number}","contents_url":"https://api.github.com/repos/6a68/pageshot/contents/{+path}","compare_url":"https://api.github.com/repos/6a68/pageshot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/6a68/pageshot/merges","archive_url":"https://api.github.com/repos/6a68/pageshot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/6a68/pageshot/downloads","issues_url":"https://api.github.com/repos/6a68/pageshot/issues{/number}","pulls_url":"https://api.github.com/repos/6a68/pageshot/pulls{/number}","milestones_url":"https://api.github.com/repos/6a68/pageshot/milestones{/number}","notifications_url":"https://api.github.com/repos/6a68/pageshot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/6a68/pageshot/labels{/name}","releases_url":"https://api.github.com/repos/6a68/pageshot/releases{/id}","deployments_url":"https://api.github.com/repos/6a68/pageshot/deployments","created_at":"2014-11-18T21:52:18Z","updated_at":"2017-03-10T20:57:20Z","pushed_at":"2017-03-12T15:10:40Z","git_url":"git://github.com/6a68/pageshot.git","ssh_url":"git@github.com:6a68/pageshot.git","clone_url":"https://github.com/6a68/pageshot.git","svn_url":"https://github.com/6a68/pageshot","homepage":null,"size":9623,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-services:master","ref":"master","sha":"67d336b58049aefbe6c6f4d7556d2d1ac3cf938a","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars2.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":26788257,"name":"pageshot","full_name":"mozilla-services/pageshot","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars2.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/pageshot","description":"An experiment in creating better shareable versions of content","fork":false,"url":"https://api.github.com/repos/mozilla-services/pageshot","forks_url":"https://api.github.com/repos/mozilla-services/pageshot/forks","keys_url":"https://api.github.com/repos/mozilla-services/pageshot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/pageshot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/pageshot/teams","hooks_url":"https://api.github.com/repos/mozilla-services/pageshot/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/pageshot/events","assignees_url":"https://api.github.com/repos/mozilla-services/pageshot/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/pageshot/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/pageshot/tags","blobs_url":"https://api.github.com/repos/mozilla-services/pageshot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/pageshot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/pageshot/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/pageshot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/pageshot/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/pageshot/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/pageshot/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/pageshot/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/pageshot/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/pageshot/subscription","commits_url":"https://api.github.com/repos/mozilla-services/pageshot/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/pageshot/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/pageshot/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-services/pageshot/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/pageshot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/pageshot/merges","archive_url":"https://api.github.com/repos/mozilla-services/pageshot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/pageshot/downloads","issues_url":"https://api.github.com/repos/mozilla-services/pageshot/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/pageshot/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/pageshot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/pageshot/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/pageshot/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-services/pageshot/deployments","created_at":"2014-11-18T02:28:36Z","updated_at":"2017-03-12T05:37:46Z","pushed_at":"2017-03-13T18:32:44Z","git_url":"git://github.com/mozilla-services/pageshot.git","ssh_url":"git@github.com:mozilla-services/pageshot.git","clone_url":"https://github.com/mozilla-services/pageshot.git","svn_url":"https://github.com/mozilla-services/pageshot","homepage":"https://pageshot.net","size":9620,"stargazers_count":123,"watchers_count":123,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":232,"forks":30,"open_issues":232,"watchers":123,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/2358"},"html":{"href":"https://github.com/mozilla-services/pageshot/pull/2358"},"issue":{"href":"https://api.github.com/repos/mozilla-services/pageshot/issues/2358"},"comments":{"href":"https://api.github.com/repos/mozilla-services/pageshot/issues/2358/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/2358/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/2358/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-services/pageshot/statuses/063c2b4e993e88c8e13fb1eead26341e245e34db"}}}}
{"actor":{"display_login":"ianb"}}