{"action":"opened","number":127,"pull_request":{"url":"https://api.github.com/repos/zsigmondrab/liferay-portal/pulls/127","id":51958401,"html_url":"https://github.com/zsigmondrab/liferay-portal/pull/127","diff_url":"https://github.com/zsigmondrab/liferay-portal/pull/127.diff","patch_url":"https://github.com/zsigmondrab/liferay-portal/pull/127.patch","issue_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/issues/127","number":127,"state":"open","locked":false,"title":"LPS-60636(Technical Support) New solution.","user":{"login":"zxdgoal","id":4162471,"avatar_url":"https://avatars.githubusercontent.com/u/4162471?v=3","gravatar_id":"","url":"https://api.github.com/users/zxdgoal","html_url":"https://github.com/zxdgoal","followers_url":"https://api.github.com/users/zxdgoal/followers","following_url":"https://api.github.com/users/zxdgoal/following{/other_user}","gists_url":"https://api.github.com/users/zxdgoal/gists{/gist_id}","starred_url":"https://api.github.com/users/zxdgoal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxdgoal/subscriptions","organizations_url":"https://api.github.com/users/zxdgoal/orgs","repos_url":"https://api.github.com/users/zxdgoal/repos","events_url":"https://api.github.com/users/zxdgoal/events{/privacy}","received_events_url":"https://api.github.com/users/zxdgoal/received_events","type":"User","site_admin":false},"body":"Hey Zsigmond.\r\n\r\nI have to reopen LPS-60636 as I figure out a new solution which works on both trunk and 6.2.x\r\n\r\nFirst of all, I chose to use ``I18N_LANGUAGE_CODE`` instead of ``I18N_LANGUAGE_ID``.\r\n\r\nThe major reason is that, in 6.2.x, our previous fix does work is due to this code in I18nServlet.java\r\n\r\n```\r\n\t\tString i18nPath = StringPool.SLASH + i18nLanguageId;\r\n\r\n\t\tLocale locale = LocaleUtil.fromLanguageId(i18nLanguageId);\r\n\r\n\t\tString i18nLanguageCode = locale.getLanguage();\r\n\r\n\t\tif (Validator.isNull(locale.getCountry())) {\r\n\r\n\t\t\t// Locales must contain the country code\r\n\r\n\t\t\tlocale = LanguageUtil.getLocale(i18nLanguageCode);\r\n\r\n\t\t\ti18nLanguageId = LocaleUtil.toLanguageId(locale);\r\n\t\t}\r\n```\r\nAs discussed, LocaleUtil is filled with ``locales`` , so ``i18nLanguageCode`` is the original, i.e. ``fr``. But the i18nLanguageId is reassigned to default locale, e.g. ``en_us`` because ``locale`` from ``LanguageUtil.getLocale(i18nLanguageCode);`` is ``null``.\r\n\r\n``LanguageUtil`` is considering the locale as ``company`` level, so it will just return locales in ``locales.enable``.\r\n\r\nSimilarly, I also change to use ``LanguageUtil`` in https://github.com/zsigmondrab/liferay-portal/blob/cb88717e5bcadca1e9b1313fe457bab77413e4c2/portal-impl/src/com/liferay/portal/servlet/FriendlyURLServlet.java#L355-L356\r\nso that it is able to return null for locales which are not in ``locales.enable``\r\n\r\nFinally, I have to admit that I made these two mistakes.\r\n\r\nSorry for that.\r\n\r\nThanks\r\nJohn..","created_at":"2015-11-27T04:01:42Z","updated_at":"2015-11-27T04:01:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/pulls/127/commits","review_comments_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/pulls/127/comments","review_comment_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/issues/127/comments","statuses_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/statuses/cb88717e5bcadca1e9b1313fe457bab77413e4c2","head":{"label":"zxdgoal:LPS-60636","ref":"LPS-60636","sha":"cb88717e5bcadca1e9b1313fe457bab77413e4c2","user":{"login":"zxdgoal","id":4162471,"avatar_url":"https://avatars.githubusercontent.com/u/4162471?v=3","gravatar_id":"","url":"https://api.github.com/users/zxdgoal","html_url":"https://github.com/zxdgoal","followers_url":"https://api.github.com/users/zxdgoal/followers","following_url":"https://api.github.com/users/zxdgoal/following{/other_user}","gists_url":"https://api.github.com/users/zxdgoal/gists{/gist_id}","starred_url":"https://api.github.com/users/zxdgoal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxdgoal/subscriptions","organizations_url":"https://api.github.com/users/zxdgoal/orgs","repos_url":"https://api.github.com/users/zxdgoal/repos","events_url":"https://api.github.com/users/zxdgoal/events{/privacy}","received_events_url":"https://api.github.com/users/zxdgoal/received_events","type":"User","site_admin":false},"repo":{"id":21023471,"name":"liferay-portal","full_name":"zxdgoal/liferay-portal","owner":{"login":"zxdgoal","id":4162471,"avatar_url":"https://avatars.githubusercontent.com/u/4162471?v=3","gravatar_id":"","url":"https://api.github.com/users/zxdgoal","html_url":"https://github.com/zxdgoal","followers_url":"https://api.github.com/users/zxdgoal/followers","following_url":"https://api.github.com/users/zxdgoal/following{/other_user}","gists_url":"https://api.github.com/users/zxdgoal/gists{/gist_id}","starred_url":"https://api.github.com/users/zxdgoal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxdgoal/subscriptions","organizations_url":"https://api.github.com/users/zxdgoal/orgs","repos_url":"https://api.github.com/users/zxdgoal/repos","events_url":"https://api.github.com/users/zxdgoal/events{/privacy}","received_events_url":"https://api.github.com/users/zxdgoal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zxdgoal/liferay-portal","description":"","fork":true,"url":"https://api.github.com/repos/zxdgoal/liferay-portal","forks_url":"https://api.github.com/repos/zxdgoal/liferay-portal/forks","keys_url":"https://api.github.com/repos/zxdgoal/liferay-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zxdgoal/liferay-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zxdgoal/liferay-portal/teams","hooks_url":"https://api.github.com/repos/zxdgoal/liferay-portal/hooks","issue_events_url":"https://api.github.com/repos/zxdgoal/liferay-portal/issues/events{/number}","events_url":"https://api.github.com/repos/zxdgoal/liferay-portal/events","assignees_url":"https://api.github.com/repos/zxdgoal/liferay-portal/assignees{/user}","branches_url":"https://api.github.com/repos/zxdgoal/liferay-portal/branches{/branch}","tags_url":"https://api.github.com/repos/zxdgoal/liferay-portal/tags","blobs_url":"https://api.github.com/repos/zxdgoal/liferay-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zxdgoal/liferay-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zxdgoal/liferay-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/zxdgoal/liferay-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zxdgoal/liferay-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/zxdgoal/liferay-portal/languages","stargazers_url":"https://api.github.com/repos/zxdgoal/liferay-portal/stargazers","contributors_url":"https://api.github.com/repos/zxdgoal/liferay-portal/contributors","subscribers_url":"https://api.github.com/repos/zxdgoal/liferay-portal/subscribers","subscription_url":"https://api.github.com/repos/zxdgoal/liferay-portal/subscription","commits_url":"https://api.github.com/repos/zxdgoal/liferay-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/zxdgoal/liferay-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/zxdgoal/liferay-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/zxdgoal/liferay-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/zxdgoal/liferay-portal/contents/{+path}","compare_url":"https://api.github.com/repos/zxdgoal/liferay-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zxdgoal/liferay-portal/merges","archive_url":"https://api.github.com/repos/zxdgoal/liferay-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zxdgoal/liferay-portal/downloads","issues_url":"https://api.github.com/repos/zxdgoal/liferay-portal/issues{/number}","pulls_url":"https://api.github.com/repos/zxdgoal/liferay-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/zxdgoal/liferay-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/zxdgoal/liferay-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zxdgoal/liferay-portal/labels{/name}","releases_url":"https://api.github.com/repos/zxdgoal/liferay-portal/releases{/id}","created_at":"2014-06-20T03:01:56Z","updated_at":"2015-04-23T23:41:34Z","pushed_at":"2015-11-27T03:52:17Z","git_url":"git://github.com/zxdgoal/liferay-portal.git","ssh_url":"git@github.com:zxdgoal/liferay-portal.git","clone_url":"https://github.com/zxdgoal/liferay-portal.git","svn_url":"https://github.com/zxdgoal/liferay-portal","homepage":"http://liferay.com","size":5339565,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"zsigmondrab:master","ref":"master","sha":"181b0b2f87b87f95057df97cb186c3a22be13782","user":{"login":"zsigmondrab","id":861161,"avatar_url":"https://avatars.githubusercontent.com/u/861161?v=3","gravatar_id":"","url":"https://api.github.com/users/zsigmondrab","html_url":"https://github.com/zsigmondrab","followers_url":"https://api.github.com/users/zsigmondrab/followers","following_url":"https://api.github.com/users/zsigmondrab/following{/other_user}","gists_url":"https://api.github.com/users/zsigmondrab/gists{/gist_id}","starred_url":"https://api.github.com/users/zsigmondrab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsigmondrab/subscriptions","organizations_url":"https://api.github.com/users/zsigmondrab/orgs","repos_url":"https://api.github.com/users/zsigmondrab/repos","events_url":"https://api.github.com/users/zsigmondrab/events{/privacy}","received_events_url":"https://api.github.com/users/zsigmondrab/received_events","type":"User","site_admin":false},"repo":{"id":1922518,"name":"liferay-portal","full_name":"zsigmondrab/liferay-portal","owner":{"login":"zsigmondrab","id":861161,"avatar_url":"https://avatars.githubusercontent.com/u/861161?v=3","gravatar_id":"","url":"https://api.github.com/users/zsigmondrab","html_url":"https://github.com/zsigmondrab","followers_url":"https://api.github.com/users/zsigmondrab/followers","following_url":"https://api.github.com/users/zsigmondrab/following{/other_user}","gists_url":"https://api.github.com/users/zsigmondrab/gists{/gist_id}","starred_url":"https://api.github.com/users/zsigmondrab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsigmondrab/subscriptions","organizations_url":"https://api.github.com/users/zsigmondrab/orgs","repos_url":"https://api.github.com/users/zsigmondrab/repos","events_url":"https://api.github.com/users/zsigmondrab/events{/privacy}","received_events_url":"https://api.github.com/users/zsigmondrab/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zsigmondrab/liferay-portal","description":"","fork":true,"url":"https://api.github.com/repos/zsigmondrab/liferay-portal","forks_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/forks","keys_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/teams","hooks_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/hooks","issue_events_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/issues/events{/number}","events_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/events","assignees_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/assignees{/user}","branches_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/branches{/branch}","tags_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/tags","blobs_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/languages","stargazers_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/stargazers","contributors_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/contributors","subscribers_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/subscribers","subscription_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/subscription","commits_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/contents/{+path}","compare_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/merges","archive_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/downloads","issues_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/issues{/number}","pulls_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/labels{/name}","releases_url":"https://api.github.com/repos/zsigmondrab/liferay-portal/releases{/id}","created_at":"2011-06-20T08:12:18Z","updated_at":"2015-05-08T07:11:00Z","pushed_at":"2015-11-27T04:01:42Z","git_url":"git://github.com/zsigmondrab/liferay-portal.git","ssh_url":"git@github.com:zsigmondrab/liferay-portal.git","clone_url":"https://github.com/zsigmondrab/liferay-portal.git","svn_url":"https://github.com/zsigmondrab/liferay-portal","homepage":"http://liferay.com","size":5252354,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zsigmondrab/liferay-portal/pulls/127"},"html":{"href":"https://github.com/zsigmondrab/liferay-portal/pull/127"},"issue":{"href":"https://api.github.com/repos/zsigmondrab/liferay-portal/issues/127"},"comments":{"href":"https://api.github.com/repos/zsigmondrab/liferay-portal/issues/127/comments"},"review_comments":{"href":"https://api.github.com/repos/zsigmondrab/liferay-portal/pulls/127/comments"},"review_comment":{"href":"https://api.github.com/repos/zsigmondrab/liferay-portal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zsigmondrab/liferay-portal/pulls/127/commits"},"statuses":{"href":"https://api.github.com/repos/zsigmondrab/liferay-portal/statuses/cb88717e5bcadca1e9b1313fe457bab77413e4c2"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":114,"additions":6291,"deletions":2612,"changed_files":301}}