mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-31 16:14:46 +02:00
complete sites i18n
This commit is contained in:
parent
fa1997adc1
commit
a058f4acf3
3 changed files with 58 additions and 51 deletions
|
@ -2,7 +2,6 @@
|
||||||
"setupCreate": "Create your organization, site, and resources",
|
"setupCreate": "Create your organization, site, and resources",
|
||||||
"setupNewOrg": "New Organization",
|
"setupNewOrg": "New Organization",
|
||||||
"setupCreateOrg": "Create Organization",
|
"setupCreateOrg": "Create Organization",
|
||||||
"setupCreateSite": "Create Site",
|
|
||||||
"setupCreateResources": "Create Resources",
|
"setupCreateResources": "Create Resources",
|
||||||
"setupOrgName": "Organization Name",
|
"setupOrgName": "Organization Name",
|
||||||
"orgDisplayName": "This is the display name of your organization.",
|
"orgDisplayName": "This is the display name of your organization.",
|
||||||
|
@ -41,6 +40,7 @@
|
||||||
"dataIn": "Data In",
|
"dataIn": "Data In",
|
||||||
"dataOut": "Data Out",
|
"dataOut": "Data Out",
|
||||||
"connectionType": "Connection Type",
|
"connectionType": "Connection Type",
|
||||||
|
"tunnelType": "Tunnel Type",
|
||||||
"local": "Local",
|
"local": "Local",
|
||||||
"edit": "Edit",
|
"edit": "Edit",
|
||||||
"siteConfirmDelete": "Confirm Delete Site",
|
"siteConfirmDelete": "Confirm Delete Site",
|
||||||
|
@ -51,6 +51,7 @@
|
||||||
"siteManageSites": "Manage Sites",
|
"siteManageSites": "Manage Sites",
|
||||||
"siteDescription": "Allow connectivity to your network through secure tunnels",
|
"siteDescription": "Allow connectivity to your network through secure tunnels",
|
||||||
"siteCreate": "Create Site",
|
"siteCreate": "Create Site",
|
||||||
|
"siteCreateDescription2": "Follow the steps below to create and connect a new site",
|
||||||
"siteCreateDescription": "Create a new site to start connecting your resources",
|
"siteCreateDescription": "Create a new site to start connecting your resources",
|
||||||
"close": "Close",
|
"close": "Close",
|
||||||
"siteNameMin": "Name must be at least 2 characters.",
|
"siteNameMin": "Name must be at least 2 characters.",
|
||||||
|
@ -72,6 +73,12 @@
|
||||||
"siteConfirmCopy": "I have copied the config",
|
"siteConfirmCopy": "I have copied the config",
|
||||||
"searchSites": "Search sites...",
|
"searchSites": "Search sites...",
|
||||||
"siteAdd": "Add Site",
|
"siteAdd": "Add Site",
|
||||||
|
"siteInstallNewt": "Install Newt",
|
||||||
|
"siteInstallNewtDescription": "Get Newt running on your system",
|
||||||
|
"WgConfiguration": "WireGuard Configuration",
|
||||||
|
"WgConfigurationDescription": "Use the following configuration to connect to your network",
|
||||||
|
"operatingSystem": "Operating System",
|
||||||
|
"commands": "Commands",
|
||||||
"recommended": "Recommended",
|
"recommended": "Recommended",
|
||||||
"siteNewtDescription": "For the best user experience, use Newt. It uses WireGuard under the hood and allows you to address your private resources by their LAN address on your private network from within the Pangolin dashboard.",
|
"siteNewtDescription": "For the best user experience, use Newt. It uses WireGuard under the hood and allows you to address your private resources by their LAN address on your private network from within the Pangolin dashboard.",
|
||||||
"siteRunsInDocker": "Runs in Docker",
|
"siteRunsInDocker": "Runs in Docker",
|
||||||
|
@ -84,6 +91,17 @@
|
||||||
"siteGeneralDescription": "Configure the general settings for this site",
|
"siteGeneralDescription": "Configure the general settings for this site",
|
||||||
"siteSettingDescription": "Configure the settings on your site",
|
"siteSettingDescription": "Configure the settings on your site",
|
||||||
"siteSetting": "{siteName} Settings",
|
"siteSetting": "{siteName} Settings",
|
||||||
|
"siteNewtTunnel": "Newt Tunnel (Recommended)",
|
||||||
|
"siteNewtTunnelDescription": "Easiest way to create an entrypoint into your network. No extra setup.",
|
||||||
|
"siteWg": "Basic WireGuard",
|
||||||
|
"siteWgDescription": "Use any WireGuard client to establish a tunnel. Manual NAT setup required.",
|
||||||
|
"siteLocalDescription": "Local resources only. No tunneling.",
|
||||||
|
"siteSeeAll": "See All Sites",
|
||||||
|
"siteTunnelDescription": "Determine how you want to connect to your site",
|
||||||
|
"siteNewtCredentials": "Newt Credentials",
|
||||||
|
"siteNewtCredentialsDescription": "This is how Newt will authenticate with the server",
|
||||||
|
"siteCredentialsSave": "Save Your Credentials",
|
||||||
|
"siteCredentialsSaveDescription": "You will only be able to see this once. Make sure to copy it to a secure place.",
|
||||||
"siteInfo": "Site Information",
|
"siteInfo": "Site Information",
|
||||||
"status": "Status",
|
"status": "Status",
|
||||||
"shareTitle": "Manage Share Links",
|
"shareTitle": "Manage Share Links",
|
||||||
|
@ -164,7 +182,7 @@
|
||||||
"protocolSelect": "Select a protocol",
|
"protocolSelect": "Select a protocol",
|
||||||
"resourcePortNumber": "Port Number",
|
"resourcePortNumber": "Port Number",
|
||||||
"resourcePortNumberDescription": "The external port number to proxy requests.",
|
"resourcePortNumberDescription": "The external port number to proxy requests.",
|
||||||
"cancle": "Cancle",
|
"cancel": "Cancel",
|
||||||
"resourceConfig": "Configuration Snippets",
|
"resourceConfig": "Configuration Snippets",
|
||||||
"resourceConfigDescription": "Copy and paste these configuration snippets to set up your TCP/UDP resource",
|
"resourceConfigDescription": "Copy and paste these configuration snippets to set up your TCP/UDP resource",
|
||||||
"resourceAddEntrypoints": "Traefik: Add Entrypoints",
|
"resourceAddEntrypoints": "Traefik: Add Entrypoints",
|
||||||
|
|
|
@ -791,7 +791,7 @@ export default function Page() {
|
||||||
router.push(`/${orgId}/settings/resources`)
|
router.push(`/${orgId}/settings/resources`)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{t('cancle')}
|
{t('cancel')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
@ -64,6 +64,7 @@ import {
|
||||||
} from "@app/components/ui/breadcrumb";
|
} from "@app/components/ui/breadcrumb";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { QRCodeCanvas } from "qrcode.react";
|
import { QRCodeCanvas } from "qrcode.react";
|
||||||
|
import { useTranslations } from 'next-intl';
|
||||||
|
|
||||||
const createSiteFormSchema = z
|
const createSiteFormSchema = z
|
||||||
.object({
|
.object({
|
||||||
|
@ -124,28 +125,27 @@ export default function Page() {
|
||||||
const api = createApiClient({ env });
|
const api = createApiClient({ env });
|
||||||
const { orgId } = useParams();
|
const { orgId } = useParams();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const t = useTranslations();
|
||||||
|
|
||||||
const [tunnelTypes, setTunnelTypes] = useState<
|
const [tunnelTypes, setTunnelTypes] = useState<
|
||||||
ReadonlyArray<TunnelTypeOption>
|
ReadonlyArray<TunnelTypeOption>
|
||||||
>([
|
>([
|
||||||
{
|
{
|
||||||
id: "newt",
|
id: "newt",
|
||||||
title: "Newt Tunnel (Recommended)",
|
title: t('siteNewtTunnel'),
|
||||||
description:
|
description: t('siteNewtTunnelDescription'),
|
||||||
"Easiest way to create an entrypoint into your network. No extra setup.",
|
|
||||||
disabled: true
|
disabled: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "wireguard",
|
id: "wireguard",
|
||||||
title: "Basic WireGuard",
|
title: t('siteWg'),
|
||||||
description:
|
description: t('siteWgDescription'),
|
||||||
"Use any WireGuard client to establish a tunnel. Manual NAT setup required.",
|
|
||||||
disabled: true
|
disabled: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "local",
|
id: "local",
|
||||||
title: "Local",
|
title: t('local'),
|
||||||
description: "Local resources only. No tunneling."
|
description: t('siteLocalDescription')
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -381,8 +381,8 @@ WantedBy=default.target`
|
||||||
if (!siteDefaults || !wgConfig) {
|
if (!siteDefaults || !wgConfig) {
|
||||||
toast({
|
toast({
|
||||||
variant: "destructive",
|
variant: "destructive",
|
||||||
title: "Error creating site",
|
title: t('siteErrorCreate'),
|
||||||
description: "Key pair or site defaults not found"
|
description: t('siteErrorCreateKeyPair')
|
||||||
});
|
});
|
||||||
setCreateLoading(false);
|
setCreateLoading(false);
|
||||||
return;
|
return;
|
||||||
|
@ -399,8 +399,8 @@ WantedBy=default.target`
|
||||||
if (!siteDefaults) {
|
if (!siteDefaults) {
|
||||||
toast({
|
toast({
|
||||||
variant: "destructive",
|
variant: "destructive",
|
||||||
title: "Error creating site",
|
title: t('siteErrorCreate'),
|
||||||
description: "Site defaults not found"
|
description: t('siteErrorCreateDefaults')
|
||||||
});
|
});
|
||||||
setCreateLoading(false);
|
setCreateLoading(false);
|
||||||
return;
|
return;
|
||||||
|
@ -422,7 +422,7 @@ WantedBy=default.target`
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
toast({
|
toast({
|
||||||
variant: "destructive",
|
variant: "destructive",
|
||||||
title: "Error creating site",
|
title: t('siteErrorCreate'),
|
||||||
description: formatAxiosError(e)
|
description: formatAxiosError(e)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -520,8 +520,8 @@ WantedBy=default.target`
|
||||||
<>
|
<>
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<HeaderTitle
|
<HeaderTitle
|
||||||
title="Create Site"
|
title={t('siteCreate')}
|
||||||
description="Follow the steps below to create and connect a new site"
|
description={t('siteCreateDescription2')}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
|
@ -529,7 +529,7 @@ WantedBy=default.target`
|
||||||
router.push(`/${orgId}/settings/sites`);
|
router.push(`/${orgId}/settings/sites`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
See All Sites
|
{t('siteSeeAll')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -539,7 +539,7 @@ WantedBy=default.target`
|
||||||
<SettingsSection>
|
<SettingsSection>
|
||||||
<SettingsSectionHeader>
|
<SettingsSectionHeader>
|
||||||
<SettingsSectionTitle>
|
<SettingsSectionTitle>
|
||||||
Site Information
|
{t('siteInfo')}
|
||||||
</SettingsSectionTitle>
|
</SettingsSectionTitle>
|
||||||
</SettingsSectionHeader>
|
</SettingsSectionHeader>
|
||||||
<SettingsSectionBody>
|
<SettingsSectionBody>
|
||||||
|
@ -555,7 +555,7 @@ WantedBy=default.target`
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
Name
|
{t('name')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
|
@ -565,8 +565,7 @@ WantedBy=default.target`
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
This is the display
|
{t('siteNameDescription')}
|
||||||
name for the site.
|
|
||||||
</FormDescription>
|
</FormDescription>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
|
@ -580,11 +579,10 @@ WantedBy=default.target`
|
||||||
<SettingsSection>
|
<SettingsSection>
|
||||||
<SettingsSectionHeader>
|
<SettingsSectionHeader>
|
||||||
<SettingsSectionTitle>
|
<SettingsSectionTitle>
|
||||||
Tunnel Type
|
{t('tunnelType')}
|
||||||
</SettingsSectionTitle>
|
</SettingsSectionTitle>
|
||||||
<SettingsSectionDescription>
|
<SettingsSectionDescription>
|
||||||
Determine how you want to connect to your
|
{t('siteTunnelDescription')}
|
||||||
site
|
|
||||||
</SettingsSectionDescription>
|
</SettingsSectionDescription>
|
||||||
</SettingsSectionHeader>
|
</SettingsSectionHeader>
|
||||||
<SettingsSectionBody>
|
<SettingsSectionBody>
|
||||||
|
@ -604,11 +602,10 @@ WantedBy=default.target`
|
||||||
<SettingsSection>
|
<SettingsSection>
|
||||||
<SettingsSectionHeader>
|
<SettingsSectionHeader>
|
||||||
<SettingsSectionTitle>
|
<SettingsSectionTitle>
|
||||||
Newt Credentials
|
{t('siteNewtCredentials')}
|
||||||
</SettingsSectionTitle>
|
</SettingsSectionTitle>
|
||||||
<SettingsSectionDescription>
|
<SettingsSectionDescription>
|
||||||
This is how Newt will authenticate
|
{t('siteNewtCredentialsDescription')}
|
||||||
with the server
|
|
||||||
</SettingsSectionDescription>
|
</SettingsSectionDescription>
|
||||||
</SettingsSectionHeader>
|
</SettingsSectionHeader>
|
||||||
<SettingsSectionBody>
|
<SettingsSectionBody>
|
||||||
|
@ -650,12 +647,10 @@ WantedBy=default.target`
|
||||||
<Alert variant="neutral" className="">
|
<Alert variant="neutral" className="">
|
||||||
<InfoIcon className="h-4 w-4" />
|
<InfoIcon className="h-4 w-4" />
|
||||||
<AlertTitle className="font-semibold">
|
<AlertTitle className="font-semibold">
|
||||||
Save Your Credentials
|
{t('siteCredentialsSave')}
|
||||||
</AlertTitle>
|
</AlertTitle>
|
||||||
<AlertDescription>
|
<AlertDescription>
|
||||||
You will only be able to see
|
{t('siteCredentialsSaveDescription')}
|
||||||
this once. Make sure to copy it
|
|
||||||
to a secure place.
|
|
||||||
</AlertDescription>
|
</AlertDescription>
|
||||||
</Alert>
|
</Alert>
|
||||||
|
|
||||||
|
@ -690,9 +685,7 @@ WantedBy=default.target`
|
||||||
htmlFor="terms"
|
htmlFor="terms"
|
||||||
className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
||||||
>
|
>
|
||||||
I have
|
{t('siteConfirmCopy')}
|
||||||
copied the
|
|
||||||
config
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
@ -707,16 +700,16 @@ WantedBy=default.target`
|
||||||
<SettingsSection>
|
<SettingsSection>
|
||||||
<SettingsSectionHeader>
|
<SettingsSectionHeader>
|
||||||
<SettingsSectionTitle>
|
<SettingsSectionTitle>
|
||||||
Install Newt
|
{t('siteInstallNewt')}
|
||||||
</SettingsSectionTitle>
|
</SettingsSectionTitle>
|
||||||
<SettingsSectionDescription>
|
<SettingsSectionDescription>
|
||||||
Get Newt running on your system
|
{t('siteInstallNewtDescription')}
|
||||||
</SettingsSectionDescription>
|
</SettingsSectionDescription>
|
||||||
</SettingsSectionHeader>
|
</SettingsSectionHeader>
|
||||||
<SettingsSectionBody>
|
<SettingsSectionBody>
|
||||||
<div>
|
<div>
|
||||||
<p className="font-bold mb-3">
|
<p className="font-bold mb-3">
|
||||||
Operating System
|
{t('operatingSystem')}
|
||||||
</p>
|
</p>
|
||||||
<div className="grid grid-cols-2 md:grid-cols-5 gap-2">
|
<div className="grid grid-cols-2 md:grid-cols-5 gap-2">
|
||||||
{platforms.map((os) => (
|
{platforms.map((os) => (
|
||||||
|
@ -772,7 +765,7 @@ WantedBy=default.target`
|
||||||
</div>
|
</div>
|
||||||
<div className="pt-4">
|
<div className="pt-4">
|
||||||
<p className="font-bold mb-3">
|
<p className="font-bold mb-3">
|
||||||
Commands
|
{t('commands')}
|
||||||
</p>
|
</p>
|
||||||
<div className="mt-2">
|
<div className="mt-2">
|
||||||
<CopyTextBox
|
<CopyTextBox
|
||||||
|
@ -793,11 +786,10 @@ WantedBy=default.target`
|
||||||
<SettingsSection>
|
<SettingsSection>
|
||||||
<SettingsSectionHeader>
|
<SettingsSectionHeader>
|
||||||
<SettingsSectionTitle>
|
<SettingsSectionTitle>
|
||||||
WireGuard Configuration
|
{t('WgConfiguration')}
|
||||||
</SettingsSectionTitle>
|
</SettingsSectionTitle>
|
||||||
<SettingsSectionDescription>
|
<SettingsSectionDescription>
|
||||||
Use the following configuration to
|
{t('WgConfigurationDescription')}
|
||||||
connect to your network
|
|
||||||
</SettingsSectionDescription>
|
</SettingsSectionDescription>
|
||||||
</SettingsSectionHeader>
|
</SettingsSectionHeader>
|
||||||
<SettingsSectionBody>
|
<SettingsSectionBody>
|
||||||
|
@ -818,12 +810,10 @@ WantedBy=default.target`
|
||||||
<Alert variant="neutral">
|
<Alert variant="neutral">
|
||||||
<InfoIcon className="h-4 w-4" />
|
<InfoIcon className="h-4 w-4" />
|
||||||
<AlertTitle className="font-semibold">
|
<AlertTitle className="font-semibold">
|
||||||
Save Your Credentials
|
{t('siteCredentialsSave')}
|
||||||
</AlertTitle>
|
</AlertTitle>
|
||||||
<AlertDescription>
|
<AlertDescription>
|
||||||
You will only be able to see this
|
{t('siteCredentialsSaveDescription')}
|
||||||
once. Make sure to copy it to a
|
|
||||||
secure place.
|
|
||||||
</AlertDescription>
|
</AlertDescription>
|
||||||
</Alert>
|
</Alert>
|
||||||
|
|
||||||
|
@ -858,8 +848,7 @@ WantedBy=default.target`
|
||||||
htmlFor="terms"
|
htmlFor="terms"
|
||||||
className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
||||||
>
|
>
|
||||||
I have copied
|
{t('siteConfirmCopy')}
|
||||||
the config
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
@ -881,7 +870,7 @@ WantedBy=default.target`
|
||||||
router.push(`/${orgId}/settings/sites`);
|
router.push(`/${orgId}/settings/sites`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Cancel
|
{t('cancel')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
|
@ -889,7 +878,7 @@ WantedBy=default.target`
|
||||||
form.handleSubmit(onSubmit)();
|
form.handleSubmit(onSubmit)();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Create Site
|
{t('siteCreate')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue