Fix locales

This commit is contained in:
Jamie Curnow 2023-01-16 15:23:09 +10:00
parent e890bfcf10
commit 4ff911def0
5 changed files with 230 additions and 192 deletions

View File

@ -13,10 +13,11 @@ const allLocales = [
];
const ignoreUnused = [
/^capability\..*$/,
/^host-type\..*$/,
/^acmesh\..*$/,
/^acmesh-property\..*$/,
/^capability\..*$/,
/^status\..*$/,
/^type\..*$/,
];
const { spawnSync } = require("child_process");

View File

@ -103,7 +103,7 @@ function CertificateStatusFormatter() {
<Popover>
<PopoverTrigger>
<Badge color={color} style={{ cursor: "pointer" }}>
{intl.formatMessage({ id: value })}
{intl.formatMessage({ id: `type.${value}` })}
</Badge>
</PopoverTrigger>
<PopoverContent>
@ -117,7 +117,11 @@ function CertificateStatusFormatter() {
</Popover>
);
}
return <Badge color={color}>{intl.formatMessage({ id: value })}</Badge>;
return (
<Badge color={color}>
{intl.formatMessage({ id: `status.${value}` })}
</Badge>
);
};
return formatCell;
@ -129,7 +133,9 @@ function CertificateTypeFormatter() {
if (value === "dns") {
color = "green.400";
}
return <Badge color={color}>{intl.formatMessage({ id: value })}</Badge>;
return (
<Badge color={color}>{intl.formatMessage({ id: `type.${value}` })}</Badge>
);
};
return formatCell;
@ -251,12 +257,16 @@ function UpstreamStatusFormatter() {
const formatCell = ({ value, row }: any) => {
if (value === "ready") {
return (
<Badge color="cyan.500">{intl.formatMessage({ id: "ready" })}</Badge>
<Badge color="cyan.500">
{intl.formatMessage({ id: "status.ready" })}
</Badge>
);
}
if (value === "ok") {
return (
<Badge color="green.500">{intl.formatMessage({ id: "ok" })}</Badge>
<Badge color="green.500">
{intl.formatMessage({ id: "status.ok" })}
</Badge>
);
}
if (value === "error") {

View File

@ -1,10 +1,16 @@
{
"access-list.create": {
"defaultMessage": "Create Access List"
},
"access-lists.title": {
"defaultMessage": "Zugriffslisten"
},
"action.edit": {
"defaultMessage": "Bearbeiten"
},
"action.nginx-config": {
"defaultMessage": "View Nginx Config"
},
"action.set-password": {
"defaultMessage": "Passwort festlegen"
},
@ -53,6 +59,9 @@
"certificate-authority.name": {
"defaultMessage": "Name"
},
"certificate.create": {
"defaultMessage": "Zertifikat erstellen"
},
"certificates.title": {
"defaultMessage": "Zertifikate"
},
@ -98,9 +107,6 @@
"create-access-list-title": {
"defaultMessage": "Create Access List"
},
"create-certificate": {
"defaultMessage": "Zertifikat erstellen"
},
"create-certificate-title": {
"defaultMessage": "Es gibt keine Zertifikate"
},
@ -116,14 +122,11 @@
"create-host": {
"defaultMessage": "Host erstellen"
},
"create-nginx-template": {
"defaultMessage": "Nginxvorlage erstellen"
},
"create-host-title": {
"defaultMessage": "Es gibt keine Proxy-Hosts"
},
"create-upstream": {
"defaultMessage": "Create Upstream"
"create-nginx-template": {
"defaultMessage": "Nginxvorlage erstellen"
},
"create-upstream-title": {
"defaultMessage": "There are no Upstreams"
@ -239,9 +242,6 @@
"general-settings.title": {
"defaultMessage": "Allgemeine Einstellungen"
},
"nginx-templates.title": {
"defaultMessage": "nginx-Vorlagen"
},
"hosts.title": {
"defaultMessage": "Gastgeber"
},
@ -266,12 +266,15 @@
"navigation.open": {
"defaultMessage": "Navigation öffnen"
},
"nginx-config": {
"defaultMessage": "Nginx Config"
},
"nginx-templates.title": {
"defaultMessage": "nginx-Vorlagen"
},
"no-access": {
"defaultMessage": "Kein Zugang"
},
"ok": {
"defaultMessage": "OK"
},
"password.confirm": {
"defaultMessage": "Bestätige neues Passwort"
},
@ -290,9 +293,6 @@
"profile.title": {
"defaultMessage": "Profileinstellungen"
},
"ready": {
"defaultMessage": "Bereit"
},
"restricted-access": {
"defaultMessage": "Eingeschränkter Zugang"
},
@ -317,6 +317,15 @@
"ssl.title": {
"defaultMessage": "SSL"
},
"status.failed": {
"defaultMessage": "Failed"
},
"status.ok": {
"defaultMessage": "OK"
},
"status.ready": {
"defaultMessage": "Bereit"
},
"tables.clear-all-filters": {
"defaultMessage": "{count, plural, one {Filter löschen} other {Löschen Sie # Filter}}"
},
@ -350,6 +359,9 @@
"unhealthy.title": {
"defaultMessage": "Nginx Proxy Manager ist fehlerhaft"
},
"upstream.create": {
"defaultMessage": "Create Upstream"
},
"upstreams.title": {
"defaultMessage": "Upstreams"
},

View File

@ -5,6 +5,108 @@
"access-lists.title": {
"defaultMessage": "Access Lists"
},
"acmesh-property.access-key-id": {
"defaultMessage": "Access Key ID"
},
"acmesh-property.account-id": {
"defaultMessage": "Account ID"
},
"acmesh-property.api-key": {
"defaultMessage": "API Key"
},
"acmesh-property.api-url": {
"defaultMessage": "API URL"
},
"acmesh-property.app-id": {
"defaultMessage": "APP ID"
},
"acmesh-property.auth-id": {
"defaultMessage": "Auth ID"
},
"acmesh-property.base-url": {
"defaultMessage": "Base URL"
},
"acmesh-property.client-id": {
"defaultMessage": "Client ID"
},
"acmesh-property.client-secret": {
"defaultMessage": "Client Secret"
},
"acmesh-property.context": {
"defaultMessage": "Context"
},
"acmesh-property.credentials": {
"defaultMessage": "Credentials"
},
"acmesh-property.customer": {
"defaultMessage": "Customer"
},
"acmesh-property.email": {
"defaultMessage": "Email"
},
"acmesh-property.id": {
"defaultMessage": "ID"
},
"acmesh-property.insecure": {
"defaultMessage": "Insecure"
},
"acmesh-property.key": {
"defaultMessage": "Key"
},
"acmesh-property.oauth-token": {
"defaultMessage": "OAuth Token"
},
"acmesh-property.otp-secret": {
"defaultMessage": "OTP Secret"
},
"acmesh-property.password": {
"defaultMessage": "Password"
},
"acmesh-property.secret": {
"defaultMessage": "Secret"
},
"acmesh-property.secret-access-key": {
"defaultMessage": "Secret Access Key"
},
"acmesh-property.server": {
"defaultMessage": "Server"
},
"acmesh-property.server-id": {
"defaultMessage": "Server ID"
},
"acmesh-property.slow-rate": {
"defaultMessage": "Slow Rate"
},
"acmesh-property.sub-auth-id": {
"defaultMessage": "Sub-Auth ID"
},
"acmesh-property.subdomain": {
"defaultMessage": "Subdomain"
},
"acmesh-property.subscription-id": {
"defaultMessage": "Subscription ID"
},
"acmesh-property.tenant-id": {
"defaultMessage": "Tenant ID"
},
"acmesh-property.token": {
"defaultMessage": "Token"
},
"acmesh-property.ttl": {
"defaultMessage": "TTL"
},
"acmesh-property.url": {
"defaultMessage": "URL"
},
"acmesh-property.user": {
"defaultMessage": "User"
},
"acmesh-property.username": {
"defaultMessage": "Username"
},
"acmesh-property.zone-id": {
"defaultMessage": "Zone ID"
},
"acmesh.dns_acmedns": {
"defaultMessage": "ACME DNS"
},
@ -14,12 +116,12 @@
"acmesh.dns_ali": {
"defaultMessage": "Aliyun"
},
"acmesh.dns_aws": {
"defaultMessage": "AWS Route53"
},
"acmesh.dns_autodns": {
"defaultMessage": "autoDNS (InternetX)"
},
"acmesh.dns_aws": {
"defaultMessage": "AWS Route53"
},
"acmesh.dns_azure": {
"defaultMessage": "Azure"
},
@ -140,108 +242,6 @@
"acmesh.dns_zonomi": {
"defaultMessage": "Zonomi"
},
"acmesh-property.access-key-id": {
"defaultMessage": "Access Key ID"
},
"acmesh-property.account-id": {
"defaultMessage": "Account ID"
},
"acmesh-property.api-key": {
"defaultMessage": "API Key"
},
"acmesh-property.api-url": {
"defaultMessage": "API URL"
},
"acmesh-property.app-id": {
"defaultMessage": "APP ID"
},
"acmesh-property.auth-id": {
"defaultMessage": "Auth ID"
},
"acmesh-property.base-url": {
"defaultMessage": "Base URL"
},
"acmesh-property.client-id": {
"defaultMessage": "Client ID"
},
"acmesh-property.client-secret": {
"defaultMessage": "Client Secret"
},
"acmesh-property.credentials": {
"defaultMessage": "Credentials"
},
"acmesh-property.context": {
"defaultMessage": "Context"
},
"acmesh-property.customer": {
"defaultMessage": "Customer"
},
"acmesh-property.email": {
"defaultMessage": "Email"
},
"acmesh-property.id": {
"defaultMessage": "ID"
},
"acmesh-property.insecure": {
"defaultMessage": "Insecure"
},
"acmesh-property.key": {
"defaultMessage": "Key"
},
"acmesh-property.oauth-token": {
"defaultMessage": "OAuth Token"
},
"acmesh-property.otp-secret": {
"defaultMessage": "OTP Secret"
},
"acmesh-property.password": {
"defaultMessage": "Password"
},
"acmesh-property.secret": {
"defaultMessage": "Secret"
},
"acmesh-property.secret-access-key": {
"defaultMessage": "Secret Access Key"
},
"acmesh-property.server": {
"defaultMessage": "Server"
},
"acmesh-property.server-id": {
"defaultMessage": "Server ID"
},
"acmesh-property.slow-rate": {
"defaultMessage": "Slow Rate"
},
"acmesh-property.subdomain": {
"defaultMessage": "Subdomain"
},
"acmesh-property.subscription-id": {
"defaultMessage": "Subscription ID"
},
"acmesh-property.sub-auth-id": {
"defaultMessage": "Sub-Auth ID"
},
"acmesh-property.tenant-id": {
"defaultMessage": "Tenant ID"
},
"acmesh-property.token": {
"defaultMessage": "Token"
},
"acmesh-property.ttl": {
"defaultMessage": "TTL"
},
"acmesh-property.user": {
"defaultMessage": "User"
},
"acmesh-property.username": {
"defaultMessage": "Username"
},
"acmesh-property.url": {
"defaultMessage": "URL"
},
"acmesh-property.zone-id": {
"defaultMessage": "Zone ID"
},
"action.edit": {
"defaultMessage": "Edit"
},
@ -290,18 +290,18 @@
"capability.full-admin": {
"defaultMessage": "Full Admin"
},
"capability.nginx-templates.manage": {
"defaultMessage": "Manage Nginx Templates"
},
"capability.nginx-templates.view": {
"defaultMessage": "View Nginx Templates"
},
"capability.hosts.manage": {
"defaultMessage": "Manage Hosts"
},
"capability.hosts.view": {
"defaultMessage": "View Hosts"
},
"capability.nginx-templates.manage": {
"defaultMessage": "Manage Nginx Templates"
},
"capability.nginx-templates.view": {
"defaultMessage": "View Nginx Templates"
},
"capability.settings.manage": {
"defaultMessage": "Manage Settings"
},
@ -311,9 +311,6 @@
"capability.users.manage": {
"defaultMessage": "Manage Users"
},
"certificate.create": {
"defaultMessage": "Create Certificate"
},
"certificate-authorities.title": {
"defaultMessage": "Certificate Authorities"
},
@ -338,6 +335,9 @@
"certificate-authority.name": {
"defaultMessage": "Name"
},
"certificate.create": {
"defaultMessage": "Create Certificate"
},
"certificates.title": {
"defaultMessage": "Certificates"
},
@ -398,12 +398,12 @@
"create-host": {
"defaultMessage": "Create Host"
},
"create-host-title": {
"defaultMessage": "There are no Hosts"
},
"create-nginx-template": {
"defaultMessage": "Create Nginx Template"
},
"create-host-title": {
"defaultMessage": "There are no Proxy Hosts"
},
"create-upstream-title": {
"defaultMessage": "There are no Upstreams"
},
@ -413,9 +413,6 @@
"disabled": {
"defaultMessage": "Disabled"
},
"dns": {
"defaultMessage": "DNS"
},
"dns-provider.acmesh-name": {
"defaultMessage": "Acme.sh Provider"
},
@ -455,9 +452,6 @@
"error.user-disabled": {
"defaultMessage": "Account is disabled"
},
"failed": {
"defaultMessage": "Failed"
},
"filter.apply": {
"defaultMessage": "Apply"
},
@ -524,33 +518,9 @@
"general-settings.title": {
"defaultMessage": "General Settings"
},
"nginx-config": {
"defaultMessage": "Nginx Config"
},
"nginx-templates.title": {
"defaultMessage": "Nginx Templates"
},
"host-type.dead": {
"defaultMessage": "404 Host"
},
"host-type.proxy": {
"defaultMessage": "Proxy Host"
},
"host-type.redirect": {
"defaultMessage": "Redirection"
},
"host-type.stream": {
"defaultMessage": "Stream"
},
"host-type.upstream": {
"defaultMessage": "Upstream"
},
"hosts.title": {
"defaultMessage": "Hosts"
},
"http": {
"defaultMessage": "HTTP"
},
"http-https": {
"defaultMessage": "HTTP/HTTPS"
},
@ -572,12 +542,15 @@
"navigation.open": {
"defaultMessage": "Open navigation"
},
"nginx-config": {
"defaultMessage": "Nginx Config"
},
"nginx-templates.title": {
"defaultMessage": "Nginx Templates"
},
"no-access": {
"defaultMessage": "No Access"
},
"ok": {
"defaultMessage": "OK"
},
"password.confirm": {
"defaultMessage": "Confirm New Password"
},
@ -596,12 +569,6 @@
"profile.title": {
"defaultMessage": "Profile"
},
"ready": {
"defaultMessage": "Ready"
},
"requesting": {
"defaultMessage": "Requesting"
},
"restricted-access": {
"defaultMessage": "Restricted Access"
},
@ -626,6 +593,18 @@
"ssl.title": {
"defaultMessage": "SSL"
},
"status.failed": {
"defaultMessage": "Failed"
},
"status.ok": {
"defaultMessage": "OK"
},
"status.ready": {
"defaultMessage": "Ready"
},
"status.requesting": {
"defaultMessage": "Requesting"
},
"tables.clear-all-filters": {
"defaultMessage": "Clear {count, plural, one {filter} other {# filters}}"
},
@ -653,6 +632,27 @@
"theme.to-light": {
"defaultMessage": "Switch to light theme"
},
"type.dead": {
"defaultMessage": "404 Host"
},
"type.dns": {
"defaultMessage": "DNS"
},
"type.http": {
"defaultMessage": "HTTP"
},
"type.proxy": {
"defaultMessage": "Proxy Host"
},
"type.redirect": {
"defaultMessage": "Redirection"
},
"type.stream": {
"defaultMessage": "Stream"
},
"type.upstream": {
"defaultMessage": "Upstream"
},
"unhealthy.body": {
"defaultMessage": "We'll continue to check the health and hope to be back up and running soon!"
},

View File

@ -1,10 +1,16 @@
{
"access-list.create": {
"defaultMessage": "Create Access List"
},
"access-lists.title": {
"defaultMessage": "دسترسی به لیست ها"
},
"action.edit": {
"defaultMessage": "ویرایش کنید"
},
"action.nginx-config": {
"defaultMessage": "View Nginx Config"
},
"action.set-password": {
"defaultMessage": "قراردادن رمز عبور"
},
@ -53,6 +59,9 @@
"certificate-authority.name": {
"defaultMessage": "نام"
},
"certificate.create": {
"defaultMessage": "ایجاد گواهی"
},
"certificates.title": {
"defaultMessage": "گواهینامه ها"
},
@ -98,9 +107,6 @@
"create-access-list-title": {
"defaultMessage": "Create Access List"
},
"create-certificate": {
"defaultMessage": "ایجاد گواهی"
},
"create-certificate-title": {
"defaultMessage": "هیچ گواهی وجود ندارد"
},
@ -122,9 +128,6 @@
"create-host-title": {
"defaultMessage": "هیچ هاست پروکسی وجود ندارد"
},
"create-upstream": {
"defaultMessage": "Create Upstream"
},
"create-upstream-title": {
"defaultMessage": "There are no Upstreams"
},
@ -266,12 +269,12 @@
"navigation.open": {
"defaultMessage": "ناوبری را باز کنید"
},
"nginx-config": {
"defaultMessage": "Nginx Config"
},
"no-access": {
"defaultMessage": "هیچ دسترسی"
},
"ok": {
"defaultMessage": "OK"
},
"password.confirm": {
"defaultMessage": "رمز عبور جدید را تأیید کنید"
},
@ -290,9 +293,6 @@
"profile.title": {
"defaultMessage": "تنظیمات نمایه"
},
"ready": {
"defaultMessage": "آماده"
},
"restricted-access": {
"defaultMessage": "دسترسی محدود"
},
@ -317,6 +317,18 @@
"ssl.title": {
"defaultMessage": "SSL"
},
"status.failed": {
"defaultMessage": "Failed"
},
"status.ok": {
"defaultMessage": "OK"
},
"status.ready": {
"defaultMessage": "آماده"
},
"status.requesting": {
"defaultMessage": "Requesting"
},
"tables.clear-all-filters": {
"defaultMessage": "{count, plural, one {فیلتر را پاک کنید} other {# فیلتر را پاک کنید}}"
},
@ -350,6 +362,9 @@
"unhealthy.title": {
"defaultMessage": "Nginx Proxy Manager ناسالم است"
},
"upstream.create": {
"defaultMessage": "Create Upstream"
},
"upstreams.title": {
"defaultMessage": "Upstreams"
},