If ANNOUNCEMENT_LANGUAGES is empty, use provided list instead.

Update default configs to reflect this as new default
This commit is contained in:
Simon 2021-08-23 01:25:52 +01:00
parent 00605369c6
commit 89a19ba107
3 changed files with 5 additions and 2 deletions

View File

@ -47,7 +47,7 @@ TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL TGID_TS2_ACL: PERMIT:ALL
GEN_STAT_BRIDGES: False GEN_STAT_BRIDGES: False
ALLOW_NULL_PASSPHRASE: False ALLOW_NULL_PASSPHRASE: False
ANNOUNCEMENT_LANGUAGES: en_GB,en_GB_2,en_US,es_ES,es_ES_2,fr_FR,de_DE,dk_DK,it_IT,no_NO,pl_PL,se_SE,pt_PT,el_GR,CW ANNOUNCEMENT_LANGUAGES:
SERVER_ID: 0000 SERVER_ID: 0000

View File

@ -33,6 +33,7 @@ import const
import socket import socket
import ipaddress import ipaddress
from socket import gethostbyname from socket import gethostbyname
from languages import languages
# Does anybody read this stuff? There's a PEP somewhere that says I should do this. # Does anybody read this stuff? There's a PEP somewhere that says I should do this.
@ -147,6 +148,8 @@ def build_config(_config_file):
'SERVER_ID': config.getint(section, 'SERVER_ID').to_bytes(4, 'big') 'SERVER_ID': config.getint(section, 'SERVER_ID').to_bytes(4, 'big')
}) })
if not CONFIG['GLOBAL']['ANNOUNCEMENT_LANGUAGES']:
CONFIG['GLOBAL']['ANNOUNCEMENT_LANGUAGES'] = languages
elif section == 'REPORTS': elif section == 'REPORTS':
CONFIG['REPORTS'].update({ CONFIG['REPORTS'].update({

View File

@ -40,7 +40,7 @@ TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL TGID_TS2_ACL: PERMIT:ALL
GEN_STAT_BRIDGES: True GEN_STAT_BRIDGES: True
ALLOW_NULL_PASSPHRASE: True ALLOW_NULL_PASSPHRASE: True
ANNOUNCEMENT_LANGUAGES: en_GB,en_GB_2,en_US,es_ES,es_ES_2,fr_FR,de_DE,dk_DK,it_IT,no_NO,pl_PL,se_SE,CW,cy_GB,el_GR ANNOUNCEMENT_LANGUAGES:
SERVER_ID: 0 SERVER_ID: 0
[REPORTS] [REPORTS]