|
@@ -67,10 +67,11 @@ class Dictionary(Command): |
|
|
|
|
|
|
|
|
if "#" in term: # Requesting a specific language |
|
|
if "#" in term: # Requesting a specific language |
|
|
lang = term.rsplit("#", 1)[1] |
|
|
lang = term.rsplit("#", 1)[1] |
|
|
if lang not in languages: |
|
|
|
|
|
|
|
|
langs = {key.lower(): val for (key, val) in languages.iteritems()} |
|
|
|
|
|
if lang.lower() not in langs: |
|
|
resp = u"Language {0} not found in definition." |
|
|
resp = u"Language {0} not found in definition." |
|
|
return resp.format(lang) |
|
|
return resp.format(lang) |
|
|
definition = self.get_definition(languages[lang], level) |
|
|
|
|
|
|
|
|
definition = self.get_definition(langs[lang.lower()], level) |
|
|
return u"({0}) {1}".format(lang, definition) |
|
|
return u"({0}) {1}".format(lang, definition) |
|
|
|
|
|
|
|
|
result = [] |
|
|
result = [] |
|
|