GitHub PullRequestEvent at 2014-02-19 01:08:56
Repository: kitsune
Actor: mythmon
Payload: {"action":"opened","number":1827,"pull_request":{"url":"https://api.github.com/repos/mozilla/kitsune/pulls/1827","id":12680100,"html_url":"https://github.com/mozilla/kitsune/pull/1827","diff_url":"https://github.com/mozilla/kitsune/pull/1827.diff","patch_url":"https://github.com/mozilla/kitsune/pull/1827.patch","issue_url":"https://api.github.com/repos/mozilla/kitsune/issues/1827","number":1827,"state":"open","title":"[Bug 966337] Localize TOC header at render time.","user":{"login":"mythmon","id":305049,"avatar_url":"https://gravatar.com/avatar/c6b8139c802fb2123f01ad1ee173dbd4?d=https%3A%2F%2Fidenticons.github.com%2F4d8572a87f4433b2572d05e0fcf7dcf7.png&r=x","gravatar_id":"c6b8139c802fb2123f01ad1ee173dbd4","url":"https://api.github.com/users/mythmon","html_url":"https://github.com/mythmon","followers_url":"https://api.github.com/users/mythmon/followers","following_url":"https://api.github.com/users/mythmon/following{/other_user}","gists_url":"https://api.github.com/users/mythmon/gists{/gist_id}","starred_url":"https://api.github.com/users/mythmon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mythmon/subscriptions","organizations_url":"https://api.github.com/users/mythmon/orgs","repos_url":"https://api.github.com/users/mythmon/repos","events_url":"https://api.github.com/users/mythmon/events{/privacy}","received_events_url":"https://api.github.com/users/mythmon/received_events","type":"User","site_admin":false},"body":"The string \"Table of Contents\" is generated by WikiParser. WikiParser has no idea what localization is.\r\n\r\nOld showfor, we did some weird stuff with the table of contents that made it render in JS, and thus write \"Table of Contents\" in the write language. New showfor just shows and hides the DOM that is already there, generated by the parser. I think it's better.\r\n\r\nSo instead of fiddling with the TOC on the client side, this fiddles with it on the server side, once, when we render the page.\r\n\r\nTo test:\r\n\r\n* Check http://localhost:8080/es/kb/visualiza-archivos-pdf-en-firefox-sin-descargarlos\r\n* Notice the unlocalized TOC.\r\n\r\n  ```python\r\n  from kitsune.wiki.models import Document\r\n  d = Document.objects.get(slug='visualiza-archivos-pdf-en-firefox-sin-descargarlos')\r\n  d.html = d.parse_and_calculate_links()\r\n  d.save()\r\n  ```\r\n\r\n* Clear caches.\r\n* Check the article again, it should be good now.\r\n\r\nr?","created_at":"2014-02-19T01:08:55Z","updated_at":"2014-02-19T01:08:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/kitsune/pulls/1827/commits","review_comments_url":"https://api.github.com/repos/mozilla/kitsune/pulls/1827/comments","review_comment_url":"https://api.github.com/repos/mozilla/kitsune/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/kitsune/issues/1827/comments","statuses_url":"https://api.github.com/repos/mozilla/kitsune/statuses/cb6e635249e6c17d041a3c7859571c036266b360","head":{"label":"mythmon:toc-localization-966337","ref":"toc-localization-966337","sha":"cb6e635249e6c17d041a3c7859571c036266b360","user":{"login":"mythmon","id":305049,"avatar_url":"https://gravatar.com/avatar/c6b8139c802fb2123f01ad1ee173dbd4?d=https%3A%2F%2Fidenticons.github.com%2F4d8572a87f4433b2572d05e0fcf7dcf7.png&r=x","gravatar_id":"c6b8139c802fb2123f01ad1ee173dbd4","url":"https://api.github.com/users/mythmon","html_url":"https://github.com/mythmon","followers_url":"https://api.github.com/users/mythmon/followers","following_url":"https://api.github.com/users/mythmon/following{/other_user}","gists_url":"https://api.github.com/users/mythmon/gists{/gist_id}","starred_url":"https://api.github.com/users/mythmon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mythmon/subscriptions","organizations_url":"https://api.github.com/users/mythmon/orgs","repos_url":"https://api.github.com/users/mythmon/repos","events_url":"https://api.github.com/users/mythmon/events{/privacy}","received_events_url":"https://api.github.com/users/mythmon/received_events","type":"User","site_admin":false},"repo":{"id":4978152,"name":"kitsune","full_name":"mythmon/kitsune","owner":{"login":"mythmon","id":305049,"avatar_url":"https://gravatar.com/avatar/c6b8139c802fb2123f01ad1ee173dbd4?d=https%3A%2F%2Fidenticons.github.com%2F4d8572a87f4433b2572d05e0fcf7dcf7.png&r=x","gravatar_id":"c6b8139c802fb2123f01ad1ee173dbd4","url":"https://api.github.com/users/mythmon","html_url":"https://github.com/mythmon","followers_url":"https://api.github.com/users/mythmon/followers","following_url":"https://api.github.com/users/mythmon/following{/other_user}","gists_url":"https://api.github.com/users/mythmon/gists{/gist_id}","starred_url":"https://api.github.com/users/mythmon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mythmon/subscriptions","organizations_url":"https://api.github.com/users/mythmon/orgs","repos_url":"https://api.github.com/users/mythmon/repos","events_url":"https://api.github.com/users/mythmon/events{/privacy}","received_events_url":"https://api.github.com/users/mythmon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mythmon/kitsune","description":"Platform for Firefox Help","fork":true,"url":"https://api.github.com/repos/mythmon/kitsune","forks_url":"https://api.github.com/repos/mythmon/kitsune/forks","keys_url":"https://api.github.com/repos/mythmon/kitsune/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mythmon/kitsune/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mythmon/kitsune/teams","hooks_url":"https://api.github.com/repos/mythmon/kitsune/hooks","issue_events_url":"https://api.github.com/repos/mythmon/kitsune/issues/events{/number}","events_url":"https://api.github.com/repos/mythmon/kitsune/events","assignees_url":"https://api.github.com/repos/mythmon/kitsune/assignees{/user}","branches_url":"https://api.github.com/repos/mythmon/kitsune/branches{/branch}","tags_url":"https://api.github.com/repos/mythmon/kitsune/tags","blobs_url":"https://api.github.com/repos/mythmon/kitsune/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mythmon/kitsune/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mythmon/kitsune/git/refs{/sha}","trees_url":"https://api.github.com/repos/mythmon/kitsune/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mythmon/kitsune/statuses/{sha}","languages_url":"https://api.github.com/repos/mythmon/kitsune/languages","stargazers_url":"https://api.github.com/repos/mythmon/kitsune/stargazers","contributors_url":"https://api.github.com/repos/mythmon/kitsune/contributors","subscribers_url":"https://api.github.com/repos/mythmon/kitsune/subscribers","subscription_url":"https://api.github.com/repos/mythmon/kitsune/subscription","commits_url":"https://api.github.com/repos/mythmon/kitsune/commits{/sha}","git_commits_url":"https://api.github.com/repos/mythmon/kitsune/git/commits{/sha}","comments_url":"https://api.github.com/repos/mythmon/kitsune/comments{/number}","issue_comment_url":"https://api.github.com/repos/mythmon/kitsune/issues/comments/{number}","contents_url":"https://api.github.com/repos/mythmon/kitsune/contents/{+path}","compare_url":"https://api.github.com/repos/mythmon/kitsune/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mythmon/kitsune/merges","archive_url":"https://api.github.com/repos/mythmon/kitsune/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mythmon/kitsune/downloads","issues_url":"https://api.github.com/repos/mythmon/kitsune/issues{/number}","pulls_url":"https://api.github.com/repos/mythmon/kitsune/pulls{/number}","milestones_url":"https://api.github.com/repos/mythmon/kitsune/milestones{/number}","notifications_url":"https://api.github.com/repos/mythmon/kitsune/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mythmon/kitsune/labels{/name}","releases_url":"https://api.github.com/repos/mythmon/kitsune/releases{/id}","created_at":"2012-07-10T18:09:51Z","updated_at":"2014-02-19T01:08:55Z","pushed_at":"2014-02-19T00:58:36Z","git_url":"git://github.com/mythmon/kitsune.git","ssh_url":"git@github.com:mythmon/kitsune.git","clone_url":"https://github.com/mythmon/kitsune.git","svn_url":"https://github.com/mythmon/kitsune","homepage":"http://support.mozilla.com/","size":69144,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master","master_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"14164d6f38e6e11b3c8ae7ac0dba4f38ac0323e2","user":{"login":"mozilla","id":131524,"avatar_url":"https://gravatar.com/avatar/9ba739c8f3288e256b13553e4d257b5e?d=https%3A%2F%2Fidenticons.github.com%2Fe19b38694c8cd24cb8a5ff704c8d9ae1.png&r=x","gravatar_id":"9ba739c8f3288e256b13553e4d257b5e","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":489645,"name":"kitsune","full_name":"mozilla/kitsune","owner":{"login":"mozilla","id":131524,"avatar_url":"https://gravatar.com/avatar/9ba739c8f3288e256b13553e4d257b5e?d=https%3A%2F%2Fidenticons.github.com%2Fe19b38694c8cd24cb8a5ff704c8d9ae1.png&r=x","gravatar_id":"9ba739c8f3288e256b13553e4d257b5e","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/kitsune","description":"Platform for Firefox Help","fork":false,"url":"https://api.github.com/repos/mozilla/kitsune","forks_url":"https://api.github.com/repos/mozilla/kitsune/forks","keys_url":"https://api.github.com/repos/mozilla/kitsune/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/kitsune/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/kitsune/teams","hooks_url":"https://api.github.com/repos/mozilla/kitsune/hooks","issue_events_url":"https://api.github.com/repos/mozilla/kitsune/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/kitsune/events","assignees_url":"https://api.github.com/repos/mozilla/kitsune/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/kitsune/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/kitsune/tags","blobs_url":"https://api.github.com/repos/mozilla/kitsune/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/kitsune/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/kitsune/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/kitsune/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/kitsune/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/kitsune/languages","stargazers_url":"https://api.github.com/repos/mozilla/kitsune/stargazers","contributors_url":"https://api.github.com/repos/mozilla/kitsune/contributors","subscribers_url":"https://api.github.com/repos/mozilla/kitsune/subscribers","subscription_url":"https://api.github.com/repos/mozilla/kitsune/subscription","commits_url":"https://api.github.com/repos/mozilla/kitsune/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/kitsune/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/kitsune/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/kitsune/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/kitsune/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/kitsune/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/kitsune/merges","archive_url":"https://api.github.com/repos/mozilla/kitsune/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/kitsune/downloads","issues_url":"https://api.github.com/repos/mozilla/kitsune/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/kitsune/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/kitsune/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/kitsune/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/kitsune/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/kitsune/releases{/id}","created_at":"2010-01-26T18:53:57Z","updated_at":"2014-02-14T20:19:12Z","pushed_at":"2014-02-14T20:19:12Z","git_url":"git://github.com/mozilla/kitsune.git","ssh_url":"git@github.com:mozilla/kitsune.git","clone_url":"https://github.com/mozilla/kitsune.git","svn_url":"https://github.com/mozilla/kitsune","homepage":"http://support.mozilla.com/","size":107973,"stargazers_count":218,"watchers_count":218,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":false,"forks_count":176,"mirror_url":null,"open_issues_count":6,"forks":176,"open_issues":6,"watchers":218,"default_branch":"master","master_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/1827"},"html":{"href":"https://github.com/mozilla/kitsune/pull/1827"},"issue":{"href":"https://api.github.com/repos/mozilla/kitsune/issues/1827"},"comments":{"href":"https://api.github.com/repos/mozilla/kitsune/issues/1827/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/1827/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/1827/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/kitsune/statuses/cb6e635249e6c17d041a3c7859571c036266b360"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":10,"deletions":2,"changed_files":1}}