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:
@ -76,10 +76,10 @@ function register (registerOptions: RegisterClientOptions): void {
|
||||
const p = new Promise<void>((resolve, reject) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
Promise.all([
|
||||
peertubeHelpers.translate('Open chat'),
|
||||
peertubeHelpers.translate('Open chat in a new window'),
|
||||
peertubeHelpers.translate('Close chat'),
|
||||
peertubeHelpers.translate('Share chat link')
|
||||
peertubeHelpers.translate(LOC_OPEN_CHAT),
|
||||
peertubeHelpers.translate(LOC_OPEN_CHAT_NEW_WINDOW),
|
||||
peertubeHelpers.translate(LOC_CLOSE_CHAT),
|
||||
peertubeHelpers.translate(LOC_SHARE_CHAT_LINK)
|
||||
]).then(labels => {
|
||||
const labelOpen = labels[0]
|
||||
const labelOpenBlank = labels[1]
|
||||
|
Reference in New Issue
Block a user