Fix error message on invalid 'supybot.language' value

This commit is contained in:
Valentin Lorentz 2023-07-08 16:42:15 +02:00
parent b374418c81
commit 8d1d4b84eb
1 changed files with 2 additions and 0 deletions

View File

@ -72,6 +72,8 @@ def import_conf():
conf = __import__('supybot.conf').conf
class Languages(conf.registry.OnlySomeStrings):
validStrings = ['de', 'en', 'es', 'fi', 'fr', 'it']
errormsg = 'Value should be a supported language (%s), not %%r' % (
', '.join(validStrings))
conf.registerGlobalValue(conf.supybot, 'language',
Languages(currentLocale, """Determines the bot's default
language if translations exist. Currently supported are: %s"""