mirror of
https://github.com/nichkara/InfinitumBotty.git
synced 2026-06-11 06:36:24 +02:00
removed legacy i18n
This commit is contained in:
@@ -4,7 +4,6 @@ from collections import defaultdict
|
||||
from FaustBot.Communication.Connection import Connection
|
||||
from FaustBot.Model.UserProvider import UserProvider
|
||||
from FaustBot.Modules.PrivMsgObserverPrototype import PrivMsgObserverPrototype
|
||||
from ..Model.i18n import i18n
|
||||
from FaustBot.Modules.UserList import UserList
|
||||
|
||||
class AllSeenObserver(PrivMsgObserverPrototype):
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import datetime
|
||||
import time
|
||||
|
||||
from FaustBot.Communication.Connection import Connection
|
||||
from FaustBot.Model.UserProvider import UserProvider
|
||||
from FaustBot.Modules.PrivMsgObserverPrototype import PrivMsgObserverPrototype
|
||||
from ..Model.i18n import i18n
|
||||
from FaustBot.Model.BlockedUsers import BlockProvider
|
||||
|
||||
class BlockObserver(PrivMsgObserverPrototype):
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import datetime
|
||||
import time
|
||||
|
||||
from FaustBot.Communication.Connection import Connection
|
||||
from FaustBot.Model.UserProvider import UserProvider
|
||||
from FaustBot.Modules.PrivMsgObserverPrototype import PrivMsgObserverPrototype
|
||||
from ..Model.i18n import i18n
|
||||
|
||||
|
||||
class SeenObserver(PrivMsgObserverPrototype):
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
from wikipedia import wikipedia
|
||||
|
||||
from FaustBot.Model.i18n import i18n
|
||||
from FaustBot.Modules.PrivMsgObserverPrototype import PrivMsgObserverPrototype
|
||||
|
||||
|
||||
@@ -17,18 +15,16 @@ class WikiObserver(PrivMsgObserverPrototype):
|
||||
|
||||
if data['message'].find('.w ') == -1:
|
||||
return
|
||||
i18n_server = i18n()
|
||||
w = wikipedia.set_lang(i18n_server.get_text('wiki_lang', lang=self.config.lang))
|
||||
w = wikipedia.set_lang('de')
|
||||
q = data['message'].split(' ')
|
||||
query = ''
|
||||
for word in q:
|
||||
if word.strip() != '.w':
|
||||
query += word + ' '
|
||||
w = wikipedia.search(query)
|
||||
if w.__len__() == 0: # TODO BUG BELOW, ERROR MESSAGE NOT SHOWN!
|
||||
if w.__len__() == 0:
|
||||
connection.send_back(data['nick'] + ', ' +
|
||||
i18n_server.get_text('wiki_fail',
|
||||
lang=self.config.lang),
|
||||
'ich habe dazu keinen eintrag gefunden!',
|
||||
data)
|
||||
return
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user