{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/pontoon/pulls/comments/35807014","id":35807014,"diff_hunk":"@@ -255,6 +368,23 @@ def add_translation(self, string, locale, user):\n         translation.save()\n \n \n+class TranslationManager(models.Manager):\n+    def get_queryset(self):\n+        return (super(TranslationManager, self).get_queryset()\n+                .filter(deleted__isnull=True))\n+\n+\n+class DeletedTranslationManager(models.Manager):\n+    def get_queryset(self):\n+        return (super(DeletedTranslationManager, self).get_queryset()\n+                .filter(deleted__isnull=False))\n+\n+\n+def extra_default():\n+    \"\"\"Default value for the Translation.extra field.\"\"\"\n+    return {}","path":"pontoon/base/models.py","position":179,"original_position":179,"commit_id":"583183895397823d2d28e88eee06c6aca0ce44c3","original_commit_id":"583183895397823d2d28e88eee06c6aca0ce44c3","user":{"login":"mythmon","id":305049,"avatar_url":"https://avatars.githubusercontent.com/u/305049?v=3","gravatar_id":"","url":"https://api.github.com/users/mythmon","html_url":"https://github.com/mythmon","followers_url":"https://api.github.com/users/mythmon/followers","following_url":"https://api.github.com/users/mythmon/following{/other_user}","gists_url":"https://api.github.com/users/mythmon/gists{/gist_id}","starred_url":"https://api.github.com/users/mythmon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mythmon/subscriptions","organizations_url":"https://api.github.com/users/mythmon/orgs","repos_url":"https://api.github.com/users/mythmon/repos","events_url":"https://api.github.com/users/mythmon/events{/privacy}","received_events_url":"https://api.github.com/users/mythmon/received_events","type":"User","site_admin":false},"body":"Ah. That makes sense. I didn't know that.","created_at":"2015-07-29T20:22:38Z","updated_at":"2015-07-29T20:22:38Z","html_url":"https://github.com/mozilla/pontoon/pull/54#discussion_r35807014","pull_request_url":"https://api.github.com/repos/mozilla/pontoon/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/comments/35807014"},"html":{"href":"https://github.com/mozilla/pontoon/pull/54#discussion_r35807014"},"pull_request":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/pontoon/pulls/54","id":40873428,"html_url":"https://github.com/mozilla/pontoon/pull/54","diff_url":"https://github.com/mozilla/pontoon/pull/54.diff","patch_url":"https://github.com/mozilla/pontoon/pull/54.patch","issue_url":"https://api.github.com/repos/mozilla/pontoon/issues/54","number":54,"state":"open","locked":false,"title":"Bug 1178874: Add new sync_projects command.","user":{"login":"Osmose","id":193106,"avatar_url":"https://avatars.githubusercontent.com/u/193106?v=3","gravatar_id":"","url":"https://api.github.com/users/Osmose","html_url":"https://github.com/Osmose","followers_url":"https://api.github.com/users/Osmose/followers","following_url":"https://api.github.com/users/Osmose/following{/other_user}","gists_url":"https://api.github.com/users/Osmose/gists{/gist_id}","starred_url":"https://api.github.com/users/Osmose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Osmose/subscriptions","organizations_url":"https://api.github.com/users/Osmose/orgs","repos_url":"https://api.github.com/users/Osmose/repos","events_url":"https://api.github.com/users/Osmose/events{/privacy}","received_events_url":"https://api.github.com/users/Osmose/received_events","type":"User","site_admin":false},"body":"Adds a new management command called `sync_projects` that simultaneously pulls updates from VCS to update the database and commits changes from the database to VCS.\r\n\r\nMore details to follow, and this is still slightly incomplete, but I figured putting it up now for some pre-reviewing would be helpful. Don't merge for now.\r\n\r\n@mathjazz Comments, criticism, and questions are welcome. :D","created_at":"2015-07-27T06:22:19Z","updated_at":"2015-07-29T20:22:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec15fd3476b29a9de6e4adf9ccbddf83a66bfdbf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/pontoon/pulls/54/commits","review_comments_url":"https://api.github.com/repos/mozilla/pontoon/pulls/54/comments","review_comment_url":"https://api.github.com/repos/mozilla/pontoon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/pontoon/issues/54/comments","statuses_url":"https://api.github.com/repos/mozilla/pontoon/statuses/583183895397823d2d28e88eee06c6aca0ce44c3","head":{"label":"Osmose:sync","ref":"sync","sha":"583183895397823d2d28e88eee06c6aca0ce44c3","user":{"login":"Osmose","id":193106,"avatar_url":"https://avatars.githubusercontent.com/u/193106?v=3","gravatar_id":"","url":"https://api.github.com/users/Osmose","html_url":"https://github.com/Osmose","followers_url":"https://api.github.com/users/Osmose/followers","following_url":"https://api.github.com/users/Osmose/following{/other_user}","gists_url":"https://api.github.com/users/Osmose/gists{/gist_id}","starred_url":"https://api.github.com/users/Osmose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Osmose/subscriptions","organizations_url":"https://api.github.com/users/Osmose/orgs","repos_url":"https://api.github.com/users/Osmose/repos","events_url":"https://api.github.com/users/Osmose/events{/privacy}","received_events_url":"https://api.github.com/users/Osmose/received_events","type":"User","site_admin":false},"repo":{"id":35060964,"name":"pontoon","full_name":"Osmose/pontoon","owner":{"login":"Osmose","id":193106,"avatar_url":"https://avatars.githubusercontent.com/u/193106?v=3","gravatar_id":"","url":"https://api.github.com/users/Osmose","html_url":"https://github.com/Osmose","followers_url":"https://api.github.com/users/Osmose/followers","following_url":"https://api.github.com/users/Osmose/following{/other_user}","gists_url":"https://api.github.com/users/Osmose/gists{/gist_id}","starred_url":"https://api.github.com/users/Osmose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Osmose/subscriptions","organizations_url":"https://api.github.com/users/Osmose/orgs","repos_url":"https://api.github.com/users/Osmose/repos","events_url":"https://api.github.com/users/Osmose/events{/privacy}","received_events_url":"https://api.github.com/users/Osmose/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Osmose/pontoon","description":"In-place localization tool","fork":true,"url":"https://api.github.com/repos/Osmose/pontoon","forks_url":"https://api.github.com/repos/Osmose/pontoon/forks","keys_url":"https://api.github.com/repos/Osmose/pontoon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Osmose/pontoon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Osmose/pontoon/teams","hooks_url":"https://api.github.com/repos/Osmose/pontoon/hooks","issue_events_url":"https://api.github.com/repos/Osmose/pontoon/issues/events{/number}","events_url":"https://api.github.com/repos/Osmose/pontoon/events","assignees_url":"https://api.github.com/repos/Osmose/pontoon/assignees{/user}","branches_url":"https://api.github.com/repos/Osmose/pontoon/branches{/branch}","tags_url":"https://api.github.com/repos/Osmose/pontoon/tags","blobs_url":"https://api.github.com/repos/Osmose/pontoon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Osmose/pontoon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Osmose/pontoon/git/refs{/sha}","trees_url":"https://api.github.com/repos/Osmose/pontoon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Osmose/pontoon/statuses/{sha}","languages_url":"https://api.github.com/repos/Osmose/pontoon/languages","stargazers_url":"https://api.github.com/repos/Osmose/pontoon/stargazers","contributors_url":"https://api.github.com/repos/Osmose/pontoon/contributors","subscribers_url":"https://api.github.com/repos/Osmose/pontoon/subscribers","subscription_url":"https://api.github.com/repos/Osmose/pontoon/subscription","commits_url":"https://api.github.com/repos/Osmose/pontoon/commits{/sha}","git_commits_url":"https://api.github.com/repos/Osmose/pontoon/git/commits{/sha}","comments_url":"https://api.github.com/repos/Osmose/pontoon/comments{/number}","issue_comment_url":"https://api.github.com/repos/Osmose/pontoon/issues/comments{/number}","contents_url":"https://api.github.com/repos/Osmose/pontoon/contents/{+path}","compare_url":"https://api.github.com/repos/Osmose/pontoon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Osmose/pontoon/merges","archive_url":"https://api.github.com/repos/Osmose/pontoon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Osmose/pontoon/downloads","issues_url":"https://api.github.com/repos/Osmose/pontoon/issues{/number}","pulls_url":"https://api.github.com/repos/Osmose/pontoon/pulls{/number}","milestones_url":"https://api.github.com/repos/Osmose/pontoon/milestones{/number}","notifications_url":"https://api.github.com/repos/Osmose/pontoon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Osmose/pontoon/labels{/name}","releases_url":"https://api.github.com/repos/Osmose/pontoon/releases{/id}","created_at":"2015-05-04T21:33:45Z","updated_at":"2015-05-05T18:16:18Z","pushed_at":"2015-07-28T18:43:52Z","git_url":"git://github.com/Osmose/pontoon.git","ssh_url":"git@github.com:Osmose/pontoon.git","clone_url":"https://github.com/Osmose/pontoon.git","svn_url":"https://github.com/Osmose/pontoon","homepage":"https://pontoon.mozilla.org/","size":17559,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"8f513ae6f49875d0220f1d16fff7bd07426879c4","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","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":1385890,"name":"pontoon","full_name":"mozilla/pontoon","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","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/pontoon","description":"In-place localization tool","fork":false,"url":"https://api.github.com/repos/mozilla/pontoon","forks_url":"https://api.github.com/repos/mozilla/pontoon/forks","keys_url":"https://api.github.com/repos/mozilla/pontoon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/pontoon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/pontoon/teams","hooks_url":"https://api.github.com/repos/mozilla/pontoon/hooks","issue_events_url":"https://api.github.com/repos/mozilla/pontoon/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/pontoon/events","assignees_url":"https://api.github.com/repos/mozilla/pontoon/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/pontoon/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/pontoon/tags","blobs_url":"https://api.github.com/repos/mozilla/pontoon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/pontoon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/pontoon/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/pontoon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/pontoon/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/pontoon/languages","stargazers_url":"https://api.github.com/repos/mozilla/pontoon/stargazers","contributors_url":"https://api.github.com/repos/mozilla/pontoon/contributors","subscribers_url":"https://api.github.com/repos/mozilla/pontoon/subscribers","subscription_url":"https://api.github.com/repos/mozilla/pontoon/subscription","commits_url":"https://api.github.com/repos/mozilla/pontoon/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/pontoon/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/pontoon/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/pontoon/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/pontoon/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/pontoon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/pontoon/merges","archive_url":"https://api.github.com/repos/mozilla/pontoon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/pontoon/downloads","issues_url":"https://api.github.com/repos/mozilla/pontoon/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/pontoon/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/pontoon/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/pontoon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/pontoon/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/pontoon/releases{/id}","created_at":"2011-02-19T11:25:51Z","updated_at":"2015-07-23T13:44:24Z","pushed_at":"2015-07-29T13:54:43Z","git_url":"git://github.com/mozilla/pontoon.git","ssh_url":"git@github.com:mozilla/pontoon.git","clone_url":"https://github.com/mozilla/pontoon.git","svn_url":"https://github.com/mozilla/pontoon","homepage":"https://pontoon.mozilla.org/","size":21882,"stargazers_count":67,"watchers_count":67,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":3,"forks":23,"open_issues":3,"watchers":67,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/54"},"html":{"href":"https://github.com/mozilla/pontoon/pull/54"},"issue":{"href":"https://api.github.com/repos/mozilla/pontoon/issues/54"},"comments":{"href":"https://api.github.com/repos/mozilla/pontoon/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/pontoon/statuses/583183895397823d2d28e88eee06c6aca0ce44c3"}}}}