{"action":"reopened","number":20800,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/20800","id":39411695,"html_url":"https://github.com/rails/rails/pull/20800","diff_url":"https://github.com/rails/rails/pull/20800.diff","patch_url":"https://github.com/rails/rails/pull/20800.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/20800","number":20800,"state":"open","locked":false,"title":"Make ActiveJob locale aware","user":{"login":"xijo","id":104711,"avatar_url":"https://avatars.githubusercontent.com/u/104711?v=3","gravatar_id":"","url":"https://api.github.com/users/xijo","html_url":"https://github.com/xijo","followers_url":"https://api.github.com/users/xijo/followers","following_url":"https://api.github.com/users/xijo/following{/other_user}","gists_url":"https://api.github.com/users/xijo/gists{/gist_id}","starred_url":"https://api.github.com/users/xijo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xijo/subscriptions","organizations_url":"https://api.github.com/users/xijo/orgs","repos_url":"https://api.github.com/users/xijo/repos","events_url":"https://api.github.com/users/xijo/events{/privacy}","received_events_url":"https://api.github.com/users/xijo/received_events","type":"User","site_admin":false},"body":"When `#perform_later` is called the locale isn't stored on the\r\nqueue, which results in a locale reset when the job is performed.\r\n\r\nAn example of the problem:\r\n\r\n    I18n.locale = 'de'\r\n    HelloJob.perform_now # german message, correct\r\n\r\nbut\r\n\r\n    I18n.locale = 'de'\r\n    HelloJob.perform_later # english message, incorrect\r\n\r\nThis PR attaches the current I18n.locale to every job during the\r\nserialization process. It is then restored during deserialization\r\nand used to perform the job with the correct locale.\r\n\r\nIt falls back to the default locale if no serialized locale is\r\nfound in order to provide backward compatibility with previously\r\nstored jobs. It is not necessary to clear the queue for the update.","created_at":"2015-07-07T20:15:53Z","updated_at":"2015-08-04T09:53:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c15b825af9399427d447e7c9cf1bf720f56b62a4","assignee":null,"milestone":{"url":"https://api.github.com/repos/rails/rails/milestones/34","html_url":"https://github.com/rails/rails/milestones/5.0.0","labels_url":"https://api.github.com/repos/rails/rails/milestones/34/labels","id":665192,"number":34,"title":"5.0.0","description":null,"creator":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false},"open_issues":96,"closed_issues":129,"state":"open","created_at":"2014-05-21T00:58:22Z","updated_at":"2015-08-04T09:53:06Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/rails/rails/pulls/20800/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/20800/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/20800/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/3860e6b2bf486d8b27d433daab358dbc68ae3448","head":{"label":"xijo:make_active_job_locale_aware","ref":"make_active_job_locale_aware","sha":"3860e6b2bf486d8b27d433daab358dbc68ae3448","user":{"login":"xijo","id":104711,"avatar_url":"https://avatars.githubusercontent.com/u/104711?v=3","gravatar_id":"","url":"https://api.github.com/users/xijo","html_url":"https://github.com/xijo","followers_url":"https://api.github.com/users/xijo/followers","following_url":"https://api.github.com/users/xijo/following{/other_user}","gists_url":"https://api.github.com/users/xijo/gists{/gist_id}","starred_url":"https://api.github.com/users/xijo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xijo/subscriptions","organizations_url":"https://api.github.com/users/xijo/orgs","repos_url":"https://api.github.com/users/xijo/repos","events_url":"https://api.github.com/users/xijo/events{/privacy}","received_events_url":"https://api.github.com/users/xijo/received_events","type":"User","site_admin":false},"repo":{"id":38431156,"name":"rails","full_name":"xijo/rails","owner":{"login":"xijo","id":104711,"avatar_url":"https://avatars.githubusercontent.com/u/104711?v=3","gravatar_id":"","url":"https://api.github.com/users/xijo","html_url":"https://github.com/xijo","followers_url":"https://api.github.com/users/xijo/followers","following_url":"https://api.github.com/users/xijo/following{/other_user}","gists_url":"https://api.github.com/users/xijo/gists{/gist_id}","starred_url":"https://api.github.com/users/xijo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xijo/subscriptions","organizations_url":"https://api.github.com/users/xijo/orgs","repos_url":"https://api.github.com/users/xijo/repos","events_url":"https://api.github.com/users/xijo/events{/privacy}","received_events_url":"https://api.github.com/users/xijo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xijo/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/xijo/rails","forks_url":"https://api.github.com/repos/xijo/rails/forks","keys_url":"https://api.github.com/repos/xijo/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xijo/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xijo/rails/teams","hooks_url":"https://api.github.com/repos/xijo/rails/hooks","issue_events_url":"https://api.github.com/repos/xijo/rails/issues/events{/number}","events_url":"https://api.github.com/repos/xijo/rails/events","assignees_url":"https://api.github.com/repos/xijo/rails/assignees{/user}","branches_url":"https://api.github.com/repos/xijo/rails/branches{/branch}","tags_url":"https://api.github.com/repos/xijo/rails/tags","blobs_url":"https://api.github.com/repos/xijo/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xijo/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xijo/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/xijo/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xijo/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/xijo/rails/languages","stargazers_url":"https://api.github.com/repos/xijo/rails/stargazers","contributors_url":"https://api.github.com/repos/xijo/rails/contributors","subscribers_url":"https://api.github.com/repos/xijo/rails/subscribers","subscription_url":"https://api.github.com/repos/xijo/rails/subscription","commits_url":"https://api.github.com/repos/xijo/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/xijo/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/xijo/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/xijo/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/xijo/rails/contents/{+path}","compare_url":"https://api.github.com/repos/xijo/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xijo/rails/merges","archive_url":"https://api.github.com/repos/xijo/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xijo/rails/downloads","issues_url":"https://api.github.com/repos/xijo/rails/issues{/number}","pulls_url":"https://api.github.com/repos/xijo/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/xijo/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/xijo/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xijo/rails/labels{/name}","releases_url":"https://api.github.com/repos/xijo/rails/releases{/id}","created_at":"2015-07-02T12:21:07Z","updated_at":"2015-07-02T12:21:34Z","pushed_at":"2015-08-03T22:38:39Z","git_url":"git://github.com/xijo/rails.git","ssh_url":"git@github.com:xijo/rails.git","clone_url":"https://github.com/xijo/rails.git","svn_url":"https://github.com/xijo/rails","homepage":"http://rubyonrails.org","size":144436,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"rails:master","ref":"master","sha":"17eb64213a86d14ebe44a1215f2408065fa2634a","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","created_at":"2008-04-11T02:19:47Z","updated_at":"2015-08-04T09:16:42Z","pushed_at":"2015-08-04T09:22:50Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"http://rubyonrails.org","size":440136,"stargazers_count":27130,"watchers_count":27130,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10874,"mirror_url":null,"open_issues_count":901,"forks":10874,"open_issues":901,"watchers":27130,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/20800"},"html":{"href":"https://github.com/rails/rails/pull/20800"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/20800"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/20800/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/20800/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/20800/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/3860e6b2bf486d8b27d433daab358dbc68ae3448"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":14,"review_comments":20,"commits":1,"additions":111,"deletions":2,"changed_files":11}}