Subversion Repositories navi

Compare Revisions

Ignore whitespace Rev 269 → Rev 270

/ircbot/bot.py
58,7 → 58,7
if (cmd.split(" ")[0] == "tr") or (cmd.split(" ")[0] == "translate"):
lang = "eng"
if len(cmd.split(" ")) > 1 and cmd.split(" ")[1].startswith("-"):
if cmd.split(" ")[1][1:] in ("hu", "de", "ptbr", "est", "sv"):
if cmd.split(" ")[1][1:] in ("hu", "de", "ptbr", "est", "sv", "nl"):
lang = cmd.split(" ")[1][1:]
sent = " ".join(cmd.split(" ")[2:])
else:
/webapp/templates/translate.html
35,6 → 35,7
<option value="est">Estonian - Eesti</option>
<option value="ptbr">Brazilian Portuguese - Português do Brasil</option>
<option value="sv">Swedish - Svenska</option>
<option value="nl">Dutch - Nederlands</option>
</select>
<input name="btn" type="submit" value="Translate!" />
</form>
89,6 → 90,9
if("{{ lang }}" == "sv"){
document.getElementById("lang").selectedIndex = 5
}
if("{{ lang }}" == "nl"){
document.getElementById("lang").selectedIndex = 6
}
</script>
{% end %}
{% end %}