From 837cf59ef9f27d8cbc6d77120304d8dcf8e7e9bb Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 25 Apr 2021 22:28:42 +0200 Subject: Add support for freshly imported languages New languages: bg, fa, gl, he, hu, oc, pt-br Signed-off-by: David Mehren --- app.js | 3 ++- public/js/locale.js | 3 ++- public/views/index/body.ejs | 7 +++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 31d671f9..cdd922f9 100644 --- a/app.js +++ b/app.js @@ -126,7 +126,8 @@ if (config.csp.enable) { } i18n.configure({ - locales: ['en', 'zh-CN', 'zh-TW', 'fr', 'de', 'ja', 'es', 'ca', 'el', 'pt', 'it', 'tr', 'ru', 'nl', 'hr', 'pl', 'uk', 'hi', 'sv', 'eo', 'da', 'ko', 'id', 'sr', 'vi', 'ar', 'cs', 'sk', 'ml'], + locales: ['en', 'zh-CN', 'zh-TW', 'fr', 'de', 'ja', 'es', 'ca', 'el', 'pt', 'it', 'tr', 'ru', 'nl', 'hr', 'pl', + 'uk', 'hi', 'sv', 'eo', 'da', 'ko', 'id', 'sr', 'vi', 'ar', 'cs', 'sk', 'ml', 'bg', 'fa', 'gl', 'he', 'hu', 'oc', 'pt-br'], cookie: 'locale', indent: ' ', // this is the style poeditor.com exports it, this creates less churn directory: path.join(__dirname, '/locales'), diff --git a/public/js/locale.js b/public/js/locale.js index 8baa77fc..2470bd53 100644 --- a/public/js/locale.js +++ b/public/js/locale.js @@ -1,7 +1,8 @@ /* eslint-env browser, jquery */ /* global Cookies */ -const supported = ['en', 'zh-CN', 'zh-TW', 'fr', 'de', 'ja', 'es', 'ca', 'el', 'pt', 'it', 'tr', 'ru', 'nl', 'hr', 'pl', 'uk', 'hi', 'sv', 'eo', 'da', 'ko', 'id', 'sr', 'vi', 'ar', 'cs', 'sk'] +const supported = ['en', 'zh-CN', 'zh-TW', 'fr', 'de', 'ja', 'es', 'ca', 'el', 'pt', 'it', 'tr', 'ru', 'nl', 'hr', 'pl', + 'uk', 'hi', 'sv', 'eo', 'da', 'ko', 'id', 'sr', 'vi', 'ar', 'cs', 'sk', 'ml', 'bg', 'fa', 'gl', 'he', 'hu', 'oc', 'pt-br'] function detectLang () { if (Cookies.get('locale')) { diff --git a/public/views/index/body.ejs b/public/views/index/body.ejs index 5ae462d9..54d2b32f 100644 --- a/public/views/index/body.ejs +++ b/public/views/index/body.ejs @@ -157,6 +157,13 @@ + + + + + + +

<%- __('Powered by %s', 'HedgeDoc') %> | <%= __('Releases') %> | <%= __('Source Code') %><% if(imprint) { %> | <%= __('Imprint') %><% } %><% if(privacyStatement) { %> | <%= __('Privacy') %><% } %><% if(termsOfUse) { %> | <%= __('Terms of Use') %><% } %> -- cgit v1.2.3