mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Merge pull request #913 from GLolol/dict/fix-changed-names
Dict: update hard-coded dictionary names since dict.org has changed them
This commit is contained in:
commit
283cdb3b1d
@ -130,7 +130,7 @@ class Dict(callbacks.Plugin):
|
|||||||
def synonym(self, irc, msg, args, words):
|
def synonym(self, irc, msg, args, words):
|
||||||
"""<word> [<word> ...]
|
"""<word> [<word> ...]
|
||||||
|
|
||||||
Gets a random synonym from the Moby Thesaurus (moby-thes) database.
|
Gets a random synonym from the Moby Thesaurus (moby-thesaurus) database.
|
||||||
|
|
||||||
If given many words, gets a random synonym for each of them.
|
If given many words, gets a random synonym for each of them.
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ class Dict(callbacks.Plugin):
|
|||||||
except socket.error as e:
|
except socket.error as e:
|
||||||
irc.error(utils.web.strError(e), Raise=True)
|
irc.error(utils.web.strError(e), Raise=True)
|
||||||
|
|
||||||
dictionary = 'moby-thes'
|
dictionary = 'moby-thesaurus'
|
||||||
response = []
|
response = []
|
||||||
for word in words:
|
for word in words:
|
||||||
definitions = conn.define(dictionary, word)
|
definitions = conn.define(dictionary, word)
|
||||||
|
@ -38,7 +38,7 @@ class DictTestCase(PluginTestCase):
|
|||||||
self.assertNotError('dict flutter')
|
self.assertNotError('dict flutter')
|
||||||
self.assertNotRegexp('dict web1913 slash', 'foldoc')
|
self.assertNotRegexp('dict web1913 slash', 'foldoc')
|
||||||
self.assertError('dict ""')
|
self.assertError('dict ""')
|
||||||
self.assertRegexp('dict eng-fra school', 'école')
|
self.assertRegexp('dict fd-eng-fra school', 'école')
|
||||||
|
|
||||||
def testDictionaries(self):
|
def testDictionaries(self):
|
||||||
self.assertNotError('dictionaries')
|
self.assertNotError('dictionaries')
|
||||||
|
Loading…
Reference in New Issue
Block a user