Skip to content
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
10 changes: 5 additions & 5 deletions frontend/src/components/Form/AccessClientFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import cn from "classnames";
import { useFormikContext } from "formik";
import { useState } from "react";
import type { AccessListClient } from "src/api/backend";
import { T } from "src/locale";
import { intl, T } from "src/locale";

interface Props {
initialValues: AccessListClient[];
Expand Down Expand Up @@ -65,8 +65,8 @@ export function AccessClientFields({ initialValues, name = "clients" }: Props) {
value={client.directive}
onChange={(e) => handleChange(idx, "directive", e.target.value)}
>
<option value="allow">Allow</option>
<option value="deny">Deny</option>
<option value="allow"><T id="action.allow" /></option>
<option value="deny"><T id="action.deny" /></option>
</select>
</span>
<input
Expand All @@ -76,7 +76,7 @@ export function AccessClientFields({ initialValues, name = "clients" }: Props) {
autoComplete="off"
value={client.address}
onChange={(e) => handleChange(idx, "address", e.target.value)}
placeholder="192.168.1.100 or 192.168.1.0/24 or 2001:0db8::/32"
placeholder={intl.formatMessage({ id: "access-list.rule-source.placeholder" })}
/>
</div>
</div>
Expand Down Expand Up @@ -112,7 +112,7 @@ export function AccessClientFields({ initialValues, name = "clients" }: Props) {
value="deny"
disabled
>
<option value="deny">Deny</option>
<option value="deny"><T id="action.deny" /></option>
</select>
</span>
<input
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Form/DNSProviderFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useState } from "react";
import Select, { type ActionMeta } from "react-select";
import type { DNSProvider } from "src/api/backend";
import { useDnsProviders } from "src/hooks";
import { T } from "src/locale";
import { intl, T } from "src/locale";
import styles from "./DNSProviderFields.module.css";

interface DNSProviderOption {
Expand Down Expand Up @@ -57,7 +57,7 @@ export function DNSProviderFields({ showBoundaryBox = false }: Props) {
id="dnsProvider"
closeMenuOnSelect={true}
isClearable={false}
placeholder="Select a Provider..."
placeholder={intl.formatMessage({ id: "certificates.dns.provider.placeholder" })}
isLoading={isLoading}
isSearchable
onChange={handleChange}
Expand Down
36 changes: 36 additions & 0 deletions frontend/src/locale/src/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"aaccess-list.rule-source.placeholder": {
"defaultMessage": "192.168.1.100 or 192.168.1.0/24 or 2001:0db8::/32"
},
"access-list": {
"defaultMessage": "Access List"
},
Expand Down Expand Up @@ -38,12 +41,18 @@
"action.add-location": {
"defaultMessage": "Add Location"
},
"action.allow": {
"defaultMessage": "Allow"
},
"action.close": {
"defaultMessage": "Close"
},
"action.delete": {
"defaultMessage": "Delete"
},
"action.deny": {
"defaultMessage": "Deny"
},
"action.disable": {
"defaultMessage": "Disable"
},
Expand All @@ -68,6 +77,9 @@
"auditlogs": {
"defaultMessage": "Audit Logs"
},
"auto": {
"defaultMessage": "Auto"
},
"cancel": {
"defaultMessage": "Cancel"
},
Expand Down Expand Up @@ -128,6 +140,9 @@
"certificates.dns.provider": {
"defaultMessage": "DNS Provider"
},
"certificates.dns.provider.placeholder": {
"defaultMessage": "Select a Provider..."
},
"certificates.dns.warning": {
"defaultMessage": "This section requires some knowledge about Certbot and its DNS plugins. Please consult the respective plugins documentation."
},
Expand Down Expand Up @@ -518,6 +533,24 @@
"redirection-hosts.count": {
"defaultMessage": "{count} {count, plural, one {Redirection Host} other {Redirection Hosts}}"
},
"redirection-hosts.http-code.300": {
"defaultMessage": "300 Multiple Choices"
},
"redirection-hosts.http-code.301": {
"defaultMessage": "301 Moved permanently"
},
"redirection-hosts.http-code.302": {
"defaultMessage": "302 Moved temporarily"
},
"redirection-hosts.http-code.303": {
"defaultMessage": "303 See other"
},
"redirection-hosts.http-code.307": {
"defaultMessage": "307 Temporary redirect"
},
"redirection-hosts.http-code.308": {
"defaultMessage": "308 Permanent redirect"
},
"role.admin": {
"defaultMessage": "Administrator"
},
Expand Down Expand Up @@ -575,6 +608,9 @@
"stream.forward-host": {
"defaultMessage": "Forward Host"
},
"stream.forward-host.placeholder": {
"defaultMessage": "example.com or 10.0.0.1 or 2001:db8:3333:4444:5555:6666:7777:8888"
},
"stream.incoming-port": {
"defaultMessage": "Incoming Port"
},
Expand Down
38 changes: 37 additions & 1 deletion frontend/src/locale/src/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"access-list.public.subtitle": {
"defaultMessage": "No se requiere autenticación básica"
},
"access-list.rule-source.placeholder": {
"defaultMessage": "192.168.1.100 o 192.168.1.0/24 o 2001:0db8::/32"
},
"access-list.satisfy-any": {
"defaultMessage": "Satisfacer Cualquiera"
},
Expand All @@ -38,12 +41,18 @@
"action.add-location": {
"defaultMessage": "Añadir Ubicación"
},
"action.allow": {
"defaultMessage": "Permitir"
},
"action.close": {
"defaultMessage": "Cerrar"
},
"action.delete": {
"defaultMessage": "Eliminar"
},
"action.deny": {
"defaultMessage": "Denegar"
},
"action.disable": {
"defaultMessage": "Deshabilitar"
},
Expand All @@ -68,6 +77,9 @@
"auditlogs": {
"defaultMessage": "Registros de Auditoría"
},
"auto": {
"defaultMessage": "Auto"
},
"cancel": {
"defaultMessage": "Cancelar"
},
Expand Down Expand Up @@ -128,6 +140,9 @@
"certificates.dns.provider": {
"defaultMessage": "Proveedor DNS"
},
"certificates.dns.provider.placeholder": {
"defaultMessage": "Selecciona un Proveedor..."
},
"certificates.dns.warning": {
"defaultMessage": "Esta sección requiere algunos conocimientos sobre Certbot y sus plugins DNS. Consulta la documentación de los plugins respectivos."
},
Expand Down Expand Up @@ -348,7 +363,7 @@
"defaultMessage": "Soporte de Websockets"
},
"host.forward-port": {
"defaultMessage": "Puerto de Reenvío"
"defaultMessage": "Puerto"
},
"host.forward-scheme": {
"defaultMessage": "Esquema"
Expand Down Expand Up @@ -518,6 +533,24 @@
"redirection-hosts.count": {
"defaultMessage": "{count} {count, plural, one {Host de Redirección} other {Hosts de Redirección}}"
},
"redirection-hosts.http-code.300": {
"defaultMessage": "300 Multiples Opciones"
},
"redirection-hosts.http-code.301": {
"defaultMessage": "301 Movido permanentemente"
},
"redirection-hosts.http-code.302": {
"defaultMessage": "302 Movido temporalmente"
},
"redirection-hosts.http-code.303": {
"defaultMessage": "303 Ver otro"
},
"redirection-hosts.http-code.307": {
"defaultMessage": "307 Redirección temporal"
},
"redirection-hosts.http-code.308": {
"defaultMessage": "308 Redirección permanente"
},
"role.admin": {
"defaultMessage": "Administrador"
},
Expand Down Expand Up @@ -575,6 +608,9 @@
"stream.forward-host": {
"defaultMessage": "Host de Reenvío"
},
"stream.forward-host.placeholder": {
"defaultMessage": "example.com o 10.0.0.1 o 2001:db8:3333:4444:5555:6666:7777:8888"
},
"stream.incoming-port": {
"defaultMessage": "Puerto de Entrada"
},
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/modals/RedirectionHostModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const RedirectionHostModal = EasyModal.create(({ id, visible, remove }: Props) =
required
{...field}
>
<option value="auto">Auto</option>
<option value="auto"><T id="auto" /></option>
<option value="http">http</option>
<option value="https">https</option>
</select>
Expand Down Expand Up @@ -224,12 +224,12 @@ const RedirectionHostModal = EasyModal.create(({ id, visible, remove }: Props) =
required
{...field}
>
<option value="300">300 Multiple choices</option>
<option value="301">301 Moved permanently</option>
<option value="302">302 Moved temporarily</option>
<option value="303">303 See other</option>
<option value="307">307 Temporary redirect</option>
<option value="308">308 Permanent redirect</option>
<option value="300"><T id="redirection-hosts.http-code.300" /></option>
<option value="301"><T id="redirection-hosts.http-code.301" /></option>
<option value="302"><T id="redirection-hosts.http-code.302" /></option>
<option value="303"><T id="redirection-hosts.http-code.303" /></option>
<option value="307"><T id="redirection-hosts.http-code.307" /></option>
<option value="308"><T id="redirection-hosts.http-code.308" /></option>
</select>
{form.errors.forwardHttpCode ? (
<div className="invalid-feedback">
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/modals/StreamModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Alert } from "react-bootstrap";
import Modal from "react-bootstrap/Modal";
import { Button, Loading, SSLCertificateField, SSLOptionsFields } from "src/components";
import { useSetStream, useStream } from "src/hooks";
import { T } from "src/locale";
import { intl, T } from "src/locale";
import { validateNumber, validateString } from "src/modules/Validations";
import { showObjectSuccess } from "src/notifications";

Expand Down Expand Up @@ -154,7 +154,7 @@ const StreamModal = EasyModal.create(({ id, visible, remove }: Props) => {
type="text"
className={`form-control ${form.errors.forwardingHost && form.touched.forwardingHost ? "is-invalid" : ""}`}
required
placeholder="example.com or 10.0.0.1 or 2001:db8:3333:4444:5555:6666:7777:8888"
placeholder={intl.formatMessage({ id: "stream.forward-host.placeholder" })}
{...field}
/>
{form.errors.forwardingHost ? (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default function Login() {
required
maxLength={255}
className={`form-control ${form.errors.password && form.touched.password ? " is-invalid" : ""}`}
placeholder="Password"
placeholder={intl.formatMessage({ id: "password" })}
/>
<div className="invalid-feedback">{form.errors.password}</div>
</label>
Expand Down