mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-27 03:58:02 -05:00
Merge pull request #333 from ErikMichelson/fix/i18n
Fixed wrong locales search path after app.js move
This commit is contained in:
commit
984061c863
4 changed files with 4 additions and 1 deletions
|
@ -52,6 +52,7 @@ these are rarely used for various reasons.
|
|||
| `docsPath` | `./public/docs` | docs directory path<sup>1</sup> |
|
||||
| `viewPath` | `./public/views` | template directory path<sup>1</sup> |
|
||||
| `uploadsPath` | `./public/uploads` | uploads directory<sup>1</sup> - needs to be persistent when you use imageUploadType `filesystem` |
|
||||
| `localesPath` | `./locales` | directory for translations<sup>1</sup> |
|
||||
|
||||
|
||||
## CodiMD Location
|
||||
|
|
|
@ -116,7 +116,7 @@ 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'],
|
||||
cookie: 'locale',
|
||||
indent: ' ', // this is the style poeditor.com exports it, this creates less churn
|
||||
directory: path.join(__dirname, '/locales'),
|
||||
directory: path.resolve(__dirname, config.localesPath),
|
||||
updateFiles: config.updateI18nFiles
|
||||
})
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ module.exports = {
|
|||
defaultNotePath: './public/default.md',
|
||||
docsPath: './public/docs',
|
||||
uploadsPath: './public/uploads',
|
||||
localesPath: './locales',
|
||||
// session
|
||||
sessionName: 'connect.sid',
|
||||
sessionSecret: 'secret',
|
||||
|
|
|
@ -201,6 +201,7 @@ config.publicPath = path.resolve(appRootPath, config.publicPath)
|
|||
config.defaultNotePath = path.resolve(appRootPath, config.defaultNotePath)
|
||||
config.docsPath = path.resolve(appRootPath, config.docsPath)
|
||||
config.uploadsPath = path.resolve(appRootPath, config.uploadsPath)
|
||||
config.localesPath = path.resolve(appRootPath, config.localesPath)
|
||||
|
||||
// make config readonly
|
||||
config = deepFreeze(config)
|
||||
|
|
Loading…
Reference in a new issue