{"action":"created","issue":{"url":"https://api.github.com/repos/mysociety/alaveteli/issues/1896","labels_url":"https://api.github.com/repos/mysociety/alaveteli/issues/1896/labels{/name}","comments_url":"https://api.github.com/repos/mysociety/alaveteli/issues/1896/comments","events_url":"https://api.github.com/repos/mysociety/alaveteli/issues/1896/events","html_url":"https://github.com/mysociety/alaveteli/issues/1896","id":45966078,"number":1896,"title":"Spanish translation of Alaveteli.org","user":{"login":"crowbot","id":2912,"avatar_url":"https://avatars.githubusercontent.com/u/2912?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbot","html_url":"https://github.com/crowbot","followers_url":"https://api.github.com/users/crowbot/followers","following_url":"https://api.github.com/users/crowbot/following{/other_user}","gists_url":"https://api.github.com/users/crowbot/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbot/subscriptions","organizations_url":"https://api.github.com/users/crowbot/orgs","repos_url":"https://api.github.com/users/crowbot/repos","events_url":"https://api.github.com/users/crowbot/events{/privacy}","received_events_url":"https://api.github.com/users/crowbot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mysociety/alaveteli/labels/3+-+current+sprint","name":"3 - current sprint","color":"009800"},{"url":"https://api.github.com/repos/mysociety/alaveteli/labels/documentation","name":"documentation","color":"0052cc"},{"url":"https://api.github.com/repos/mysociety/alaveteli/labels/Re-user+experience","name":"Re-user experience","color":"DCCBBF"}],"state":"open","locked":false,"assignee":{"login":"garethrees","id":282788,"avatar_url":"https://avatars.githubusercontent.com/u/282788?v=3","gravatar_id":"","url":"https://api.github.com/users/garethrees","html_url":"https://github.com/garethrees","followers_url":"https://api.github.com/users/garethrees/followers","following_url":"https://api.github.com/users/garethrees/following{/other_user}","gists_url":"https://api.github.com/users/garethrees/gists{/gist_id}","starred_url":"https://api.github.com/users/garethrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethrees/subscriptions","organizations_url":"https://api.github.com/users/garethrees/orgs","repos_url":"https://api.github.com/users/garethrees/repos","events_url":"https://api.github.com/users/garethrees/events{/privacy}","received_events_url":"https://api.github.com/users/garethrees/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2014-10-16T09:35:48Z","updated_at":"2015-01-13T10:46:56Z","closed_at":null,"body":"Once we have translated text, we'll need to restructure the site a bit in order to display it.\r\nFor reference:\r\n\r\nhttp://sylvain.durand.tf/making-jekyll-multilingual/\r\n\r\n<!---\r\n@huboard:{\"order\":357.8203125,\"milestone_order\":1896,\"custom_state\":\"\"}\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/mysociety/alaveteli/issues/comments/69726498","html_url":"https://github.com/mysociety/alaveteli/issues/1896#issuecomment-69726498","issue_url":"https://api.github.com/repos/mysociety/alaveteli/issues/1896","id":69726498,"user":{"login":"garethrees","id":282788,"avatar_url":"https://avatars.githubusercontent.com/u/282788?v=3","gravatar_id":"","url":"https://api.github.com/users/garethrees","html_url":"https://github.com/garethrees","followers_url":"https://api.github.com/users/garethrees/followers","following_url":"https://api.github.com/users/garethrees/following{/other_user}","gists_url":"https://api.github.com/users/garethrees/gists{/gist_id}","starred_url":"https://api.github.com/users/garethrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethrees/subscriptions","organizations_url":"https://api.github.com/users/garethrees/orgs","repos_url":"https://api.github.com/users/garethrees/repos","events_url":"https://api.github.com/users/garethrees/events{/privacy}","received_events_url":"https://api.github.com/users/garethrees/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T10:46:56Z","updated_at":"2015-01-13T10:46:56Z","body":"I've tried 3 options.\r\n\r\n1. **1e95db27a47d24d5640ac2c97909826761222bd3 Injecting a locale in to `site.baseurl`.**\r\n  This is the nicest solution in that we don't have to rewrite any urls in any of the posts, but it breaks the asset URLs. We could hard-code the asset urls to `/assets`, but the behaviour isn't supported by jekyll and I'm not sure what else it will break.\r\n2. **bfa0fde006c60f5a9cee334aa2b799a61f00b8a9 Using categories for translated URLs.** [This](http://www.developmentseed.org/blog/multilingual-jekyll-sites/) is the recommended approach (via `freenode#jekyll`) but links on translated pages go to the EN translation. We'd have to rewrite the links as part of the translation.\r\n3.  **c6ab20c5851c084e56653c657523b3686a857018 Set `page.baseurl` for all pages.** This is my preferred solution. Set a `baseurl` value for every page (done via `defaults` key). EN is the same (`/`) and ES includes the locale (`/es`). We'll have to rewrite the URLs now, replacing `site.baseurl` with `page.baseurl`, but further translations will be unaffected. The layout files will also need `baseurl` explicitly set."}}