{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/49939290","id":49939290,"diff_hunk":"@@ -37,16 +38,14 @@ export default React.createClass( {\n \trender() {\n \t\tlet title;\n \n-\t\tif ( this.props.postViewsList.response.post && this.props.postViewsList.response.post.post_title ) {\n-\t\t\ttitle = this.translate( 'Stats for %(posttitle)s', {\n-\t\t\t\tcomment: 'Title of the individual post stats page.',\n-\t\t\t\targs: {\n-\t\t\t\t\tposttitle: this.props.postViewsList.response.post.post_title\n-\t\t\t\t}\n-\t\t\t} );\n-\t\t}\n+\t\tconst post = this.props.postViewsList.response.post;\n+\t\tconst postOnRecord = post && post.post_title !== null;\n \n-\t\tif ( this.props.postViewsList.isError() ) {\n+\t\tif ( postOnRecord && ! this.props.postViewsList.isError() ) {","path":"client/my-sites/stats/stats-post-detail/index.jsx","position":24,"original_position":24,"commit_id":"cc91a95ec9ff30e26570fe76426e6984b0fddb9a","original_commit_id":"cc91a95ec9ff30e26570fe76426e6984b0fddb9a","user":{"login":"jblz","id":1587282,"avatar_url":"https://avatars.githubusercontent.com/u/1587282?v=3","gravatar_id":"","url":"https://api.github.com/users/jblz","html_url":"https://github.com/jblz","followers_url":"https://api.github.com/users/jblz/followers","following_url":"https://api.github.com/users/jblz/following{/other_user}","gists_url":"https://api.github.com/users/jblz/gists{/gist_id}","starred_url":"https://api.github.com/users/jblz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jblz/subscriptions","organizations_url":"https://api.github.com/users/jblz/orgs","repos_url":"https://api.github.com/users/jblz/repos","events_url":"https://api.github.com/users/jblz/events{/privacy}","received_events_url":"https://api.github.com/users/jblz/received_events","type":"User","site_admin":false},"body":"I took out the `this.props.postViewsList.isError()` check and could not trigger any odd behavior.\r\n\r\n@jonathansadowski: Looks like you included this originally -- do you know if it's still needed?","created_at":"2016-01-17T00:33:06Z","updated_at":"2016-01-17T00:33:06Z","html_url":"https://github.com/Automattic/wp-calypso/pull/2393#discussion_r49939290","pull_request_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/2393","_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/49939290"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/2393#discussion_r49939290"},"pull_request":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/2393"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/2393","id":55952383,"html_url":"https://github.com/Automattic/wp-calypso/pull/2393","diff_url":"https://github.com/Automattic/wp-calypso/pull/2393.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/2393.patch","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2393","number":2393,"state":"open","locked":false,"title":"Stats: Use Emojify on the individual post stats page","user":{"login":"jblz","id":1587282,"avatar_url":"https://avatars.githubusercontent.com/u/1587282?v=3","gravatar_id":"","url":"https://api.github.com/users/jblz","html_url":"https://github.com/jblz","followers_url":"https://api.github.com/users/jblz/followers","following_url":"https://api.github.com/users/jblz/following{/other_user}","gists_url":"https://api.github.com/users/jblz/gists{/gist_id}","starred_url":"https://api.github.com/users/jblz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jblz/subscriptions","organizations_url":"https://api.github.com/users/jblz/orgs","repos_url":"https://api.github.com/users/jblz/repos","events_url":"https://api.github.com/users/jblz/events{/privacy}","received_events_url":"https://api.github.com/users/jblz/received_events","type":"User","site_admin":false},"body":"The [`Emojfiy` component](https://github.com/Automattic/wp-calypso/tree/f38bc98ab8539548cbf4431204159c3aae947fde/client/components/emojify) was removed from the post title on the post stats page in b464be8 because it wasn't working properly.\r\n\r\nThis correctly applies it to the post title only -- not the localized string `Stats for <PostTitle>`. It removes the translate call altogether since doing this sort of replacement (text to text nodes & maybe some `img` nodes) on a translated string is non-insignificant with regard to multibyte strings & RTL languages.\r\n\r\nTranslated labels should be separate from any string that needs Emojification. If we decide the `HeaderCake` needs some label aside from the post title, it should be in a separately-styled `span` or other inline containing component.\r\n\r\nTo test:\r\n* Create (or find) a post with emoji in the title (🤘) & make note of its `post_id`\r\n* Ensure it has some traffic (visit it while logged-out if it doesn't & wait a couple of minutes)\r\n* Visit http://calypso.localhost:3000/stats/post/post_id_here/site_slug_here\r\n* Make sure the the title is rendered correctly:\r\n  * emoji are converted to twemoji `img`s on our CDN\r\n  * re-renders are kept to a minimum, etc.\r\n* Do the same for a post without emoji in the tile & make sure it renders correctly","created_at":"2016-01-13T20:40:07Z","updated_at":"2016-01-17T00:33:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30ce93cd721af552c9a03fb59616b312531b3365","assignee":{"login":"timmyc","id":22080,"avatar_url":"https://avatars.githubusercontent.com/u/22080?v=3","gravatar_id":"","url":"https://api.github.com/users/timmyc","html_url":"https://github.com/timmyc","followers_url":"https://api.github.com/users/timmyc/followers","following_url":"https://api.github.com/users/timmyc/following{/other_user}","gists_url":"https://api.github.com/users/timmyc/gists{/gist_id}","starred_url":"https://api.github.com/users/timmyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timmyc/subscriptions","organizations_url":"https://api.github.com/users/timmyc/orgs","repos_url":"https://api.github.com/users/timmyc/repos","events_url":"https://api.github.com/users/timmyc/events{/privacy}","received_events_url":"https://api.github.com/users/timmyc/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/2393/commits","review_comments_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/2393/comments","review_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/2393/comments","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/cc91a95ec9ff30e26570fe76426e6984b0fddb9a","head":{"label":"Automattic:use/emojify-post-stats","ref":"use/emojify-post-stats","sha":"cc91a95ec9ff30e26570fe76426e6984b0fddb9a","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","created_at":"2015-11-10T20:00:16Z","updated_at":"2016-01-16T16:24:26Z","pushed_at":"2016-01-16T23:11:13Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":26939,"stargazers_count":6593,"watchers_count":6593,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":730,"mirror_url":null,"open_issues_count":1150,"forks":730,"open_issues":1150,"watchers":6593,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"f38bc98ab8539548cbf4431204159c3aae947fde","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","created_at":"2015-11-10T20:00:16Z","updated_at":"2016-01-16T16:24:26Z","pushed_at":"2016-01-16T23:11:13Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":26939,"stargazers_count":6593,"watchers_count":6593,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":730,"mirror_url":null,"open_issues_count":1150,"forks":730,"open_issues":1150,"watchers":6593,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/2393"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/2393"},"issue":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/2393"},"comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/2393/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/2393/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/2393/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/wp-calypso/statuses/cc91a95ec9ff30e26570fe76426e6984b0fddb9a"}}}}