|
@@ -53,7 +53,7 @@ class Dictionary(Command): |
|
|
|
|
|
|
|
|
multilingual = "#" in term |
|
|
multilingual = "#" in term |
|
|
if multilingual: |
|
|
if multilingual: |
|
|
lang_requested = term[term.find("#")+1:] |
|
|
|
|
|
|
|
|
lang_requested = term.rsplit("#", 1)[1] |
|
|
page = site.get_page(term, follow_redirects=True) |
|
|
page = site.get_page(term, follow_redirects=True) |
|
|
try: |
|
|
try: |
|
|
entry = page.get() |
|
|
entry = page.get() |
|
@@ -70,10 +70,9 @@ class Dictionary(Command): |
|
|
|
|
|
|
|
|
result = [] |
|
|
result = [] |
|
|
for lang, section in sorted(languages.items()): |
|
|
for lang, section in sorted(languages.items()): |
|
|
if multilingual: |
|
|
|
|
|
if lang == lang_requested: |
|
|
|
|
|
return u"({0}) {1}".format(lang, definition) |
|
|
|
|
|
definition = self.get_definition(section, level) |
|
|
definition = self.get_definition(section, level) |
|
|
|
|
|
if multilingual and lang == lang_requested: |
|
|
|
|
|
return u"({0}) {1}".format(lang, definition) |
|
|
result.append(u"({0}) {1}".format(lang, definition)) |
|
|
result.append(u"({0}) {1}".format(lang, definition)) |
|
|
return u"; ".join(result) |
|
|
return u"; ".join(result) |
|
|
|
|
|
|
|
|