Constants.py (view raw)
1import logging
2
3localization = {
4 'us': {
5 'welcome' : "Welcome to PILuAnimeBot!",
6 'sauce' : "Sauce ๐",
7 'no_caption' : "No caption detected.",
8 'lewd_toggle' : "Lewd content was {} for this chat.",
9 'enabled' : "enabled",
10 'disabled' : "disabled",
11 'unknown' : "Sorry, I didn't understand that command.",
12 'error': "An error has occurred. Please retry.",
13 'failed_effect': "Couldn't apply effect."
14 },
15 'it': {
16 'welcome' : "Benvenuto da PILuAnimeBot!",
17 'sauce' : "Salsa ๐",
18 'no_caption' : "Scrivi un testo per favore.",
19 'lewd_toggle' : "La roba lewd รจ stata {} per questa chat.",
20 'enabled' : "abilitata",
21 'disabled' : "disabilitata",
22 'unknown' : "Non ho capito.",
23 'error': "Qualcosa รจ andato storto, riprova.",
24 'failed_effect': "Impossibile applicare l'effetto."
25 },
26}
27
28
29def get_localized_string(text, lang='us'):
30 try:
31 return localization[lang][text]
32 except KeyError:
33 logging.error("No text was found.")
34 return "localization error {}{}{}{}{}{}"