{"action":"created","issue":{"url":"https://api.github.com/repos/arve0/codeclub_lesson_builder/issues/177","labels_url":"https://api.github.com/repos/arve0/codeclub_lesson_builder/issues/177/labels{/name}","comments_url":"https://api.github.com/repos/arve0/codeclub_lesson_builder/issues/177/comments","events_url":"https://api.github.com/repos/arve0/codeclub_lesson_builder/issues/177/events","html_url":"https://github.com/arve0/codeclub_lesson_builder/pull/177","id":123567700,"number":177,"title":"Add i18next.","user":{"login":"NorwegianKiwi","id":8851134,"avatar_url":"https://avatars.githubusercontent.com/u/8851134?v=3","gravatar_id":"","url":"https://api.github.com/users/NorwegianKiwi","html_url":"https://github.com/NorwegianKiwi","followers_url":"https://api.github.com/users/NorwegianKiwi/followers","following_url":"https://api.github.com/users/NorwegianKiwi/following{/other_user}","gists_url":"https://api.github.com/users/NorwegianKiwi/gists{/gist_id}","starred_url":"https://api.github.com/users/NorwegianKiwi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NorwegianKiwi/subscriptions","organizations_url":"https://api.github.com/users/NorwegianKiwi/orgs","repos_url":"https://api.github.com/users/NorwegianKiwi/repos","events_url":"https://api.github.com/users/NorwegianKiwi/events{/privacy}","received_events_url":"https://api.github.com/users/NorwegianKiwi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-12-22T22:22:47Z","updated_at":"2015-12-30T18:23:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/arve0/codeclub_lesson_builder/pulls/177","html_url":"https://github.com/arve0/codeclub_lesson_builder/pull/177","diff_url":"https://github.com/arve0/codeclub_lesson_builder/pull/177.diff","patch_url":"https://github.com/arve0/codeclub_lesson_builder/pull/177.patch"},"body":"Add i18next to be able to have captions in several languages. For now, english (en-US) and norwegian (nb-NO), and only for intro texts (intro.js). There are several things that are not translated yet, including the html in the jade layouts. See comments in i18n.js.\r\n\r\nHopefully, if all the text in codeclub_lesson_builder can be included using i18n, perhaps the nb-NO-branch can be merged with master and then deleted."},"comment":{"url":"https://api.github.com/repos/arve0/codeclub_lesson_builder/issues/comments/168049022","html_url":"https://github.com/arve0/codeclub_lesson_builder/pull/177#issuecomment-168049022","issue_url":"https://api.github.com/repos/arve0/codeclub_lesson_builder/issues/177","id":168049022,"user":{"login":"NorwegianKiwi","id":8851134,"avatar_url":"https://avatars.githubusercontent.com/u/8851134?v=3","gravatar_id":"","url":"https://api.github.com/users/NorwegianKiwi","html_url":"https://github.com/NorwegianKiwi","followers_url":"https://api.github.com/users/NorwegianKiwi/followers","following_url":"https://api.github.com/users/NorwegianKiwi/following{/other_user}","gists_url":"https://api.github.com/users/NorwegianKiwi/gists{/gist_id}","starred_url":"https://api.github.com/users/NorwegianKiwi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NorwegianKiwi/subscriptions","organizations_url":"https://api.github.com/users/NorwegianKiwi/orgs","repos_url":"https://api.github.com/users/NorwegianKiwi/repos","events_url":"https://api.github.com/users/NorwegianKiwi/events{/privacy}","received_events_url":"https://api.github.com/users/NorwegianKiwi/received_events","type":"User","site_admin":false},"created_at":"2015-12-30T18:23:02Z","updated_at":"2015-12-30T18:23:02Z","body":"I have now added the captions in the html-files (created by metalsmith and jade) by using the attribute \"data-i18n\" in the tags that need captions (see i18n.js for details on how to include translations for both the innerHTML and attributes). This way we don't need to compile two sets of html-files, and one can easily switch on the fly. The language is stored in a cookie so that it remembers it the next time you go to the webpage.\r\n\r\nI have also added flags in the topmenu to quickly switch between english and norwegian. These can easily be turned on and off in config.js (showFlags = true og false), and the rebuild.\r\n\r\nI have translated most of the captions, but I think there are a couple that remain. These should be easy to add later."}}