all repos — python-meme-bot @ 735d49cd8cabf16eae27053532192db24cee5cbb

Telegram Bot that uses PIL to compute light image processing.

Constants.py (view raw)

 1localization = {
 2    'us': {
 3        'welcome' : "Welcome to PILuAnimeBot!",
 4        'sauce' : "Sauce 🍝",
 5        'no_caption' : "No caption detected.",
 6        'lewd_toggle' : "Lewd content was {} for this chat.",
 7        'enabled' : "enabled",
 8        'disabled' : "disabled",
 9        'unknown' : "Sorry, I didn't understand that command.",
10        'error': "An error has occurred. Please retry.",
11    }
12}
13
14
15def get_localized_string(text, lang='us'):
16    try:
17        return localization[lang][text]
18    except KeyError:
19        logging.error("No text was found.")
20        return "localization error {}{}{}{}{}{}"