@ -17,6 +17,10 @@ const locContent: Map<string, string> = new Map<string, string>()
|
||||
* - We are using keys to identify strings
|
||||
* - the `loc` function gets the english segment for the key
|
||||
* - the build-languages.js script builds all needed files.
|
||||
*
|
||||
* The loc function is also used to customize some labels on Prosody backend.
|
||||
* The front-end will then replace english strings by their translation.
|
||||
* (see mod_muc_poll for example).
|
||||
* @param key The key to translate
|
||||
*/
|
||||
function loc (key: string): string {
|
||||
|
@ -5,6 +5,7 @@
|
||||
import type { ProsodyFilePaths } from './paths'
|
||||
import type { ExternalComponent } from './components'
|
||||
import { BotConfiguration } from '../../configuration/bot'
|
||||
import { loc } from '../../loc'
|
||||
import { userInfo } from 'os'
|
||||
|
||||
/**
|
||||
@ -536,6 +537,9 @@ class ProsodyConfigContent {
|
||||
usePoll (): void {
|
||||
this.muc.add('modules_enabled', 'muc_poll')
|
||||
this.muc.set('poll_groupchat_votes_priority', 1000)
|
||||
this.muc.set('poll_string_over', loc('poll_is_over'))
|
||||
this.muc.set('poll_string_invalid_choice', loc('poll_choice_invalid'))
|
||||
this.muc.set('poll_string_anonymous_vote_ok', loc('poll_anonymous_vote_ok'))
|
||||
}
|
||||
|
||||
addMucAdmins (jids: string[]): void {
|
||||
|
Reference in New Issue
Block a user