{"action":"created","comment":{"url":"https://api.github.com/repos/Wikia/mercury/pulls/comments/53780144","id":53780144,"diff_hunk":"@@ -0,0 +1,81 @@\n+import Ember from 'ember';\n+import moment from 'moment';\n+\n+export default Ember.Service.extend({\n+\tisLoaded: false,\n+\tisLoading: false,\n+\t// Path to all supported locales, so they can be revved\n+\tlocalePath: {\n+\t\tde: '/front/main/moment/de.js',\n+\t\tes: '/front/main/moment/es.js',\n+\t\tfr: '/front/main/moment/fr.js',\n+\t\tit: '/front/main/moment/it.js',\n+\t\tja: '/front/main/moment/ja.js',\n+\t\tpl: '/front/main/moment/pl.js',\n+\t\t'pt-br': '/front/main/moment/pt-br.js',\n+\t\tru: '/front/main/moment/ru.js',\n+\t\t'zh-cn': '/front/main/moment/zh-cn.js',\n+\t\t'zh-tw': '/front/main/moment/zh-tw.js'\n+\t},\n+\t/**\n+\t * Changes status of downloading moment's locale to trigger helper's observers\n+\t *\n+\t * @param {boolean} done\n+\t * @return {void}\n+\t */\n+\tchangeLoadingStatus(done = true) {\n+\t\tthis.setProperties({\n+\t\t\tisLoaded: done,\n+\t\t\tisLoading: !done\n+\t\t});\n+\t},\n+\t/**\n+\t * Changes moment locale to en. It's loaded by default, so we don't need to download it\n+\t *\n+\t * @return {void}\n+\t */\n+\tsetEnLocale() {\n+\t\tmoment.locale('en');\n+\t\t// Change status when moment finished changing locale\n+\t\tEmber.run.next(() => {\n+\t\t\tthis.changeLoadingStatus();\n+\t\t});\n+\t},\n+\t/**\n+\t * Downloads locale for moment if content language is not en, otherwise just changes to en\n+\t *\n+\t * @return {void}\n+\t */\n+\tloadLocale() {\n+\t\tif (!this.isLoading) {\n+\t\t\tconst contentLang = Ember.get(Mercury, 'wiki.language.content'),\n+\t\t\t\tlang = this.localePath.hasOwnProperty(contentLang) ? contentLang : 'en';","path":"front/main/app/services/moment-locale.js","position":52,"original_position":52,"commit_id":"b5a4ba5ec1a8efd01018e65a039c144acc7a0c1c","original_commit_id":"b5a4ba5ec1a8efd01018e65a039c144acc7a0c1c","user":{"login":"rafalkalinski","id":783239,"avatar_url":"https://avatars.githubusercontent.com/u/783239?v=3","gravatar_id":"","url":"https://api.github.com/users/rafalkalinski","html_url":"https://github.com/rafalkalinski","followers_url":"https://api.github.com/users/rafalkalinski/followers","following_url":"https://api.github.com/users/rafalkalinski/following{/other_user}","gists_url":"https://api.github.com/users/rafalkalinski/gists{/gist_id}","starred_url":"https://api.github.com/users/rafalkalinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafalkalinski/subscriptions","organizations_url":"https://api.github.com/users/rafalkalinski/orgs","repos_url":"https://api.github.com/users/rafalkalinski/repos","events_url":"https://api.github.com/users/rafalkalinski/events{/privacy}","received_events_url":"https://api.github.com/users/rafalkalinski/received_events","type":"User","site_admin":false},"body":"so if 'localePath\" object will inherit \"contentLang\" property form some parent object, then it should be always 'en'?","created_at":"2016-02-23T13:40:35Z","updated_at":"2016-02-23T13:40:35Z","html_url":"https://github.com/Wikia/mercury/pull/1963#discussion_r53780144","pull_request_url":"https://api.github.com/repos/Wikia/mercury/pulls/1963","_links":{"self":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/comments/53780144"},"html":{"href":"https://github.com/Wikia/mercury/pull/1963#discussion_r53780144"},"pull_request":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/1963"}}},"pull_request":{"url":"https://api.github.com/repos/Wikia/mercury/pulls/1963","id":58305067,"html_url":"https://github.com/Wikia/mercury/pull/1963","diff_url":"https://github.com/Wikia/mercury/pull/1963.diff","patch_url":"https://github.com/Wikia/mercury/pull/1963.patch","issue_url":"https://api.github.com/repos/Wikia/mercury/issues/1963","number":1963,"state":"open","locked":false,"title":"SOC-1376 | As a user I would like to see the timestamp of a post or a reply a certain way","user":{"login":"Bloodmoon24","id":9107458,"avatar_url":"https://avatars.githubusercontent.com/u/9107458?v=3","gravatar_id":"","url":"https://api.github.com/users/Bloodmoon24","html_url":"https://github.com/Bloodmoon24","followers_url":"https://api.github.com/users/Bloodmoon24/followers","following_url":"https://api.github.com/users/Bloodmoon24/following{/other_user}","gists_url":"https://api.github.com/users/Bloodmoon24/gists{/gist_id}","starred_url":"https://api.github.com/users/Bloodmoon24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bloodmoon24/subscriptions","organizations_url":"https://api.github.com/users/Bloodmoon24/orgs","repos_url":"https://api.github.com/users/Bloodmoon24/repos","events_url":"https://api.github.com/users/Bloodmoon24/events{/privacy}","received_events_url":"https://api.github.com/users/Bloodmoon24/received_events","type":"User","site_admin":false},"body":"https://wikia-inc.atlassian.net/browse/SOC-1376\r\n@bkoval @bognix ","created_at":"2016-02-04T15:47:29Z","updated_at":"2016-02-23T13:40:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4cdba43326c256ef2341eb9a7e9ba88efd79cebe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Wikia/mercury/pulls/1963/commits","review_comments_url":"https://api.github.com/repos/Wikia/mercury/pulls/1963/comments","review_comment_url":"https://api.github.com/repos/Wikia/mercury/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wikia/mercury/issues/1963/comments","statuses_url":"https://api.github.com/repos/Wikia/mercury/statuses/b5a4ba5ec1a8efd01018e65a039c144acc7a0c1c","head":{"label":"Wikia:SOC-1376","ref":"SOC-1376","sha":"b5a4ba5ec1a8efd01018e65a039c144acc7a0c1c","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":16710430,"name":"mercury","full_name":"Wikia/mercury","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/mercury","description":"Wikia Web application","fork":false,"url":"https://api.github.com/repos/Wikia/mercury","forks_url":"https://api.github.com/repos/Wikia/mercury/forks","keys_url":"https://api.github.com/repos/Wikia/mercury/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/mercury/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/mercury/teams","hooks_url":"https://api.github.com/repos/Wikia/mercury/hooks","issue_events_url":"https://api.github.com/repos/Wikia/mercury/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/mercury/events","assignees_url":"https://api.github.com/repos/Wikia/mercury/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/mercury/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/mercury/tags","blobs_url":"https://api.github.com/repos/Wikia/mercury/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/mercury/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/mercury/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/mercury/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/mercury/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/mercury/languages","stargazers_url":"https://api.github.com/repos/Wikia/mercury/stargazers","contributors_url":"https://api.github.com/repos/Wikia/mercury/contributors","subscribers_url":"https://api.github.com/repos/Wikia/mercury/subscribers","subscription_url":"https://api.github.com/repos/Wikia/mercury/subscription","commits_url":"https://api.github.com/repos/Wikia/mercury/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/mercury/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/mercury/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/mercury/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/mercury/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/mercury/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/mercury/merges","archive_url":"https://api.github.com/repos/Wikia/mercury/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/mercury/downloads","issues_url":"https://api.github.com/repos/Wikia/mercury/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/mercury/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/mercury/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/mercury/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/mercury/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/mercury/releases{/id}","deployments_url":"https://api.github.com/repos/Wikia/mercury/deployments","created_at":"2014-02-10T21:44:25Z","updated_at":"2016-01-11T15:58:43Z","pushed_at":"2016-02-23T13:23:56Z","git_url":"git://github.com/Wikia/mercury.git","ssh_url":"git@github.com:Wikia/mercury.git","clone_url":"https://github.com/Wikia/mercury.git","svn_url":"https://github.com/Wikia/mercury","homepage":"","size":76216,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":18,"forks":6,"open_issues":18,"watchers":12,"default_branch":"dev"}},"base":{"label":"Wikia:dev","ref":"dev","sha":"927023da577162f3da900aa31459fba478be9e4e","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":16710430,"name":"mercury","full_name":"Wikia/mercury","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/mercury","description":"Wikia Web application","fork":false,"url":"https://api.github.com/repos/Wikia/mercury","forks_url":"https://api.github.com/repos/Wikia/mercury/forks","keys_url":"https://api.github.com/repos/Wikia/mercury/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/mercury/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/mercury/teams","hooks_url":"https://api.github.com/repos/Wikia/mercury/hooks","issue_events_url":"https://api.github.com/repos/Wikia/mercury/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/mercury/events","assignees_url":"https://api.github.com/repos/Wikia/mercury/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/mercury/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/mercury/tags","blobs_url":"https://api.github.com/repos/Wikia/mercury/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/mercury/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/mercury/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/mercury/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/mercury/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/mercury/languages","stargazers_url":"https://api.github.com/repos/Wikia/mercury/stargazers","contributors_url":"https://api.github.com/repos/Wikia/mercury/contributors","subscribers_url":"https://api.github.com/repos/Wikia/mercury/subscribers","subscription_url":"https://api.github.com/repos/Wikia/mercury/subscription","commits_url":"https://api.github.com/repos/Wikia/mercury/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/mercury/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/mercury/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/mercury/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/mercury/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/mercury/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/mercury/merges","archive_url":"https://api.github.com/repos/Wikia/mercury/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/mercury/downloads","issues_url":"https://api.github.com/repos/Wikia/mercury/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/mercury/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/mercury/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/mercury/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/mercury/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/mercury/releases{/id}","deployments_url":"https://api.github.com/repos/Wikia/mercury/deployments","created_at":"2014-02-10T21:44:25Z","updated_at":"2016-01-11T15:58:43Z","pushed_at":"2016-02-23T13:23:56Z","git_url":"git://github.com/Wikia/mercury.git","ssh_url":"git@github.com:Wikia/mercury.git","clone_url":"https://github.com/Wikia/mercury.git","svn_url":"https://github.com/Wikia/mercury","homepage":"","size":76216,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":18,"forks":6,"open_issues":18,"watchers":12,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/1963"},"html":{"href":"https://github.com/Wikia/mercury/pull/1963"},"issue":{"href":"https://api.github.com/repos/Wikia/mercury/issues/1963"},"comments":{"href":"https://api.github.com/repos/Wikia/mercury/issues/1963/comments"},"review_comments":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/1963/comments"},"review_comment":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/1963/commits"},"statuses":{"href":"https://api.github.com/repos/Wikia/mercury/statuses/b5a4ba5ec1a8efd01018e65a039c144acc7a0c1c"}}}}