feat: default locale with namespacing
This commit is contained in:
@@ -18,7 +18,8 @@ defaults:
|
||||
storage: ./db.sqlite
|
||||
ssl:
|
||||
enabled: false
|
||||
pool: {}
|
||||
pool:
|
||||
min: 0
|
||||
bindIP: 0.0.0.0
|
||||
logLevel: info
|
||||
uploads:
|
||||
|
@@ -56,7 +56,7 @@ module.exports = {
|
||||
WIKI.config.lang.code = args.locale
|
||||
WIKI.config.lang.autoUpdate = args.autoUpdate
|
||||
WIKI.config.lang.namespacing = args.namespacing
|
||||
WIKI.config.lang.namespaces = args.namespaces
|
||||
WIKI.config.lang.namespaces = _.union(args.namespaces, [args.locale])
|
||||
|
||||
const newLocale = await WIKI.models.locales.query().select('isRTL').where('code', args.locale).first()
|
||||
WIKI.config.lang.rtl = newLocale.isRTL
|
||||
|
@@ -13,7 +13,7 @@ module.exports = {
|
||||
*/
|
||||
parsePath (rawPath, opts = {}) {
|
||||
let pathObj = {
|
||||
locale: 'en',
|
||||
locale: WIKI.config.lang.code,
|
||||
path: 'home',
|
||||
private: false,
|
||||
privateNS: ''
|
||||
|
Reference in New Issue
Block a user