all repos — python-meme-bot @ d6840de4407d0edc3d794313bb3a1bde777e745d

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    'it': {
13        'welcome' : "Benvenuto da PILuAnimeBot!",
14        'sauce' : "Salsa ๐Ÿ",
15        'no_caption' : "Scrivi un testo per favore.",
16        'lewd_toggle' : "La roba lewd รจ stata {} per questa chat.",
17        'enabled' : "abilitata",
18        'disabled' : "disabilitata",
19        'unknown' : "Non ho capito.",
20        'error': "Qualcosa รจ andato storto, riprova.",
21    },
22}
23
24
25def get_localized_string(text, lang='us'):
26    try:
27        return localization[lang][text]
28    except KeyError:
29        logging.error("No text was found.")
30        return "localization error {}{}{}{}{}{}"