{"action":"closed","number":196,"pull_request":{"url":"https://api.github.com/repos/mono-company/bedrock/pulls/196","id":188454311,"html_url":"https://github.com/mono-company/bedrock/pull/196","diff_url":"https://github.com/mono-company/bedrock/pull/196.diff","patch_url":"https://github.com/mono-company/bedrock/pull/196.patch","issue_url":"https://api.github.com/repos/mono-company/bedrock/issues/196","number":196,"state":"closed","locked":false,"title":"Evo: basic multilingual support","user":{"login":"tdurand","id":533590,"avatar_url":"https://avatars2.githubusercontent.com/u/533590?v=4","gravatar_id":"","url":"https://api.github.com/users/tdurand","html_url":"https://github.com/tdurand","followers_url":"https://api.github.com/users/tdurand/followers","following_url":"https://api.github.com/users/tdurand/following{/other_user}","gists_url":"https://api.github.com/users/tdurand/gists{/gist_id}","starred_url":"https://api.github.com/users/tdurand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdurand/subscriptions","organizations_url":"https://api.github.com/users/tdurand/orgs","repos_url":"https://api.github.com/users/tdurand/repos","events_url":"https://api.github.com/users/tdurand/events{/privacy}","received_events_url":"https://api.github.com/users/tdurand/received_events","type":"User","site_admin":false},"body":"Hello @Wolfr , here is a first shot at the multilingual support, the doc on how to use it _(that we should add to the official doc website when we agree on the feature)_ , regarding feature implem I let you review the PR but it's fairly simple I just persist a new variable for the language selection along with the sidebar state. Regarding styling we could have something a bit better in the prototype-nav.pug, I think if we add a third language the radio button may be a bit ugly 😉.\r\n\r\n### DOC: How to add multiple languages\r\n\r\n- Open bedrock.config.js\r\n- Add the following \"languages\" configuration (change accordingly to which language you want to support)\r\n\r\n```javascript\r\nlanguages: [{\r\n    id: \"langEn\",\r\n    label: \"English\",\r\n    default: true\r\n  },{\r\n    id: \"langFr\",\r\n    label: \"Français\"\r\n  }]\r\n```\r\n\r\nThem in your pug templates, you can specify multiple <span> string for each languages, see form-example.pug: \r\n\r\n```pug\r\nif error\r\n        p(style=\"color: red\") \r\n            span(data-lang=\"langEn\") Hey! Some fields were marked as invalid.\r\n            span(data-lang=\"langFr\") Oups! Certain champs sont invalides.\r\n\r\n    p\r\n        label\r\n            span(data-lang=\"langEn\") First Name\r\n            span(data-lang=\"langFr\") Nom\r\n        input(type=\"text\")\r\n    p\r\n        label\r\n            span(data-lang=\"langEn\") Last Name\r\n            span(data-lang=\"langFr\") Prénom\r\n        input(type=\"text\")\r\n    p\r\n        label\r\n            span(data-lang=\"langEn\") Message\r\n            span(data-lang=\"langFr\") Message\r\n        textarea\r\n```\r\n\r\nThat's it, you need to re-start bedrock in order to have the config file reloaded, and you should see a language selector in the sidebar (trigger the sidebar with CTRL + M), your language selection will be persisted.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","created_at":"2018-05-16T14:34:06Z","updated_at":"2018-05-16T19:12:30Z","closed_at":"2018-05-16T19:12:30Z","merged_at":"2018-05-16T19:12:30Z","merge_commit_sha":"0d9f002d946afafd7b1f96007a5c03f6ad5016f3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mono-company/bedrock/pulls/196/commits","review_comments_url":"https://api.github.com/repos/mono-company/bedrock/pulls/196/comments","review_comment_url":"https://api.github.com/repos/mono-company/bedrock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mono-company/bedrock/issues/196/comments","statuses_url":"https://api.github.com/repos/mono-company/bedrock/statuses/2ed6bd213d9f090ce6d238066fa329347bd458ab","head":{"label":"tdurand:multilingual","ref":"multilingual","sha":"2ed6bd213d9f090ce6d238066fa329347bd458ab","user":{"login":"tdurand","id":533590,"avatar_url":"https://avatars2.githubusercontent.com/u/533590?v=4","gravatar_id":"","url":"https://api.github.com/users/tdurand","html_url":"https://github.com/tdurand","followers_url":"https://api.github.com/users/tdurand/followers","following_url":"https://api.github.com/users/tdurand/following{/other_user}","gists_url":"https://api.github.com/users/tdurand/gists{/gist_id}","starred_url":"https://api.github.com/users/tdurand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdurand/subscriptions","organizations_url":"https://api.github.com/users/tdurand/orgs","repos_url":"https://api.github.com/users/tdurand/repos","events_url":"https://api.github.com/users/tdurand/events{/privacy}","received_events_url":"https://api.github.com/users/tdurand/received_events","type":"User","site_admin":false},"repo":{"id":133676389,"name":"bedrock","full_name":"tdurand/bedrock","owner":{"login":"tdurand","id":533590,"avatar_url":"https://avatars2.githubusercontent.com/u/533590?v=4","gravatar_id":"","url":"https://api.github.com/users/tdurand","html_url":"https://github.com/tdurand","followers_url":"https://api.github.com/users/tdurand/followers","following_url":"https://api.github.com/users/tdurand/following{/other_user}","gists_url":"https://api.github.com/users/tdurand/gists{/gist_id}","starred_url":"https://api.github.com/users/tdurand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdurand/subscriptions","organizations_url":"https://api.github.com/users/tdurand/orgs","repos_url":"https://api.github.com/users/tdurand/repos","events_url":"https://api.github.com/users/tdurand/events{/privacy}","received_events_url":"https://api.github.com/users/tdurand/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tdurand/bedrock","description":"Bedrock is a static site generator to easily make HTML prototypes.","fork":true,"url":"https://api.github.com/repos/tdurand/bedrock","forks_url":"https://api.github.com/repos/tdurand/bedrock/forks","keys_url":"https://api.github.com/repos/tdurand/bedrock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tdurand/bedrock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tdurand/bedrock/teams","hooks_url":"https://api.github.com/repos/tdurand/bedrock/hooks","issue_events_url":"https://api.github.com/repos/tdurand/bedrock/issues/events{/number}","events_url":"https://api.github.com/repos/tdurand/bedrock/events","assignees_url":"https://api.github.com/repos/tdurand/bedrock/assignees{/user}","branches_url":"https://api.github.com/repos/tdurand/bedrock/branches{/branch}","tags_url":"https://api.github.com/repos/tdurand/bedrock/tags","blobs_url":"https://api.github.com/repos/tdurand/bedrock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tdurand/bedrock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tdurand/bedrock/git/refs{/sha}","trees_url":"https://api.github.com/repos/tdurand/bedrock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tdurand/bedrock/statuses/{sha}","languages_url":"https://api.github.com/repos/tdurand/bedrock/languages","stargazers_url":"https://api.github.com/repos/tdurand/bedrock/stargazers","contributors_url":"https://api.github.com/repos/tdurand/bedrock/contributors","subscribers_url":"https://api.github.com/repos/tdurand/bedrock/subscribers","subscription_url":"https://api.github.com/repos/tdurand/bedrock/subscription","commits_url":"https://api.github.com/repos/tdurand/bedrock/commits{/sha}","git_commits_url":"https://api.github.com/repos/tdurand/bedrock/git/commits{/sha}","comments_url":"https://api.github.com/repos/tdurand/bedrock/comments{/number}","issue_comment_url":"https://api.github.com/repos/tdurand/bedrock/issues/comments{/number}","contents_url":"https://api.github.com/repos/tdurand/bedrock/contents/{+path}","compare_url":"https://api.github.com/repos/tdurand/bedrock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tdurand/bedrock/merges","archive_url":"https://api.github.com/repos/tdurand/bedrock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tdurand/bedrock/downloads","issues_url":"https://api.github.com/repos/tdurand/bedrock/issues{/number}","pulls_url":"https://api.github.com/repos/tdurand/bedrock/pulls{/number}","milestones_url":"https://api.github.com/repos/tdurand/bedrock/milestones{/number}","notifications_url":"https://api.github.com/repos/tdurand/bedrock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tdurand/bedrock/labels{/name}","releases_url":"https://api.github.com/repos/tdurand/bedrock/releases{/id}","deployments_url":"https://api.github.com/repos/tdurand/bedrock/deployments","created_at":"2018-05-16T14:16:26Z","updated_at":"2018-05-16T14:16:28Z","pushed_at":"2018-05-16T14:20:52Z","git_url":"git://github.com/tdurand/bedrock.git","ssh_url":"git@github.com:tdurand/bedrock.git","clone_url":"https://github.com/tdurand/bedrock.git","svn_url":"https://github.com/tdurand/bedrock","homepage":null,"size":661,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mono-company:master","ref":"master","sha":"bfaa4873961553e59002d60ecf6d8a398c922130","user":{"login":"mono-company","id":3176460,"avatar_url":"https://avatars0.githubusercontent.com/u/3176460?v=4","gravatar_id":"","url":"https://api.github.com/users/mono-company","html_url":"https://github.com/mono-company","followers_url":"https://api.github.com/users/mono-company/followers","following_url":"https://api.github.com/users/mono-company/following{/other_user}","gists_url":"https://api.github.com/users/mono-company/gists{/gist_id}","starred_url":"https://api.github.com/users/mono-company/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono-company/subscriptions","organizations_url":"https://api.github.com/users/mono-company/orgs","repos_url":"https://api.github.com/users/mono-company/repos","events_url":"https://api.github.com/users/mono-company/events{/privacy}","received_events_url":"https://api.github.com/users/mono-company/received_events","type":"Organization","site_admin":false},"repo":{"id":45972423,"name":"bedrock","full_name":"mono-company/bedrock","owner":{"login":"mono-company","id":3176460,"avatar_url":"https://avatars0.githubusercontent.com/u/3176460?v=4","gravatar_id":"","url":"https://api.github.com/users/mono-company","html_url":"https://github.com/mono-company","followers_url":"https://api.github.com/users/mono-company/followers","following_url":"https://api.github.com/users/mono-company/following{/other_user}","gists_url":"https://api.github.com/users/mono-company/gists{/gist_id}","starred_url":"https://api.github.com/users/mono-company/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono-company/subscriptions","organizations_url":"https://api.github.com/users/mono-company/orgs","repos_url":"https://api.github.com/users/mono-company/repos","events_url":"https://api.github.com/users/mono-company/events{/privacy}","received_events_url":"https://api.github.com/users/mono-company/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mono-company/bedrock","description":"Bedrock is a static site generator to easily make HTML prototypes.","fork":false,"url":"https://api.github.com/repos/mono-company/bedrock","forks_url":"https://api.github.com/repos/mono-company/bedrock/forks","keys_url":"https://api.github.com/repos/mono-company/bedrock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mono-company/bedrock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mono-company/bedrock/teams","hooks_url":"https://api.github.com/repos/mono-company/bedrock/hooks","issue_events_url":"https://api.github.com/repos/mono-company/bedrock/issues/events{/number}","events_url":"https://api.github.com/repos/mono-company/bedrock/events","assignees_url":"https://api.github.com/repos/mono-company/bedrock/assignees{/user}","branches_url":"https://api.github.com/repos/mono-company/bedrock/branches{/branch}","tags_url":"https://api.github.com/repos/mono-company/bedrock/tags","blobs_url":"https://api.github.com/repos/mono-company/bedrock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mono-company/bedrock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mono-company/bedrock/git/refs{/sha}","trees_url":"https://api.github.com/repos/mono-company/bedrock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mono-company/bedrock/statuses/{sha}","languages_url":"https://api.github.com/repos/mono-company/bedrock/languages","stargazers_url":"https://api.github.com/repos/mono-company/bedrock/stargazers","contributors_url":"https://api.github.com/repos/mono-company/bedrock/contributors","subscribers_url":"https://api.github.com/repos/mono-company/bedrock/subscribers","subscription_url":"https://api.github.com/repos/mono-company/bedrock/subscription","commits_url":"https://api.github.com/repos/mono-company/bedrock/commits{/sha}","git_commits_url":"https://api.github.com/repos/mono-company/bedrock/git/commits{/sha}","comments_url":"https://api.github.com/repos/mono-company/bedrock/comments{/number}","issue_comment_url":"https://api.github.com/repos/mono-company/bedrock/issues/comments{/number}","contents_url":"https://api.github.com/repos/mono-company/bedrock/contents/{+path}","compare_url":"https://api.github.com/repos/mono-company/bedrock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mono-company/bedrock/merges","archive_url":"https://api.github.com/repos/mono-company/bedrock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mono-company/bedrock/downloads","issues_url":"https://api.github.com/repos/mono-company/bedrock/issues{/number}","pulls_url":"https://api.github.com/repos/mono-company/bedrock/pulls{/number}","milestones_url":"https://api.github.com/repos/mono-company/bedrock/milestones{/number}","notifications_url":"https://api.github.com/repos/mono-company/bedrock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mono-company/bedrock/labels{/name}","releases_url":"https://api.github.com/repos/mono-company/bedrock/releases{/id}","deployments_url":"https://api.github.com/repos/mono-company/bedrock/deployments","created_at":"2015-11-11T09:32:22Z","updated_at":"2018-04-30T09:20:17Z","pushed_at":"2018-05-16T19:12:30Z","git_url":"git://github.com/mono-company/bedrock.git","ssh_url":"git@github.com:mono-company/bedrock.git","clone_url":"https://github.com/mono-company/bedrock.git","svn_url":"https://github.com/mono-company/bedrock","homepage":null,"size":657,"stargazers_count":47,"watchers_count":47,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":6,"open_issues":18,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mono-company/bedrock/pulls/196"},"html":{"href":"https://github.com/mono-company/bedrock/pull/196"},"issue":{"href":"https://api.github.com/repos/mono-company/bedrock/issues/196"},"comments":{"href":"https://api.github.com/repos/mono-company/bedrock/issues/196/comments"},"review_comments":{"href":"https://api.github.com/repos/mono-company/bedrock/pulls/196/comments"},"review_comment":{"href":"https://api.github.com/repos/mono-company/bedrock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mono-company/bedrock/pulls/196/commits"},"statuses":{"href":"https://api.github.com/repos/mono-company/bedrock/statuses/2ed6bd213d9f090ce6d238066fa329347bd458ab"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"Wolfr","id":12690,"avatar_url":"https://avatars2.githubusercontent.com/u/12690?v=4","gravatar_id":"","url":"https://api.github.com/users/Wolfr","html_url":"https://github.com/Wolfr","followers_url":"https://api.github.com/users/Wolfr/followers","following_url":"https://api.github.com/users/Wolfr/following{/other_user}","gists_url":"https://api.github.com/users/Wolfr/gists{/gist_id}","starred_url":"https://api.github.com/users/Wolfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wolfr/subscriptions","organizations_url":"https://api.github.com/users/Wolfr/orgs","repos_url":"https://api.github.com/users/Wolfr/repos","events_url":"https://api.github.com/users/Wolfr/events{/privacy}","received_events_url":"https://api.github.com/users/Wolfr/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":61,"deletions":5,"changed_files":5}}
{"actor":{"display_login":"Wolfr"}}