Commit 2dfaf351 authored by Bedřich Košata's avatar Bedřich Košata

text check and update

parent fc9568b5
...@@ -100,7 +100,7 @@ class PasswordConfigPage(ConfigPageMixin, PasswordHandler): ...@@ -100,7 +100,7 @@ class PasswordConfigPage(ConfigPageMixin, PasswordHandler):
result = super(PasswordConfigPage, self).save(no_messages=True, *args, **kwargs) result = super(PasswordConfigPage, self).save(no_messages=True, *args, **kwargs)
wrong_old_password = self.form.callback_results.get('wrong_old_password', False) wrong_old_password = self.form.callback_results.get('wrong_old_password', False)
if wrong_old_password: if wrong_old_password:
messages.warning(_("Old password you entered was invalid.")) messages.warning(_("Old password you entered was not valid."))
elif result: elif result:
messages.success(_("Password was successfully saved.")) messages.success(_("Password was successfully saved."))
else: else:
...@@ -176,7 +176,7 @@ class MaintenanceConfigPage(ConfigPageMixin, MaintenanceHandler): ...@@ -176,7 +176,7 @@ class MaintenanceConfigPage(ConfigPageMixin, MaintenanceHandler):
new_ip = self.form.callback_results.get('new_ip') new_ip = self.form.callback_results.get('new_ip')
if new_ip: if new_ip:
messages.success(_("Configuration was successfully restored. After installing " messages.success(_("Configuration was successfully restored. After installing "
"the updates and rebooting, router will be available at " "updates and rebooting, router will be available at "
"<a href=\"http://%(new_ip)s\">http://%(new_ip)s</a> in local " "<a href=\"http://%(new_ip)s\">http://%(new_ip)s</a> in local "
"network. Please wait a while until router automatically " "network. Please wait a while until router automatically "
"restarts.") % dict(new_ip=new_ip)) "restarts.") % dict(new_ip=new_ip))
...@@ -305,4 +305,4 @@ def config_ajax(page_name): ...@@ -305,4 +305,4 @@ def config_ajax(page_name):
result = config_page.call_ajax_action(action) result = config_page.call_ajax_action(action)
return result return result
except ValueError: except ValueError:
raise bottle.HTTPError(404, "Unknown action.") raise bottle.HTTPError(404, "Unknown action.")
\ No newline at end of file
...@@ -100,10 +100,16 @@ class PasswordHandler(BaseConfigHandler): ...@@ -100,10 +100,16 @@ class PasswordHandler(BaseConfigHandler):
description=_("Set your password for this administration interface." description=_("Set your password for this administration interface."
" The password must be at least 6 characters long.")) " The password must be at least 6 characters long."))
if self.change: if self.change:
pw_main.add_field(Password, name="old_password", label=_("Old password")) pw_main.add_field(Password, name="old_password", label=_("Current password"))
pw_main.add_field(Password, name="password", label=_("Password"), required=True, label_pass1 = _("New password")
label_pass2 = _("New password (repeat)")
else:
label_pass1 = _("Password")
label_pass2 = _("Password (repeat)")
pw_main.add_field(Password, name="password", label=label_pass1, required=True,
validators=validators.LenRange(6, 128)) validators=validators.LenRange(6, 128))
pw_main.add_field(Password, name="password_validation", label=_("Password (repeat)"), pw_main.add_field(Password, name="password_validation", label=label_pass2,
required=True, validators=validators.EqualTo("password", "password_validation", required=True, validators=validators.EqualTo("password", "password_validation",
_("Passwords are not equal."))) _("Passwords are not equal.")))
pw_main.add_field(Checkbox, name="set_system_pw", label=_("Use the same password for advanced configuration"), pw_main.add_field(Checkbox, name="set_system_pw", label=_("Use the same password for advanced configuration"),
...@@ -153,9 +159,9 @@ class WanHandler(BaseConfigHandler): ...@@ -153,9 +159,9 @@ class WanHandler(BaseConfigHandler):
wan_form = fapi.ForisForm("wan", self.data, filter=filters.uci) wan_form = fapi.ForisForm("wan", self.data, filter=filters.uci)
wan_main = wan_form.add_section(name="set_wan", title=_(self.userfriendly_title), wan_main = wan_form.add_section(name="set_wan", title=_(self.userfriendly_title),
description=_("Here you specify your WAN port settings. " description=_("Here you specify your WAN port settings. "
"Usually, you can leave this options untouched unless explicitly specified otherwise by your " "Usually, you can leave this options untouched unless instructed otherwise by your "
"internet service provider. And even in that case, change it only if Turris is connected " "internet service provider. Also, in case there is a cable or DSL modem connecting "
"directly to your ISP and not through a cable or DSL modem.")) "your router to the network, it is usually not necessary to change this setting."))
WAN_DHCP = "dhcp" WAN_DHCP = "dhcp"
WAN_STATIC = "static" WAN_STATIC = "static"
...@@ -215,7 +221,7 @@ class WanHandler(BaseConfigHandler): ...@@ -215,7 +221,7 @@ class WanHandler(BaseConfigHandler):
wan_main.add_field(Textbox, name="ip6addr", label=_("IPv6 address"), wan_main.add_field(Textbox, name="ip6addr", label=_("IPv6 address"),
nuci_path="uci.network.wan.ip6addr", nuci_path="uci.network.wan.ip6addr",
validators=validators.IPv6Prefix(), validators=validators.IPv6Prefix(),
hint=_("IPv6 address and prefix length for WAN interface, e.g. 2001:db8:be13:37da::/64"), hint=_("IPv6 address and prefix length for WAN interface, e.g. 2001:db8:be13:37da::1/64"),
required=True)\ required=True)\
.requires("proto", WAN_STATIC)\ .requires("proto", WAN_STATIC)\
.requires("static_ipv6", True) .requires("static_ipv6", True)
...@@ -361,8 +367,8 @@ class TimeHandler(BaseConfigHandler): ...@@ -361,8 +367,8 @@ class TimeHandler(BaseConfigHandler):
time_form = fapi.ForisForm("time", self.data, filter=filters.time) time_form = fapi.ForisForm("time", self.data, filter=filters.time)
time_main = time_form.add_section(name="set_time", title=_(self.userfriendly_title), time_main = time_form.add_section(name="set_time", title=_(self.userfriendly_title),
description=_( description=_(
"We could not synchronize the time with our timeserver, probably due to a loss of connection. " "We could not synchronize the time with a timeserver, probably due to a loss of connection. "
"It is necessary for the router to have the exact time in order to function properly. Please, " "It is necessary for the router to have correct time in order to function properly. Please, "
"synchronize it with your computer's time, or set it manually." "synchronize it with your computer's time, or set it manually."
)) ))
...@@ -385,11 +391,13 @@ class LanHandler(BaseConfigHandler): ...@@ -385,11 +391,13 @@ class LanHandler(BaseConfigHandler):
def get_form(self): def get_form(self):
lan_form = fapi.ForisForm("lan", self.data, filter=filters.uci) lan_form = fapi.ForisForm("lan", self.data, filter=filters.uci)
lan_main = lan_form.add_section(name="set_lan", title=_(self.userfriendly_title), lan_main = lan_form.add_section(name="set_lan", title=_(self.userfriendly_title),
description=_("This section specifies the settings of the local network. " description=_("This section contains settings for the local network (LAN). "
"Under normal conditions you can keep this settings as they are. Moreover, changing the router IP " "The provided defaults are suitable for most networks. "
"address has one caveat. If you do it the computers in local network will not obtain new addresses " "<br><strong>Note:</strong> If you change the router IP address, all computers in LAN, probably including the one you "
"automatically; you will have to do it manually for each connected device. And as you submit " "are using now, will need to obtain a <strong>new IP address</strong> which does <strong>not</strong> happen <strong>immediately</strong>. "
"your changes, the next page will not load until you obtain a new IP from DHCP (if DHCP enabled).")) "It is recommended to disconnect and reconnect all LAN cables after submitting your changes "
"to force the update. The next page will not load until you obtain a new IP from DHCP "
"(if DHCP enabled) and you might need to <strong>refresh the page</strong> in your browser."))
lan_main.add_field(Textbox, name="dhcp_subnet", label=_("Router IP address"), lan_main.add_field(Textbox, name="dhcp_subnet", label=_("Router IP address"),
nuci_path="uci.network.lan.ipaddr", nuci_path="uci.network.lan.ipaddr",
......
...@@ -161,7 +161,7 @@ def login(): ...@@ -161,7 +161,7 @@ def login():
if next and is_safe_redirect(next, bottle.request.get_header('host')): if next and is_safe_redirect(next, bottle.request.get_header('host')):
bottle.redirect(next) bottle.redirect(next)
else: else:
messages.error(_("Password you entered is invalid.")) messages.error(_("The password you entered was not valid."))
if next: if next:
redirect = "/?next=%s" % next redirect = "/?next=%s" % next
......
...@@ -19,8 +19,8 @@ msgid "" ...@@ -19,8 +19,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Foris 0.1\n" "Project-Id-Version: Foris 0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-02-05 07:57+0100\n" "POT-Creation-Date: 2014-02-05 12:39+0100\n"
"PO-Revision-Date: 2014-02-05 08:23+0100\n" "PO-Revision-Date: 2014-02-05 12:49+0100\n"
"Last-Translator: Beda Kosata <bedrich.kosata@nic.cz>\n" "Last-Translator: Beda Kosata <bedrich.kosata@nic.cz>\n"
"Language-Team: Czech <>\n" "Language-Team: Czech <>\n"
"Language: \n" "Language: \n"
...@@ -61,7 +61,7 @@ msgstr "Musí být z rozsahu %(low)s - %(high)s." ...@@ -61,7 +61,7 @@ msgstr "Musí být z rozsahu %(low)s - %(high)s."
msgid "Length must be from %(low)s to %(high)s characters." msgid "Length must be from %(low)s to %(high)s characters."
msgstr "Délka musí být od %(low)s do %(high)s znaků." msgstr "Délka musí být od %(low)s do %(high)s znaků."
msgid "Password you entered is invalid." msgid "The password you entered was not valid."
msgstr "Vámi zadané heslo je neplatné." msgstr "Vámi zadané heslo je neplatné."
msgid "Configuration was successfully saved." msgid "Configuration was successfully saved."
...@@ -70,7 +70,7 @@ msgstr "Nastavení bylo úspěšně uloženo." ...@@ -70,7 +70,7 @@ msgstr "Nastavení bylo úspěšně uloženo."
msgid "There were some errors in your input." msgid "There were some errors in your input."
msgstr "Některé z Vámi zadaných údajů nejsou platné." msgstr "Některé z Vámi zadaných údajů nejsou platné."
msgid "Old password you entered was invalid." msgid "Old password you entered was not valid."
msgstr "Vámi zadané původní heslo je neplatné." msgstr "Vámi zadané původní heslo je neplatné."
msgid "Password was successfully saved." msgid "Password was successfully saved."
...@@ -86,7 +86,7 @@ msgstr "Údržba" ...@@ -86,7 +86,7 @@ msgstr "Údržba"
#, python-format #, python-format
msgid "" msgid ""
"Configuration was successfully restored. After installing the updates and " "Configuration was successfully restored. After installing updates and "
"rebooting, router will be available at <a href=\"http://%(new_ip)s\">http://" "rebooting, router will be available at <a href=\"http://%(new_ip)s\">http://"
"%(new_ip)s</a> in local network. Please wait a while until router " "%(new_ip)s</a> in local network. Please wait a while until router "
"automatically restarts." "automatically restarts."
...@@ -122,13 +122,19 @@ msgstr "Heslo" ...@@ -122,13 +122,19 @@ msgstr "Heslo"
msgid "" msgid ""
"Set your password for this administration interface. The password must be at " "Set your password for this administration interface. The password must be at "
"least 6 charaters long." "least 6 characters long."
msgstr "" msgstr ""
"Zvolte si Vaše přístupové heslo pro toto administrační rozhraní. Heslo musí " "Zvolte si Vaše přístupové heslo pro toto administrační rozhraní. Heslo musí "
"být dlouhé alespoň 6 znaků." "být dlouhé alespoň 6 znaků."
msgid "Old password" msgid "Current password"
msgstr "Původní heslo" msgstr "Aktuální heslo"
msgid "New password"
msgstr "Nové heslo"
msgid "New password (repeat)"
msgstr "Nové heslo (pro kontrolu)"
msgid "Password (repeat)" msgid "Password (repeat)"
msgstr "Heslo (pro kontrolu)" msgstr "Heslo (pro kontrolu)"
...@@ -156,14 +162,15 @@ msgstr "WAN" ...@@ -156,14 +162,15 @@ msgstr "WAN"
msgid "" msgid ""
"Here you specify your WAN port settings. Usually, you can leave this options " "Here you specify your WAN port settings. Usually, you can leave this options "
"untouched unless explicitly specified otherwise by your internet service " "untouched unless instructed otherwise by your internet service provider. "
"provider. And even in that case, change it only if Turris is connected " "Also, in case there is a cable or DSL modem connecting your router to the "
"directly to your ISP and not through a cable or DSL modem." "network, it is usually not necessary to change this setting."
msgstr "" msgstr ""
"Na této stránce specifikujete nastavení připojení k vnější síti (WAN port) " "Na této stránce specifikujete nastavení připojení k vnější síti (WAN port). "
"podle požadavků Vašeho poskytovatele připojení. Pokud připojení k Internetu " "Obvykle není nutné nastavení měnit, pokud to není vyžadováno vaším "
"zprostředkovává kabelový nebo DSL modem, toto nastavení pravděpodobně nebude " "poskytovatelem internetového připojení. Také v případě, že připojení k "
"nutné měnit." "Internetu zprostředkovává kabelový nebo DSL modem, není většinou toto "
"nastavení nutné měnit."
msgid "DHCP (automatic configuration)" msgid "DHCP (automatic configuration)"
msgstr "DHCP (automatická konfigurace)" msgstr "DHCP (automatická konfigurace)"
...@@ -207,9 +214,9 @@ msgstr "IPv6 adresa" ...@@ -207,9 +214,9 @@ msgstr "IPv6 adresa"
msgid "" msgid ""
"IPv6 address and prefix length for WAN interface, e.g. 2001:db8:" "IPv6 address and prefix length for WAN interface, e.g. 2001:db8:"
"be13:37da::/64" "be13:37da::1/64"
msgstr "" msgstr ""
"IPv6 adresa a délka prefixu pro rozhraní WAN, např. 2001:db8:be13:37da::/64" "IPv6 adresa a délka prefixu pro rozhraní WAN, např. 2001:db8:be13:37da::1/64"
msgid "IPv6 gateway" msgid "IPv6 gateway"
msgstr "IPv6 výchozí brána" msgstr "IPv6 výchozí brána"
...@@ -255,10 +262,10 @@ msgid "Time" ...@@ -255,10 +262,10 @@ msgid "Time"
msgstr "Čas" msgstr "Čas"
msgid "" msgid ""
"We could not synchronize the time with our timeserver, probably due to a " "We could not synchronize the time with a timeserver, probably due to a loss "
"loss of connection. It is necessary for the router to have the exact time in " "of connection. It is necessary for the router to have correct time in order "
"order to function properly. Please, synchronize it with your computer's " "to function properly. Please, synchronize it with your computer's time, or "
"time, or set it manually." "set it manually."
msgstr "" msgstr ""
"Nepodařilo se připojit k časovému serveru, pravděpodobně kvůli chybě " "Nepodařilo se připojit k časovému serveru, pravděpodobně kvůli chybě "
"připojení. Prosím, nastavte čas ručně nebo ho synchronizujte s Vaším " "připojení. Prosím, nastavte čas ručně nebo ho synchronizujte s Vaším "
...@@ -269,19 +276,25 @@ msgid "LAN" ...@@ -269,19 +276,25 @@ msgid "LAN"
msgstr "LAN" msgstr "LAN"
msgid "" msgid ""
"This section specifies the settings of the local network. Under normal " "This section contains settings for the local network (LAN). The provided "
"conditions you can keep this settings as they are. Moreover, changing the " "defaults are suitable for most networks. <br><strong>Note:</strong> If you "
"router IP address has one caveat. If you do it the computers in local " "change the router IP address, all computers in LAN, probably including the "
"network will not obtain new addresses automatically; you will have to do it " "one you are using now, will need to obtain a <strong>new IP address</strong> "
"manually for each connected device. And as you submit your changes, the next " "which does <strong>not</strong> happen <strong>immediately</strong>. It is "
"page will not load until you obtain a new IP from DHCP (if DHCP enabled)." "recommended to disconnect and reconnect all LAN cables after submitting your "
msgstr "" "changes to force the update. The next page will not load until you obtain a "
"V této sekci specifikujete nastavení lokální sítě. Za normálních okolností " "new IP from DHCP (if DHCP enabled) and you might need to <strong>refresh the "
"tato nastavení není nutné měnit. Pozor - v případě, že změníte IP adresu " "page</strong> in your browser."
"routeru, pro opětovný přístup do administračního rozhraní bude nutné ručně " msgstr ""
"zadat tuto adresu do adresního řádku Vašeho prohlížeče. V některých " "Tato sekce obsahuje nastavení lokální sítě (LAN). Výchozí nastavení je "
"případech je také nutné obnovit IP adresu připojeného zařízení, to je možné " "vhodné pro většinu sítí a není třeba jej měnit. <br><strong>Upozornění:</"
"provést i odpojením a následovným připojením zařízení." "strong> Pokud změníte IP adresu routeru, <strong>změní se adresy všech "
"počítačů</strong> v LAN, pravděpodobně včetně toho, který právě používáte. "
"To se <strong>nestane okamžitě</strong> a doporučujeme tedy odpojit a znovu "
"připojit všechny síťové kabely poté, co odešlete změny v tomto formuláři. "
"Následující stránka se nenahraje dokud nedojde ke změně adresy vašeho "
"počítače z DHCP (pokud je DHCP aktivováno). Může být také potřeba "
"<strong>znovu nahrát stránku</strong> v prohlížeči."
msgid "Router IP address" msgid "Router IP address"
msgstr "IP adresa routeru" msgstr "IP adresa routeru"
...@@ -360,7 +373,7 @@ msgid "Network password" ...@@ -360,7 +373,7 @@ msgid "Network password"
msgstr "Heslo pro připojení" msgstr "Heslo pro připojení"
msgid "" msgid ""
"WPA2 preshared key, that is required to connect to the network. Minimum " "WPA2 pre-shared key, that is required to connect to the network. Minimum "
"length is 8 characters." "length is 8 characters."
msgstr "" msgstr ""
"Heslo, které bude vyžadováno pro připojení k této síti, alespoň 8 znaků " "Heslo, které bude vyžadováno pro připojení k této síti, alespoň 8 znaků "
...@@ -497,7 +510,7 @@ msgstr "Nastavení DNS" ...@@ -497,7 +510,7 @@ msgstr "Nastavení DNS"
msgid "" msgid ""
"Router Turris uses its own DNS resolver with DNSSEC support. It is capable " "Router Turris uses its own DNS resolver with DNSSEC support. It is capable "
"of working alone or it can forward your DNS queris through your internet " "of working alone or it can forward your DNS queries through your internet "
"service provider's DNS resolver." "service provider's DNS resolver."
msgstr "" msgstr ""
"Router Turris používá vlastní DNS resolver s podporou DNSSEC. Ten je schopen " "Router Turris používá vlastní DNS resolver s podporou DNSSEC. Ten je schopen "
...@@ -561,7 +574,7 @@ msgstr "Otestovat připojení" ...@@ -561,7 +574,7 @@ msgstr "Otestovat připojení"
msgid "" msgid ""
"Welcome to the Turris administration site. Please, choose a config section " "Welcome to the Turris administration site. Please, choose a config section "
"you wish to change from selection above." "you wish to change from the above selection."
msgstr "" msgstr ""
"Vítejte v administračním rozhraní routeru Turris. Vyberte si prosím sekci, " "Vítejte v administračním rozhraní routeru Turris. Vyberte si prosím sekci, "
"kterou chcete upravovat, z možností uvedených výše." "kterou chcete upravovat, z možností uvedených výše."
...@@ -590,7 +603,7 @@ msgstr "Krok" ...@@ -590,7 +603,7 @@ msgstr "Krok"
#, python-format #, python-format
msgid "" msgid ""
"Device was succesfully installed. Last step that is required is a " "Device was successfully installed. Last step that is required is a "
"registration of your device in your user profile on the Turris website <a " "registration of your device in your user profile on the Turris website <a "
"href=\"%(url)s\">%(url)s</a>." "href=\"%(url)s\">%(url)s</a>."
msgstr "" msgstr ""
...@@ -734,6 +747,28 @@ msgstr "Test připojení" ...@@ -734,6 +747,28 @@ msgstr "Test připojení"
msgid "System update" msgid "System update"
msgstr "Kontrola aktualizací" msgstr "Kontrola aktualizací"
#~ msgid "Old password"
#~ msgstr "Původní heslo"
#~ msgid ""
#~ "This section specifies the settings of the local network. Under normal "
#~ "conditions you can keep this settings as they are. Moreover, changing the "
#~ "router IP address has one caveat. If you do it the computers in local "
#~ "network will not obtain new addresses automatically; you will have to do "
#~ "it manually for each connected device. And as you submit your changes, "
#~ "the next page will not load until you obtain a new IP from DHCP (if DHCP "
#~ "enabled)."
#~ msgstr ""
#~ "V této sekci specifikujete nastavení lokální sítě. Za normálních "
#~ "okolností tato nastavení není nutné měnit. Pozor - v případě, že změníte "
#~ "IP adresu routeru, pro opětovný přístup do administračního rozhraní bude "
#~ "nutné ručně zadat tuto adresu do adresního řádku Vašeho prohlížeče. V "
#~ "některých případech je také nutné obnovit IP adresu připojeného zařízení, "
#~ "to je možné provést i odpojením a následovným připojením zařízení."
#~ msgid "Password you entered is invalid."
#~ msgstr "Vámi zadané heslo je neplatné."
#~ msgid "DHCP" #~ msgid "DHCP"
#~ msgstr "DHCP" #~ msgstr "DHCP"
......
...@@ -18,6 +18,6 @@ ...@@ -18,6 +18,6 @@
<div id="page-index" class="config-page"> <div id="page-index" class="config-page">
<p class="config-description"> <p class="config-description">
{{ trans("Welcome to the Turris administration site. Please, choose a config section you wish to change from selection above.") }} {{ trans("Welcome to the Turris administration site. Please, choose a config section you wish to change from the above selection.") }}
</p> </p>
</div> </div>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<form id="main-form" class="wizard-form" action="{{ request.fullpath }}" method="post" autocomplete="off" novalidate> <form id="main-form" class="wizard-form" action="{{ request.fullpath }}" method="post" autocomplete="off" novalidate>
<h1>{{ trans(first_title) }}</h1> <h1>{{ trans(first_title) }}</h1>
<p class="wizard-description">{{ first_description }}</p> <p class="wizard-description">{{! first_description }}</p>
%include _messages %include _messages
<input type="hidden" name="csrf_token" value="{{ get_csrf_token() }}"> <input type="hidden" name="csrf_token" value="{{ get_csrf_token() }}">
%for field in form.active_fields: %for field in form.active_fields:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment