Subversion Repositories navi

Compare Revisions

Ignore whitespace Rev 237 → Rev 241

/tsimapiak/parse.py
133,6 → 133,7
break
if pref != u"":
foundit = False
foundprefs = []
break
last = u""
while last != posf:
150,6 → 151,7
break
if posf != u"":
foundit = False
foundposts = []
break
if foundit == True:
foundword = word
/webapp/main.py
82,6 → 82,20
self.redirect("/translate")
out = translate.translatesent(word, lang)
self.render("templates/translate.html", last=word, out=out, lang=lang)
class Errors(tornado.web.RequestHandler):
def get_error_html(self, status_code, **kwargs):
if status_code == 500:
return "<html><title>%(code)d: %(message)s</title>" \
"<body>%(code)d: %(message)s<br /><br />Either we are currently working on the server, or you uncovered a bug. Please check back later on. If you still get this error, please report this bug to us in the forum thread or on IRC.</body></html>" % {
"code": status_code,
"message": httplib.responses[status_code],
}
else:
return "<html><title>%(code)d: %(message)s</title>" \
"<body>%(code)d: %(message)s</body></html>" % {
"code": status_code,
"message": httplib.responses[status_code],
}
 
settings = {
"static_path": os.path.join(os.path.dirname(__file__), "static")
/ircbot/bot.py
49,7 → 49,7
 
if (cmd.split(" ")[0] == "tr") or (cmd.split(" ")[0] == "translate"):
lang = "eng"
if cmd.split(" ")[1].startswith("-"):
if len(cmd.split(" ")) > 1 and cmd.split(" ")[1].startswith("-"):
if cmd.split(" ")[1][1:] in ("hu", "de", "ptbr", "est", "sv"):
lang = cmd.split(" ")[1][1:]
sent = " ".join(cmd.split(" ")[2:])