From 23c3dce14fc5eee610926938d2e2194fd2c35ed1 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Wed, 16 Apr 2025 11:31:08 -0300 Subject: [PATCH] Port forward translation --- firewall/forms.py | 15 +- firewall/views.py | 11 +- locale/pt_BR/LC_MESSAGES/django.mo | Bin 31865 -> 37802 bytes locale/pt_BR/LC_MESSAGES/django.po | 314 +++++++++++++++---- templates/firewall/firewall_nav_tabs.html | 5 +- templates/firewall/manage_redirect_rule.html | 46 ++- templates/firewall/redirect_rule_list.html | 20 +- 7 files changed, 301 insertions(+), 110 deletions(-) diff --git a/firewall/forms.py b/firewall/forms.py index 4e31c82..2e37b7f 100644 --- a/firewall/forms.py +++ b/firewall/forms.py @@ -1,6 +1,7 @@ import re from django import forms +from django.utils.translation import gettext_lazy as _ from firewall.models import FirewallRule, FirewallSettings, RedirectRule from wgwadmlibrary.tools import list_network_interfaces @@ -36,18 +37,24 @@ class RedirectRuleForm(forms.ModelForm): wireguard_instance = cleaned_data.get('wireguard_instance') port_forward = cleaned_data.get('port_forward') + if not port: + raise forms.ValidationError(_("Port is required.")) + if port == 8000 and protocol == 'tcp': - raise forms.ValidationError("Port 8000 (tcp) is reserved for wireguard-webadmin.") + raise forms.ValidationError(_("Port 8000 (tcp) is reserved for wireguard-webadmin.")) if protocol == 'udp': if WireGuardInstance.objects.filter(listen_port=port).exists(): - raise forms.ValidationError("Port " + str(port) + " (udp) is already in use by a WireGuard instance.") + raise forms.ValidationError(_("Port %s is already in use by another WireGuard instance.") % port) + + if not peer and not ip_address: + raise forms.ValidationError(_("Invalid Destination. Either Peer or IP Address must be informed.")) if peer and ip_address: - raise forms.ValidationError("Peer and IP Address cannot be selected at the same time.") + raise forms.ValidationError(_("Peer and IP Address cannot be selected at the same time.")) if ip_address and not wireguard_instance: - raise forms.ValidationError("IP Address cannot be used without selecting a WireGuard instance.") + raise forms.ValidationError(_("IP Address cannot be used without selecting a WireGuard instance.")) if peer: cleaned_data['wireguard_instance'] = peer.wireguard_instance diff --git a/firewall/views.py b/firewall/views.py index f39ab05..393f18c 100644 --- a/firewall/views.py +++ b/firewall/views.py @@ -3,6 +3,7 @@ from django.contrib.auth.decorators import login_required from django.db.models import Max from django.http import JsonResponse from django.shortcuts import get_object_or_404, redirect, render +from django.utils.translation import gettext_lazy as _ from firewall.forms import FirewallRuleForm, FirewallSettingsForm, RedirectRuleForm from firewall.models import FirewallRule, FirewallSettings, RedirectRule @@ -17,7 +18,7 @@ def view_redirect_rule_list(request): if wireguard_instances.filter(legacy_firewall=True).exists(): return redirect('/firewall/migration_required/') context = { - 'page_title': 'Port Forward List', + 'page_title': _('Port Forward List'), 'redirect_rule_list': RedirectRule.objects.all().order_by('port'), 'current_chain': 'portforward', } @@ -28,7 +29,7 @@ def view_redirect_rule_list(request): def manage_redirect_rule(request): if not UserAcl.objects.filter(user=request.user).filter(user_level__gte=40).exists(): return render(request, 'access_denied.html', {'page_title': 'Access Denied'}) - context = {'page_title': 'Manage Port Forward'} + context = {'page_title': _('Manage Port Forward')} instance = None uuid = request.GET.get('uuid', None) if uuid: @@ -38,9 +39,9 @@ def manage_redirect_rule(request): instance.wireguard_instance.pending_changes = True instance.wireguard_instance.save() instance.delete() - messages.success(request, 'Port Forward rule deleted successfully') + messages.success(request, _('Port Forward rule deleted successfully')) else: - messages.warning(request, 'Error deleting Port Forward rule|Confirmation did not match. Port Forward rule was not deleted.') + messages.warning(request, _('Error deleting Port Forward rule|Confirmation did not match. Port Forward rule was not deleted.')) return redirect('/firewall/port_forward/') if request.method == 'POST': @@ -50,7 +51,7 @@ def manage_redirect_rule(request): wireguard_instance.pending_changes = True wireguard_instance.save() form.save() - messages.success(request, 'Port Forward rule saved successfully') + messages.success(request, _('Port Forward rule saved successfully')) return redirect('/firewall/port_forward/') else: form = RedirectRuleForm(instance=instance) diff --git a/locale/pt_BR/LC_MESSAGES/django.mo b/locale/pt_BR/LC_MESSAGES/django.mo index f145875379c3a59043f8f267031562f7959c9372..4cee3b9752fbaef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E%9~SZhVm7gl;OWxeA#FCqC4>h@gQ-IsLeTgI`jzECr%RUiJJ6>==Zx- ztrK=5Dse(EahCc^gdWfS#4=(a@ja15d`vVZR5n}8ZuD_(Sy@D7DRG9VMZbrrQT8Q{ zu@8@ZU;jo&Hc^g)((o#=pZJ*=K(rx(_^t!y5l<2`hm5Gs!nM~HaZRfty9?-6CCu6tZnJVoc1?iZV|gm}|!-@*uD z5)n=OolvPr9OeFIG4UCpGK)Aygmcl2>Tt_ce4qG{sLXeNVGi*HaX&GPP-#Z|gLqvH zN&?6J7bg>Qh$z}BHHp)N?jQK?`iZJgB01nEJVZFebYc~ulFWA*SP*C#^EcFgd<=5i z;ybrK3ajy*N*vLU=t;CDRN4`j%htb9pv(R;SxJ2x@fgvAm`el-7b~W6kysGuFy;yD z=hlbg9YX&{MiKgmu|yX_<)$U@dDyLcjh9(&@!bw9e!byYXI-ODJ&c$tEp1;e?v>u$Igoyzw|wrnF?r()eUm3lEp!@n z*x+@7I<@f@CwD1uUh0w<7DoT5(G&UZO7D^&XH~!HK~D0Jei6kbx!*ghMkafmuk){X zoeN`Td!oCIADK5f@9?$>z6n!(J^TAcPHqg$ zr8wKC-SZY7D~fV{Eb12IjGz66?iy8`KW~)t`MiGN#hsSMIn$SJ4|dwDnBx5(m#iXN diff --git a/locale/pt_BR/LC_MESSAGES/django.po b/locale/pt_BR/LC_MESSAGES/django.po index d7893ab..00938ae 100644 --- a/locale/pt_BR/LC_MESSAGES/django.po +++ b/locale/pt_BR/LC_MESSAGES/django.po @@ -6,9 +6,10 @@ #, fuzzy msgid "" msgstr "" + "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-16 10:17-0300\n" +"POT-Creation-Date: 2025-04-16 11:25-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -67,10 +68,11 @@ msgid "Secondary DNS" msgstr "DNS Secundário" #: dns/forms.py:25 dns/forms.py:67 dns/forms.py:109 +#: templates/firewall/manage_redirect_rule.html:85 #: templates/wireguard/wireguard_manage_ip.html:42 #: templates/wireguard/wireguard_manage_peer.html:170 #: templates/wireguard/wireguard_peer_list.html:166 user_manager/forms.py:49 -#: user_manager/forms.py:180 vpn_invite/forms.py:193 vpn_invite/forms.py:327 +#: user_manager/forms.py:180 vpn_invite/forms.py:192 vpn_invite/forms.py:326 msgid "Back" msgstr "Voltar" @@ -79,11 +81,12 @@ msgid "Resolver Settings" msgstr "Resolução de DNS" #: dns/forms.py:37 dns/forms.py:83 dns/forms.py:134 +#: templates/firewall/manage_redirect_rule.html:84 #: templates/wireguard/wireguard_manage_ip.html:41 #: templates/wireguard/wireguard_manage_peer.html:168 #: templates/wireguard/wireguard_manage_server.html:130 -#: user_manager/forms.py:98 user_manager/forms.py:205 vpn_invite/forms.py:192 -#: vpn_invite/forms.py:326 +#: user_manager/forms.py:98 user_manager/forms.py:205 vpn_invite/forms.py:191 +#: vpn_invite/forms.py:325 msgid "Save" msgstr "Salvar" @@ -92,11 +95,15 @@ msgid "Hostname" msgstr "Endereço do Host" #: dns/forms.py:66 templates/dns/static_host_list.html:18 +#: templates/firewall/manage_redirect_rule.html:43 +#: templates/firewall/manage_redirect_rule.html:67 +#: templates/firewall/manage_redirect_rule.html:68 #: templates/wireguard/wireguard_status.html:45 msgid "IP Address" msgstr "Endereço IP" #: dns/forms.py:68 dns/forms.py:110 +#: templates/firewall/manage_redirect_rule.html:86 #: templates/wireguard/wireguard_manage_ip.html:43 #: templates/wireguard/wireguard_peer_list.html:185 user_manager/forms.py:48 #: user_manager/forms.py:181 @@ -114,6 +121,8 @@ msgid "Name" msgstr "Nome" #: dns/forms.py:112 templates/dns/static_host_list.html:69 +#: templates/firewall/manage_redirect_rule.html:18 +#: templates/firewall/manage_redirect_rule.html:19 msgid "Description" msgstr "Descrição" @@ -211,6 +220,55 @@ msgstr "Lista de Filtro de DNS não habilitada | Nenhum host válido encontrado" msgid "DNS Filter List disabled successfully" msgstr "Lista de Filtro de DNS desabilitada com sucesso" +#: firewall/forms.py:41 +msgid "Port is required." +msgstr "Porta é obrigatória." + +#: firewall/forms.py:44 +msgid "Port 8000 (tcp) is reserved for wireguard-webadmin." +msgstr "Porta 8000 (tcp) é reservada para o wireguard-webadmin." + +#: firewall/forms.py:48 +#, python-format +msgid "Port %s is already in use by another WireGuard instance." +msgstr "Porta %s já está em uso por uma instância do WireGuard." + +#: firewall/forms.py:51 +msgid "Invalid Destination. Either Peer or IP Address must be informed." +msgstr "Destino inválido. Ou Peer ou Endereço IP devem ser informados." + +#: firewall/forms.py:54 +msgid "Peer and IP Address cannot be selected at the same time." +msgstr "Peer e Endereço IP não podem ser selecionados ao mesmo tempo." + +#: firewall/forms.py:57 +msgid "IP Address cannot be used without selecting a WireGuard instance." +msgstr "Endereço IP não pode ser usado sem selecionar uma instância do WireGuard." + +#: firewall/views.py:21 +msgid "Port Forward List" +msgstr "Lista de Encaminhamento de Porta" + +#: firewall/views.py:32 +msgid "Manage Port Forward" +msgstr "Gerenciar Encaminhamento de Porta" + +#: firewall/views.py:42 +msgid "Port Forward rule deleted successfully" +msgstr "Regra de Encaminhamento de porta excluída com sucesso" + +#: firewall/views.py:44 +msgid "" +"Error deleting Port Forward rule|Confirmation did not match. Port Forward " +"rule was not deleted." +msgstr "" +"Erro ao excluir a regra de Encaminhamento de porta|Confirmação inválida. A " +"regra de Encaminhamento de porta não foi excluída." + +#: firewall/views.py:54 +msgid "Port Forward rule saved successfully" +msgstr "Regra de Encaminhamento de porta salva com sucesso" + #: intl_tools/forms.py:11 templates/accounts/login.html:36 msgid "Language" msgstr "Idioma" @@ -235,13 +293,13 @@ msgstr "" "que isto é um erro." #: templates/accounts/login.html:14 templates/user_manager/list.html:8 -#: user_manager/forms.py:13 vpn_invite/forms.py:282 +#: user_manager/forms.py:13 vpn_invite/forms.py:281 msgid "Username" msgstr "Usuário" #: templates/accounts/login.html:23 #: templates/vpn_invite/invite_settings.html:19 user_manager/forms.py:14 -#: vpn_invite/forms.py:283 +#: vpn_invite/forms.py:282 msgid "Password" msgstr "Senha" @@ -258,8 +316,8 @@ msgid "Login again" msgstr "Acessar novamente" #: templates/base.html:112 templates/dns/static_host_list.html:72 -#: vpn_invite/forms.py:79 vpn_invite/forms.py:80 vpn_invite/forms.py:81 -#: vpn_invite/forms.py:82 vpn_invite/forms.py:83 +#: vpn_invite/forms.py:78 vpn_invite/forms.py:79 vpn_invite/forms.py:80 +#: vpn_invite/forms.py:81 vpn_invite/forms.py:82 msgid "Status" msgstr "Estado" @@ -268,7 +326,7 @@ msgid "User Manager" msgstr "Configurar Usuários" #: templates/base.html:176 templates/wireguard/wireguard_peer_list.html:195 -#: vpn_invite/views.py:36 +#: vpn_invite/views.py:37 msgid "VPN Invite" msgstr "Convite para VPN" @@ -350,6 +408,142 @@ msgstr "Editar" msgid "Add Filter List" msgstr "Adicionar Lista de Filtro" +#: templates/firewall/firewall_nav_tabs.html:11 +msgid "Port Forward" +msgstr "Encaminhamento de Porta" + +#: templates/firewall/firewall_nav_tabs.html:15 +msgid "Default Policy" +msgstr "Política Padrão" + +#: templates/firewall/manage_redirect_rule.html:22 +#: templates/firewall/redirect_rule_list.html:13 +msgid "Protocol" +msgstr "Protocolo" + +#: templates/firewall/manage_redirect_rule.html:30 +#: templates/firewall/redirect_rule_list.html:14 +#: templates/wireguard/wireguard_status.html:47 vpn_invite/forms.py:284 +msgid "Port" +msgstr "Porta" + +#: templates/firewall/manage_redirect_rule.html:35 +msgid "Destination Port" +msgstr "Porta de Destino" + +#: templates/firewall/manage_redirect_rule.html:40 +msgid "Destination Type" +msgstr "Tipo de Destino" + +#: templates/firewall/manage_redirect_rule.html:42 +#: templates/firewall/manage_redirect_rule.html:48 +#: templates/vpn_invite/invite_settings.html:17 user_manager/forms.py:178 +msgid "Peer" +msgstr "Peer" + +#: templates/firewall/manage_redirect_rule.html:57 +msgid "WireGuard Instance" +msgstr "Instância do WireGuard" + +#: templates/firewall/manage_redirect_rule.html:74 +msgid "Add Forward Rule (allow)" +msgstr "Adicionar Regra na Forward (permitir)" + +#: templates/firewall/manage_redirect_rule.html:80 +#: templates/firewall/redirect_rule_list.html:17 +msgid "Masquerade Source" +msgstr "Mascarar Origem" + +#: templates/firewall/manage_redirect_rule.html:91 +msgid "" +"\n" +"
Default Ports
\n" +"

