Localization refactoring:
* the front-end now use global constants, based on the translation key * build-client.js use the ESBuild "define" directive to replace these globals at compile time, by the english value * build:client must now be called after build:languages * moving the loadLoc and loc backend functions in a separate lib
This commit is contained in:
@ -6,6 +6,7 @@ import { initRouters } from './lib/routers/index'
|
||||
import { initFederation } from './lib/federation/init'
|
||||
import { prepareProsody, ensureProsodyRunning, ensureProsodyNotRunning } from './lib/prosody/ctl'
|
||||
import { unloadDebugMode } from './lib/debug'
|
||||
import { loadLoc } from './lib/loc'
|
||||
import decache from 'decache'
|
||||
|
||||
// FIXME: Peertube unregister don't have any parameter.
|
||||
@ -20,6 +21,9 @@ async function register (options: RegisterServerOptions): Promise<any> {
|
||||
throw new Error('Your peertube version is not correct. This plugin is not compatible with Peertube < 3.2.0.')
|
||||
}
|
||||
|
||||
// First: load languages files, so we can localize strings.
|
||||
await loadLoc()
|
||||
|
||||
await migrateSettings(options)
|
||||
|
||||
await initSettings(options)
|
||||
|
Reference in New Issue
Block a user