Subversion Repositories navi

Compare Revisions

Ignore whitespace Rev 291 → Rev 292

/ircbot/bot.py
66,7 → 66,7
if (cmd.split(" ")[0] == "tr") or (cmd.split(" ")[0] == "translate"):
lang = "en"
if len(cmd.split(" ")) > 1 and cmd.split(" ")[1].startswith("-"):
if cmd.split(" ")[1][1:] in ("hu", "de", "ptbr", "est", "sv", "nl"):
if cmd.split(" ")[1][1:] in ("hu", "de", "pt", "et", "sv", "nl", "es", "fr", "pl", "ru", "tr", "uk"):
lang = cmd.split(" ")[1][1:]
sent = " ".join(cmd.split(" ")[2:])
else:
/webapp/templates/translate.html
36,6 → 36,12
<option value="pt">Brazilian Portuguese - Português do Brasil</option>
<option value="sv">Swedish - Svenska</option>
<option value="nl">Dutch - Nederlands</option>
<option value="es">Spanish - Español</option>
<option value="fr">French - Français</option>
<option value="pl">Polish - Polski</option>
<option value="ru">Russian - Русский</option>
<option value="tr">Turkish - Türkçe</option>
<option value="uk">Ukrainian - Türkçe</option>
</select>
<input name="btn" type="submit" value="Translate!" />
</form>
81,10 → 87,10
if("{{ lang }}" == "de"){
document.getElementById("lang").selectedIndex = 2
}
if("{{ lang }}" == "est"){
if("{{ lang }}" == "et"){
document.getElementById("lang").selectedIndex = 3
}
if("{{ lang }}" == "ptbr"){
if("{{ lang }}" == "pt"){
document.getElementById("lang").selectedIndex = 4
}
if("{{ lang }}" == "sv"){
93,6 → 99,21
if("{{ lang }}" == "nl"){
document.getElementById("lang").selectedIndex = 6
}
if("{{ lang }}" == "fr"){
document.getElementById("lang").selectedIndex = 7
}
if("{{ lang }}" == "pl"){
document.getElementById("lang").selectedIndex = 8
}
if("{{ lang }}" == "ru"){
document.getElementById("lang").selectedIndex = 9
}
if("{{ lang }}" == "tr"){
document.getElementById("lang").selectedIndex = 10
}
if("{{ lang }}" == "uk"){
document.getElementById("lang").selectedIndex = 11
}
</script>
{% end %}
{% end %}