The default docker-compose.yml file " +"specifies the TCP port range 8080-8089. If you wish to change " +"the port forwarding to a different range, you must manually edit the " +"docker-compose.yml file and rerun the Docker Compose step " +"outlined in the deployment instructions.

\n" +"
Destination Type: Peer
\n" +"

Port redirection will prioritize the first Peer " +"IP address assigned a priority of Zero.

\n" +"
Destination Type: IP Address
\n" +"

Port forwarding rules will redirect to the " +"specified IP address. Remember to allocate the IP address or network to a " +"Peer.

\n" +"
Adding a Forward Rule
\n" +"

Automatically generates a forwarding rule to " +"accommodate stricter firewall settings.

\n" +"
Masquerade Source
\n" +"

This serves as a temporary solution when a peer " +"does not use the VPN as its default gateway. It's important to note that " +"this configuration is not recommended, as it alters the source address of " +"all connections to match the IP address of the WireGuard instance.

\n" +" " +msgstr "" +"\n" +"
Portas Padrão
\n" +"

O arquivo padrão docker-compose.yml " +"especifica o intervalo de portas TCP 8080-8089. Se você deseja " +"alterar o redirecionamento de portas para um intervalo diferente, é " +"necessário editar manualmente o arquivo docker-compose.yml e " +"executar novamente a etapa do Docker Compose descrita nas instruções de implantação.

