Update the languages we support to include Greek, Russian, and Dutch. Chinese

was changed to Chinese_simple and Chinese_traditional was added.
This commit is contained in:
James Vega 2005-01-13 18:09:21 +00:00
parent fdeae5c022
commit 9e4066fd95
2 changed files with 10 additions and 3 deletions

View File

@ -70,7 +70,8 @@ __where = [ re.compile(r'lang=..>([^<]*)</div'),
]
__languages = { 'english' : 'en',
'chinese' : 'zh',
'chinese_simple' : 'zh',
'chinese_traditional' : 'zt',
'french' : 'fr',
'german' : 'de',
'italian' : 'it',
@ -78,6 +79,9 @@ __languages = { 'english' : 'en',
'korean' : 'ko',
'spanish' : 'es',
'portuguese' : 'pt',
'russian' : 'ru',
'greek' : 'el',
'dutch' : 'nl',
}
"""

View File

@ -67,14 +67,17 @@ conf.registerChannelValue(conf.supybot.plugins.Babelfish, 'languages',
class Babelfish(callbacks.Privmsg):
threaded = True
_abbrevs = utils.abbrev(imap(str.lower, babelfish.available_languages))
_abbrevs = utils.abbrev(map(str.lower, babelfish.available_languages))
_abbrevs['de'] = 'german'
_abbrevs['jp'] = 'japanese'
_abbrevs['kr'] = 'korean'
_abbrevs['es'] = 'spanish'
_abbrevs['pt'] = 'portuguese'
_abbrevs['it'] = 'italian'
_abbrevs['zh'] = 'chinese'
_abbrevs['zh'] = 'chinese_simple'
_abbrevs['zt'] = 'chinese_traditional'
_abbrevs['nl'] = 'dutch'
_abbrevs['el'] = 'greek'
for language in babelfish.available_languages:
_abbrevs[language] = language