diff --git a/src/i18n.py b/src/i18n.py index 0b26774ad..da1bc6167 100644 --- a/src/i18n.py +++ b/src/i18n.py @@ -50,6 +50,7 @@ MSGSTR = 'msgstr "' FUZZY = '#, fuzzy' currentLocale = 'en' +SUPPORTED_LANGUAGES = ['de', 'en', 'es', 'fi', 'fr', 'it'] class PluginNotFound(Exception): pass @@ -71,7 +72,7 @@ def import_conf(): global conf conf = __import__('supybot.conf').conf class Languages(conf.registry.OnlySomeStrings): - validStrings = ['de', 'en', 'es', 'fi', 'fr', 'it'] + validStrings = SUPPORTED_LANGUAGES errormsg = 'Value should be a supported language (%s), not %%r' % ( ', '.join(validStrings)) conf.registerGlobalValue(conf.supybot, 'language', diff --git a/src/scripts/limnoria_wizard.py b/src/scripts/limnoria_wizard.py index 71f545248..073739148 100644 --- a/src/scripts/limnoria_wizard.py +++ b/src/scripts/limnoria_wizard.py @@ -253,7 +253,8 @@ def _main(): language. This can be changed at any time. You need to answer with a short id for the language, such as 'en', 'fr', 'it' (without the quotes). If you want to use English, just press enter.""") - language = something('What language do you want to use?', default='en') + language = expect('What language do you want to use?', + i18n.SUPPORTED_LANGUAGES, default='en') class Empty: """This is a hack to allow the i18n to get the current language, before