\n" +"
Tipo de Destino: Peer
\n" +"

O redirecionamento de porta dará prioridade ao " +"primeiro endereço IP do Peer com prioridade Zero.

\n" +"
Tipo de Destino: Endereço IP
\n" +"

As regras de encaminhamento de porta " +"redirecionarão para o endereço IP especificado. Lembre-se de alocar o " +"endereço IP ou rede para um Peer.

\n" +"
Adicionando uma Regra de Encaminhamento
\n" +"

Gera automaticamente uma regra de encaminhamento " +"para acomodar configurações de firewall mais restritivas.

\n" +"
Mascarar Fonte
\n" +"

Isto serve como uma solução temporária quando um " +"peer não utiliza a VPN como gateway padrão. É importante notar que esta " +"configuração não é recomendada, pois altera o endereço de origem de todas as " +"conexões para corresponder ao endereço IP da instância do WireGuard.

\n" +" " + +#: templates/firewall/manage_redirect_rule.html:143 +msgid "To delete this rule, please type:" +msgstr "Para excluir esta regra, digite:" + +#: templates/firewall/redirect_rule_list.html:12 +msgid "Instance" +msgstr "Instância" + +#: templates/firewall/redirect_rule_list.html:15 +msgid "Destination" +msgstr "Destino" + +#: templates/firewall/redirect_rule_list.html:16 +msgid "Allow Forward" +msgstr "Permitir Encaminhamento" + +#: templates/firewall/redirect_rule_list.html:46 +msgid "" +"This serves as a temporary solution when a peer does not use the VPN as its " +"default gateway. It's important to note that this configuration is not " +"recommended, as it alters the source address of all connections to match the " +"IP address of the WireGuard instance." +msgstr "" +"Isto serve como uma solução temporária quando um peer não usa a VPN como seu " +"gateway padrão. É importante notar que essa configuração não é recomendada, " +"pois altera o endereço de origem de todas as conexões para corresponder ao " +"endereço IP da instância do WireGuard." + +#: templates/firewall/redirect_rule_list.html:58 +msgid "Create Port forwarding Rule" +msgstr "Criar Regra de Encaminhamento de Porta" + +#: templates/firewall/redirect_rule_list.html:59 +msgid "Firewall Settings" +msgstr "Configuração de Firewall" + #: templates/user_manager/list.html:9 user_manager/forms.py:20 msgid "User Level" msgstr "Nível de Acesso" @@ -412,10 +606,6 @@ msgstr "Instância do WireGuard" msgid "Users" msgstr "Usuários" -#: templates/vpn_invite/invite_settings.html:17 user_manager/forms.py:178 -msgid "Peer" -msgstr "Peer" - #: templates/vpn_invite/invite_settings.html:18 msgid "Expiration" msgstr "Expira em" @@ -428,7 +618,7 @@ msgstr "Remover convite para VPN do peer" msgid "No active VPN invitations" msgstr "Nenhum convite para VPN ativo" -#: templates/vpn_invite/invite_settings.html:49 vpn_invite/views.py:76 +#: templates/vpn_invite/invite_settings.html:49 vpn_invite/views.py:77 msgid "Email Settings" msgstr "Configurações de Email" @@ -773,10 +963,6 @@ msgstr "Tráfego da Instância" msgid "Public Address" msgstr "Endereço Público" -#: templates/wireguard/wireguard_status.html:47 vpn_invite/forms.py:285 -msgid "Port" -msgstr "Porta" - #: user_manager/forms.py:15 msgid "Password Confirmation" msgstr "Confirmação de Senha" @@ -981,170 +1167,170 @@ msgstr "" msgid "Please type the username to proceed." msgstr "Por favor, digite o nome de usuário para prosseguir." -#: vpn_invite/forms.py:50 vpn_invite/forms.py:295 +#: vpn_invite/forms.py:49 vpn_invite/forms.py:294 msgid "Enabled" msgstr "Habilitado" -#: vpn_invite/forms.py:50 +#: vpn_invite/forms.py:49 msgid "Disabled" msgstr "Desabilitado" -#: vpn_invite/forms.py:69 vpn_invite/forms.py:70 vpn_invite/forms.py:71 -#: vpn_invite/forms.py:72 vpn_invite/forms.py:73 +#: vpn_invite/forms.py:68 vpn_invite/forms.py:69 vpn_invite/forms.py:70 +#: vpn_invite/forms.py:71 vpn_invite/forms.py:72 msgid "URL" msgstr "URL" -#: vpn_invite/forms.py:74 vpn_invite/forms.py:75 vpn_invite/forms.py:76 -#: vpn_invite/forms.py:77 vpn_invite/forms.py:78 +#: vpn_invite/forms.py:73 vpn_invite/forms.py:74 vpn_invite/forms.py:75 +#: vpn_invite/forms.py:76 vpn_invite/forms.py:77 msgid "Text" msgstr "Texto" -#: vpn_invite/forms.py:84 +#: vpn_invite/forms.py:83 msgid "Web Page Instructions" msgstr "Página Web de Instruções" -#: vpn_invite/forms.py:85 +#: vpn_invite/forms.py:84 msgid "Email Subject" msgstr "Assunto do Email" -#: vpn_invite/forms.py:86 +#: vpn_invite/forms.py:85 msgid "Email Message" msgstr "Mensagem do Email" -#: vpn_invite/forms.py:87 +#: vpn_invite/forms.py:86 msgid "Email Enabled" msgstr "Email Habilitado" -#: vpn_invite/forms.py:88 +#: vpn_invite/forms.py:87 msgid "WhatsApp Message" msgstr "Mensagem do WhatsApp" -#: vpn_invite/forms.py:89 +#: vpn_invite/forms.py:88 msgid "WhatsApp Enabled" msgstr "WhatsApp Habilitado" -#: vpn_invite/forms.py:90 +#: vpn_invite/forms.py:89 msgid "Text Message" msgstr "Mensagem de Texto" -#: vpn_invite/forms.py:91 +#: vpn_invite/forms.py:90 msgid "Expiration (minutes)" msgstr "Expira em (minutos)" -#: vpn_invite/forms.py:92 +#: vpn_invite/forms.py:91 msgid "Random Password" msgstr "Senha Aleatória" -#: vpn_invite/forms.py:93 +#: vpn_invite/forms.py:92 msgid "Invite URL" msgstr "Endereço do Convite" -#: vpn_invite/forms.py:94 +#: vpn_invite/forms.py:93 msgid "Required User Level" msgstr "Nível de Acesso Requerido" -#: vpn_invite/forms.py:95 +#: vpn_invite/forms.py:94 msgid "Default Password" msgstr "Senha Padrão" -#: vpn_invite/forms.py:96 +#: vpn_invite/forms.py:95 msgid "Random Password Length" msgstr "Tamanho da Senha Aleatória" -#: vpn_invite/forms.py:97 +#: vpn_invite/forms.py:96 msgid "Random Password Complexity" msgstr "Complexidade da Senha Aleatória" -#: vpn_invite/forms.py:104 +#: vpn_invite/forms.py:103 msgid "General Settings" msgstr "Configuração Geral" -#: vpn_invite/forms.py:126 +#: vpn_invite/forms.py:125 msgid "Download Buttons" msgstr "Botões de Download" -#: vpn_invite/forms.py:159 +#: vpn_invite/forms.py:158 msgid "Message templates" msgstr "Modelos de Mensagem" -#: vpn_invite/forms.py:166 +#: vpn_invite/forms.py:165 msgid "Email Message Template" msgstr "Modelo de Mensagem de Email" -#: vpn_invite/forms.py:177 +#: vpn_invite/forms.py:176 msgid "WhatsApp Message Template" msgstr "Modelo de Mensagem do WhatsApp" -#: vpn_invite/forms.py:184 +#: vpn_invite/forms.py:183 msgid "Text Message Template" msgstr "Modelo de Mensagem de Texto" -#: vpn_invite/forms.py:206 +#: vpn_invite/forms.py:205 msgid "Invite URL must start with 'https://'." msgstr "Endereço do convite deve começar com 'https://'." -#: vpn_invite/forms.py:208 +#: vpn_invite/forms.py:207 msgid "Invite URL must end with '/invite/'." msgstr "Endereço do convite deve terminar com '/invite/'." -#: vpn_invite/forms.py:214 +#: vpn_invite/forms.py:213 msgid "Expiration (minutes) must be between 1 and 1440." msgstr "Tempo de expiração (minutos) deve estar entre 1 e 1440." -#: vpn_invite/forms.py:223 +#: vpn_invite/forms.py:222 msgid "Default password must not be provided when random password is enabled." msgstr "" "Senha padrão não deve ser fornecida quando a senha aleatória está habilitada." -#: vpn_invite/forms.py:225 +#: vpn_invite/forms.py:224 msgid "Random password length must be at least 6 characters." msgstr "Senha aleatória deve ter pelo menos 6 caracteres." -#: vpn_invite/forms.py:230 +#: vpn_invite/forms.py:229 msgid "Default password must be provided when random password is disabled." msgstr "" "Senha padrão deve ser fornecida quando a senha aleatória está desabilitada." -#: vpn_invite/forms.py:232 +#: vpn_invite/forms.py:231 msgid "Default password must be at least 6 characters long." msgstr "Senha padrão deve ter pelo menos 6 caracteres." -#: vpn_invite/forms.py:242 +#: vpn_invite/forms.py:241 msgid "Text field must not be empty when download button is enabled." msgstr "" "Campo de texto não deve estar vazio quando o botão de download está " "habilitado." -#: vpn_invite/forms.py:244 +#: vpn_invite/forms.py:243 msgid "URL field must not be empty when download button is enabled." msgstr "" "Campo de URL não deve estar vazio quando o botão de download está habilitado." -#: vpn_invite/forms.py:253 +#: vpn_invite/forms.py:252 msgid "" "Default password must not be contained in any message template. Found at: " msgstr "" "Senha padrão não deve estar contida em nenhum modelo de mensagem. Encontrado " "em: " -#: vpn_invite/forms.py:260 +#: vpn_invite/forms.py:259 #, python-brace-format msgid "The template must include the placeholder '{invite_url}'." msgstr "O modelo deve incluir o espaço reservado '{invite_url}'." -#: vpn_invite/forms.py:284 +#: vpn_invite/forms.py:283 msgid "Host" msgstr "Endereço" -#: vpn_invite/forms.py:286 +#: vpn_invite/forms.py:285 msgid "Encryption" msgstr "Criptografia" -#: vpn_invite/forms.py:287 +#: vpn_invite/forms.py:286 msgid "From Address" msgstr "Endereço de Origem" -#: vpn_invite/forms.py:338 +#: vpn_invite/forms.py:337 msgid "SMTP port must be between 1 and 65535." msgstr "Porta SMTP deve ser entre 1 e 65535." @@ -1219,19 +1405,17 @@ msgstr "" msgid "WireGuard VPN Invite" msgstr "Convite para VPN WireGuard" -#: vpn_invite/views.py:52 +#: vpn_invite/views.py:53 msgid "Invite Settings|Settings saved successfully." msgstr "Configurações de Convite|Configurações salvas com sucesso." -#: vpn_invite/views.py:56 +#: vpn_invite/views.py:57 msgid "VPN Invite Settings" msgstr "Configurações de Convite para VPN" -#: vpn_invite/views.py:72 -#, fuzzy -#| msgid "Invite Settings|Settings saved successfully." +#: vpn_invite/views.py:73 msgid "Email Settings|Settings saved successfully." -msgstr "Configurações de Convite|Configurações salvas com sucesso." +msgstr "Configurações de Email|Configurações salvas com sucesso." #: wireguard/forms.py:11 msgid "Display Name" diff --git a/templates/firewall/firewall_nav_tabs.html b/templates/firewall/firewall_nav_tabs.html index 83d2858..53001f1 100644 --- a/templates/firewall/firewall_nav_tabs.html +++ b/templates/firewall/firewall_nav_tabs.html @@ -1,3 +1,4 @@ +{% load i18n %}