Client: i18n (#8972)

* wip: client: i18n

* remove maxAge from cookies to get same expiration ad localStorage

* set cookies expiration to 10 years

* moment: load translations in browser, moment: only load necessary data, remove jquery, remove bluebird

* ability to change language

* fix logout

* add some requiresLogin: false to static pages

* fix tests
This commit is contained in:
Matteo Pagliazzi
2017-08-22 18:26:53 +02:00
committed by GitHub
parent e5a92f64c0
commit bd46e3e195
21 changed files with 163 additions and 92 deletions

View File

@@ -101,6 +101,7 @@ async function saveContentToDisk (language, content) {
api.getContent = {
method: 'GET',
url: '/content',
noLanguage: true,
async handler (req, res) {
let language = 'en';
let proposedLang = req.query.language && req.query.language.toString();