mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-09 13:51:57 -04:00
Extract list of supported languages in separate file
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
cf87499e38
commit
0d943d1284
4 changed files with 49 additions and 45 deletions
5
app.js
5
app.js
|
@ -28,6 +28,8 @@ const models = require('./lib/models')
|
|||
const csp = require('./lib/csp')
|
||||
const metrics = require('./lib/prometheus')
|
||||
|
||||
const supportedLocalesList = Object.keys(require('./locales/_supported.json'))
|
||||
|
||||
// server setup
|
||||
const app = express()
|
||||
let server = null
|
||||
|
@ -126,8 +128,7 @@ 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', 'bg', 'fa', 'gl', 'he', 'hu', 'oc', 'pt-br'],
|
||||
locales: supportedLocalesList,
|
||||
cookie: 'locale',
|
||||
indent: ' ', // this is the style poeditor.com exports it, this creates less churn
|
||||
directory: path.join(__dirname, '/locales'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue