{"action":"closed","number":3526,"pull_request":{"url":"https://api.github.com/repos/opf/openproject/pulls/3526","id":45528309,"html_url":"https://github.com/opf/openproject/pull/3526","diff_url":"https://github.com/opf/openproject/pull/3526.diff","patch_url":"https://github.com/opf/openproject/pull/3526.patch","issue_url":"https://api.github.com/repos/opf/openproject/issues/3526","number":3526,"state":"closed","locked":false,"title":"Improve resilience for missing languages","user":{"login":"NobodysNightmare","id":453584,"avatar_url":"https://avatars.githubusercontent.com/u/453584?v=3","gravatar_id":"","url":"https://api.github.com/users/NobodysNightmare","html_url":"https://github.com/NobodysNightmare","followers_url":"https://api.github.com/users/NobodysNightmare/followers","following_url":"https://api.github.com/users/NobodysNightmare/following{/other_user}","gists_url":"https://api.github.com/users/NobodysNightmare/gists{/gist_id}","starred_url":"https://api.github.com/users/NobodysNightmare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NobodysNightmare/subscriptions","organizations_url":"https://api.github.com/users/NobodysNightmare/orgs","repos_url":"https://api.github.com/users/NobodysNightmare/repos","events_url":"https://api.github.com/users/NobodysNightmare/events{/privacy}","received_events_url":"https://api.github.com/users/NobodysNightmare/received_events","type":"User","site_admin":false},"body":"## OpenProject work package\r\n\r\nhttps://community.openproject.org/work_packages/21426\r\n\r\n## Description\r\n\r\nOn some instances I could observe users having a language set to `en-GB`, I am not yet sure on how they obtained this setting (since we only allow setting it to `en` by normal means). However, there is a legitimate way to fall back in that case that does not involve raising errors.\r\n\r\nThis PR unifies the `LocaleHelper` and the `SetLocalizationService` by making the former use the latter. It also lets the `SetLocalizationService` fall back to a language prefix if the fully specified language is not available (previously only done for HTTP indicated languages).","created_at":"2015-09-21T09:29:20Z","updated_at":"2015-09-21T15:49:03Z","closed_at":"2015-09-21T15:49:03Z","merged_at":"2015-09-21T15:49:03Z","merge_commit_sha":"924dd677805a55ccd058be8b2e929544dd9de02f","assignee":{"login":"oliverguenther","id":459462,"avatar_url":"https://avatars.githubusercontent.com/u/459462?v=3","gravatar_id":"","url":"https://api.github.com/users/oliverguenther","html_url":"https://github.com/oliverguenther","followers_url":"https://api.github.com/users/oliverguenther/followers","following_url":"https://api.github.com/users/oliverguenther/following{/other_user}","gists_url":"https://api.github.com/users/oliverguenther/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverguenther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverguenther/subscriptions","organizations_url":"https://api.github.com/users/oliverguenther/orgs","repos_url":"https://api.github.com/users/oliverguenther/repos","events_url":"https://api.github.com/users/oliverguenther/events{/privacy}","received_events_url":"https://api.github.com/users/oliverguenther/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/opf/openproject/pulls/3526/commits","review_comments_url":"https://api.github.com/repos/opf/openproject/pulls/3526/comments","review_comment_url":"https://api.github.com/repos/opf/openproject/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opf/openproject/issues/3526/comments","statuses_url":"https://api.github.com/repos/opf/openproject/statuses/2913ff3d17217a8ad24bc420823abb61e0466b74","head":{"label":"NobodysNightmare:feature/language_resilience","ref":"feature/language_resilience","sha":"2913ff3d17217a8ad24bc420823abb61e0466b74","user":{"login":"NobodysNightmare","id":453584,"avatar_url":"https://avatars.githubusercontent.com/u/453584?v=3","gravatar_id":"","url":"https://api.github.com/users/NobodysNightmare","html_url":"https://github.com/NobodysNightmare","followers_url":"https://api.github.com/users/NobodysNightmare/followers","following_url":"https://api.github.com/users/NobodysNightmare/following{/other_user}","gists_url":"https://api.github.com/users/NobodysNightmare/gists{/gist_id}","starred_url":"https://api.github.com/users/NobodysNightmare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NobodysNightmare/subscriptions","organizations_url":"https://api.github.com/users/NobodysNightmare/orgs","repos_url":"https://api.github.com/users/NobodysNightmare/repos","events_url":"https://api.github.com/users/NobodysNightmare/events{/privacy}","received_events_url":"https://api.github.com/users/NobodysNightmare/received_events","type":"User","site_admin":false},"repo":{"id":31598524,"name":"openproject","full_name":"NobodysNightmare/openproject","owner":{"login":"NobodysNightmare","id":453584,"avatar_url":"https://avatars.githubusercontent.com/u/453584?v=3","gravatar_id":"","url":"https://api.github.com/users/NobodysNightmare","html_url":"https://github.com/NobodysNightmare","followers_url":"https://api.github.com/users/NobodysNightmare/followers","following_url":"https://api.github.com/users/NobodysNightmare/following{/other_user}","gists_url":"https://api.github.com/users/NobodysNightmare/gists{/gist_id}","starred_url":"https://api.github.com/users/NobodysNightmare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NobodysNightmare/subscriptions","organizations_url":"https://api.github.com/users/NobodysNightmare/orgs","repos_url":"https://api.github.com/users/NobodysNightmare/repos","events_url":"https://api.github.com/users/NobodysNightmare/events{/privacy}","received_events_url":"https://api.github.com/users/NobodysNightmare/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NobodysNightmare/openproject","description":"OpenProject is a web-based project management system built on Ruby on Rails","fork":true,"url":"https://api.github.com/repos/NobodysNightmare/openproject","forks_url":"https://api.github.com/repos/NobodysNightmare/openproject/forks","keys_url":"https://api.github.com/repos/NobodysNightmare/openproject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NobodysNightmare/openproject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NobodysNightmare/openproject/teams","hooks_url":"https://api.github.com/repos/NobodysNightmare/openproject/hooks","issue_events_url":"https://api.github.com/repos/NobodysNightmare/openproject/issues/events{/number}","events_url":"https://api.github.com/repos/NobodysNightmare/openproject/events","assignees_url":"https://api.github.com/repos/NobodysNightmare/openproject/assignees{/user}","branches_url":"https://api.github.com/repos/NobodysNightmare/openproject/branches{/branch}","tags_url":"https://api.github.com/repos/NobodysNightmare/openproject/tags","blobs_url":"https://api.github.com/repos/NobodysNightmare/openproject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NobodysNightmare/openproject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NobodysNightmare/openproject/git/refs{/sha}","trees_url":"https://api.github.com/repos/NobodysNightmare/openproject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NobodysNightmare/openproject/statuses/{sha}","languages_url":"https://api.github.com/repos/NobodysNightmare/openproject/languages","stargazers_url":"https://api.github.com/repos/NobodysNightmare/openproject/stargazers","contributors_url":"https://api.github.com/repos/NobodysNightmare/openproject/contributors","subscribers_url":"https://api.github.com/repos/NobodysNightmare/openproject/subscribers","subscription_url":"https://api.github.com/repos/NobodysNightmare/openproject/subscription","commits_url":"https://api.github.com/repos/NobodysNightmare/openproject/commits{/sha}","git_commits_url":"https://api.github.com/repos/NobodysNightmare/openproject/git/commits{/sha}","comments_url":"https://api.github.com/repos/NobodysNightmare/openproject/comments{/number}","issue_comment_url":"https://api.github.com/repos/NobodysNightmare/openproject/issues/comments{/number}","contents_url":"https://api.github.com/repos/NobodysNightmare/openproject/contents/{+path}","compare_url":"https://api.github.com/repos/NobodysNightmare/openproject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NobodysNightmare/openproject/merges","archive_url":"https://api.github.com/repos/NobodysNightmare/openproject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NobodysNightmare/openproject/downloads","issues_url":"https://api.github.com/repos/NobodysNightmare/openproject/issues{/number}","pulls_url":"https://api.github.com/repos/NobodysNightmare/openproject/pulls{/number}","milestones_url":"https://api.github.com/repos/NobodysNightmare/openproject/milestones{/number}","notifications_url":"https://api.github.com/repos/NobodysNightmare/openproject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NobodysNightmare/openproject/labels{/name}","releases_url":"https://api.github.com/repos/NobodysNightmare/openproject/releases{/id}","created_at":"2015-03-03T13:00:18Z","updated_at":"2015-04-01T12:02:52Z","pushed_at":"2015-09-21T14:25:36Z","git_url":"git://github.com/NobodysNightmare/openproject.git","ssh_url":"git@github.com:NobodysNightmare/openproject.git","clone_url":"https://github.com/NobodysNightmare/openproject.git","svn_url":"https://github.com/NobodysNightmare/openproject","homepage":"https://www.openproject.org","size":69979,"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":"dev"}},"base":{"label":"opf:dev","ref":"dev","sha":"654aff766f8362f06ffe5fb5c95415c5dc4882a6","user":{"login":"opf","id":1756674,"avatar_url":"https://avatars.githubusercontent.com/u/1756674?v=3","gravatar_id":"","url":"https://api.github.com/users/opf","html_url":"https://github.com/opf","followers_url":"https://api.github.com/users/opf/followers","following_url":"https://api.github.com/users/opf/following{/other_user}","gists_url":"https://api.github.com/users/opf/gists{/gist_id}","starred_url":"https://api.github.com/users/opf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opf/subscriptions","organizations_url":"https://api.github.com/users/opf/orgs","repos_url":"https://api.github.com/users/opf/repos","events_url":"https://api.github.com/users/opf/events{/privacy}","received_events_url":"https://api.github.com/users/opf/received_events","type":"Organization","site_admin":false},"repo":{"id":6899875,"name":"openproject","full_name":"opf/openproject","owner":{"login":"opf","id":1756674,"avatar_url":"https://avatars.githubusercontent.com/u/1756674?v=3","gravatar_id":"","url":"https://api.github.com/users/opf","html_url":"https://github.com/opf","followers_url":"https://api.github.com/users/opf/followers","following_url":"https://api.github.com/users/opf/following{/other_user}","gists_url":"https://api.github.com/users/opf/gists{/gist_id}","starred_url":"https://api.github.com/users/opf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opf/subscriptions","organizations_url":"https://api.github.com/users/opf/orgs","repos_url":"https://api.github.com/users/opf/repos","events_url":"https://api.github.com/users/opf/events{/privacy}","received_events_url":"https://api.github.com/users/opf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opf/openproject","description":"OpenProject is a web-based project management system built on Ruby on Rails","fork":false,"url":"https://api.github.com/repos/opf/openproject","forks_url":"https://api.github.com/repos/opf/openproject/forks","keys_url":"https://api.github.com/repos/opf/openproject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opf/openproject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opf/openproject/teams","hooks_url":"https://api.github.com/repos/opf/openproject/hooks","issue_events_url":"https://api.github.com/repos/opf/openproject/issues/events{/number}","events_url":"https://api.github.com/repos/opf/openproject/events","assignees_url":"https://api.github.com/repos/opf/openproject/assignees{/user}","branches_url":"https://api.github.com/repos/opf/openproject/branches{/branch}","tags_url":"https://api.github.com/repos/opf/openproject/tags","blobs_url":"https://api.github.com/repos/opf/openproject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opf/openproject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opf/openproject/git/refs{/sha}","trees_url":"https://api.github.com/repos/opf/openproject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opf/openproject/statuses/{sha}","languages_url":"https://api.github.com/repos/opf/openproject/languages","stargazers_url":"https://api.github.com/repos/opf/openproject/stargazers","contributors_url":"https://api.github.com/repos/opf/openproject/contributors","subscribers_url":"https://api.github.com/repos/opf/openproject/subscribers","subscription_url":"https://api.github.com/repos/opf/openproject/subscription","commits_url":"https://api.github.com/repos/opf/openproject/commits{/sha}","git_commits_url":"https://api.github.com/repos/opf/openproject/git/commits{/sha}","comments_url":"https://api.github.com/repos/opf/openproject/comments{/number}","issue_comment_url":"https://api.github.com/repos/opf/openproject/issues/comments{/number}","contents_url":"https://api.github.com/repos/opf/openproject/contents/{+path}","compare_url":"https://api.github.com/repos/opf/openproject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opf/openproject/merges","archive_url":"https://api.github.com/repos/opf/openproject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opf/openproject/downloads","issues_url":"https://api.github.com/repos/opf/openproject/issues{/number}","pulls_url":"https://api.github.com/repos/opf/openproject/pulls{/number}","milestones_url":"https://api.github.com/repos/opf/openproject/milestones{/number}","notifications_url":"https://api.github.com/repos/opf/openproject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opf/openproject/labels{/name}","releases_url":"https://api.github.com/repos/opf/openproject/releases{/id}","created_at":"2012-11-28T09:59:11Z","updated_at":"2015-09-21T08:52:37Z","pushed_at":"2015-09-21T15:49:04Z","git_url":"git://github.com/opf/openproject.git","ssh_url":"git@github.com:opf/openproject.git","clone_url":"https://github.com/opf/openproject.git","svn_url":"https://github.com/opf/openproject","homepage":"https://www.openproject.org","size":214214,"stargazers_count":752,"watchers_count":752,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":307,"mirror_url":null,"open_issues_count":20,"forks":307,"open_issues":20,"watchers":752,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/opf/openproject/pulls/3526"},"html":{"href":"https://github.com/opf/openproject/pull/3526"},"issue":{"href":"https://api.github.com/repos/opf/openproject/issues/3526"},"comments":{"href":"https://api.github.com/repos/opf/openproject/issues/3526/comments"},"review_comments":{"href":"https://api.github.com/repos/opf/openproject/pulls/3526/comments"},"review_comment":{"href":"https://api.github.com/repos/opf/openproject/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opf/openproject/pulls/3526/commits"},"statuses":{"href":"https://api.github.com/repos/opf/openproject/statuses/2913ff3d17217a8ad24bc420823abb61e0466b74"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"oliverguenther","id":459462,"avatar_url":"https://avatars.githubusercontent.com/u/459462?v=3","gravatar_id":"","url":"https://api.github.com/users/oliverguenther","html_url":"https://github.com/oliverguenther","followers_url":"https://api.github.com/users/oliverguenther/followers","following_url":"https://api.github.com/users/oliverguenther/following{/other_user}","gists_url":"https://api.github.com/users/oliverguenther/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverguenther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverguenther/subscriptions","organizations_url":"https://api.github.com/users/oliverguenther/orgs","repos_url":"https://api.github.com/users/oliverguenther/repos","events_url":"https://api.github.com/users/oliverguenther/events{/privacy}","received_events_url":"https://api.github.com/users/oliverguenther/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":2,"additions":49,"deletions":12,"changed_files":3}}