Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed translations for "Views" #461

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions netbox_dns/filtersets/zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import django_filters
from django.db.models import Q
from django.utils.translation import gettext as _
from django.utils.translation import pgettext as _p

from netbox.filtersets import NetBoxModelFilterSet
from tenancy.filtersets import TenancyFilterSet
Expand All @@ -28,7 +27,7 @@ class ZoneFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
queryset=View.objects.all(),
field_name="view__name",
to_field_name="name",
label=_p("DNS", "View"),
label=_("View"),
)
# DEPRECATED: Remove in 1.1
name_server_id = django_filters.ModelMultipleChoiceFilter(
Expand Down
5 changes: 2 additions & 3 deletions netbox_dns/forms/record.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from django import forms
from django.utils.translation import gettext_lazy as _
from django.utils.translation import pgettext_lazy as _p

from netbox.forms import (
NetBoxModelBulkEditForm,
Expand Down Expand Up @@ -48,7 +47,7 @@ def __init__(self, *args, **kwargs):
initial_params={
"zone": "$zone",
},
label=_p("DNS", "View"),
label=_("View"),
)
zone = DynamicModelChoiceField(
queryset=Zone.objects.all(),
Expand Down Expand Up @@ -204,7 +203,7 @@ def __init__(self, *args, **kwargs):
queryset=View.objects.all(),
to_field_name="name",
required=False,
label=_p("DNS", "View"),
label=_("View"),
error_messages={
"invalid_choice": _("View %(value)s not found"),
},
Expand Down
3 changes: 1 addition & 2 deletions netbox_dns/forms/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from django.core.exceptions import ValidationError, FieldError
from django.db.models import Q, Count
from django.utils.translation import gettext_lazy as _
from django.utils.translation import pgettext_lazy as _p

from netbox.forms import (
NetBoxModelBulkEditForm,
Expand Down Expand Up @@ -127,7 +126,7 @@ def __init__(self, *args, **kwargs):
)

fieldsets = (
FieldSet("name", "default_view", "description", name=_p("DNS", "View")),
FieldSet("name", "default_view", "description", name=_("View")),
FieldSet("prefixes", "ip_address_filter"),
FieldSet("tenant_group", "tenant", name=_("Tenancy")),
FieldSet("tags", name=_("Tags")),
Expand Down
5 changes: 2 additions & 3 deletions netbox_dns/forms/zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from django.core.validators import MinValueValidator, MaxValueValidator
from django.core.exceptions import ValidationError
from django.utils.translation import gettext_lazy as _
from django.utils.translation import pgettext_lazy as _p

from netbox.forms import (
NetBoxModelBulkEditForm,
Expand Down Expand Up @@ -385,7 +384,7 @@ class ZoneFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
view_id = DynamicModelMultipleChoiceField(
queryset=View.objects.all(),
required=False,
label=_p("DNS", "View"),
label=_("View"),
)
status = forms.MultipleChoiceField(
choices=ZoneStatusChoices,
Expand Down Expand Up @@ -675,7 +674,7 @@ class ZoneBulkEditForm(NetBoxModelBulkEditForm):
view = DynamicModelChoiceField(
queryset=View.objects.all(),
required=False,
label=_p("DNS", "View"),
label=_("View"),
)
status = forms.ChoiceField(
choices=add_blank_choice(ZoneStatusChoices),
Expand Down
Binary file modified netbox_dns/locale/de/LC_MESSAGES/django.mo
Binary file not shown.
Loading