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 2017-12-31 18:28:49 +05:30
parent c7c9b200a8
commit ec0a323cb6
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
4 changed files with 7 additions and 11 deletions

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

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,

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'), ]

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)