bind: Minor i18n updates

- Use a proper i18n label for 'Forwarders' fields instead of auto-generated one.

- Reuse an already used success message for form submission so that a new
  message is not introduced for l10n.

- Minor styling fixes and a yapf run.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa committed 2017-12-31 18:42:22 +05:30
1 parent c7c9b200a8
commit ec0a323cb6
4 files changed
+7 -11

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
Plinth module to configure BIND server
Plinth module to configure BIND server.
"""
import re
+3 -3
View File
@@ -34,9 +34,9 @@ def validate_ips(ips):
class BindForm(ServiceForm):
"""BIND configuration form"""
forwarders = forms.CharField(
required=False, validators=[validate_ips], help_text=_(
'A list DNS servers, separated by space, to which '
'requests will be forwarded'))
label=_('Forwarders'), required=False, validators=[validate_ips],
help_text=_('A list DNS servers, separated by space, to which '
'requests will be forwarded'))
enable_dnssec = forms.BooleanField(
label=_('Enable DNSSEC'), required=False,
+2 -6
View File
@@ -14,16 +14,12 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
URLs for the BIND module
URLs for the BIND module.
"""
from django.conf.urls import url
from plinth.modules.bind.views import BindServiceView
urlpatterns = [
url(r'^sys/bind/$', BindServiceView.as_view(), name='index'),
]
urlpatterns = [url(r'^sys/bind/$', BindServiceView.as_view(), name='index'), ]
+1 -1
View File
@@ -54,6 +54,6 @@ class BindServiceView(ServiceView): # pylint: disable=too-many-ancestors
'configure', '--forwarders', data['forwarders'], '--dnssec',
dnssec_setting
])
messages.success(self.request, _('BIND configuration updated'))
messages.success(self.request, _('Configuration updated'))
return super().form_valid(form)