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

View File

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