i18n rework
This commit is contained in:
parent
ae990cf977
commit
aadd420f71
|
@ -6,8 +6,8 @@
|
||||||
"verify": "Verify by entering the 6-digit code shown in your authenticator into the box below.",
|
"verify": "Verify by entering the 6-digit code shown in your authenticator into the box below.",
|
||||||
"button": "Enable 2FA",
|
"button": "Enable 2FA",
|
||||||
"error": {
|
"error": {
|
||||||
"generic": "Unable to enable 2fa: {err}",
|
"generic": "Unable to enable 2fa: {{err}}",
|
||||||
"api": "Unable to contact the server. Try again later.",
|
"api": "Unable to contact the server. Try again later.",
|
||||||
"ERR_UNAUTHORIZED": "Incorrect 2FA code"
|
"ERR_UNAUTHORIZED": "Incorrect 2FA code"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"title": "{title} | Trifid Web UI",
|
"title": "{{title}} | Trifid Web UI",
|
||||||
"page": {
|
"page": {
|
||||||
"itworks": "It Works!",
|
"itworks": "It Works!",
|
||||||
"admin": "Admin Panel",
|
"admin": "Admin Panel",
|
||||||
|
@ -16,4 +16,4 @@
|
||||||
},
|
},
|
||||||
"logout": "Log out",
|
"logout": "Log out",
|
||||||
"loading": "Dashboard is loading"
|
"loading": "Dashboard is loading"
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,14 +23,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enroll": {
|
"enroll": {
|
||||||
"title": "Enrolling host {host}",
|
"title": "Enrolling host {{host}}",
|
||||||
"explainer": "Enrolling this host will allow it to communicate on your network. You'll need to have compatible client software installed first.",
|
"explainer": "Enrolling this host will allow it to communicate on your network. You'll need to have compatible client software installed first.",
|
||||||
"done": "Done, return me to the hosts page",
|
"done": "Done, return me to the hosts page",
|
||||||
"cancel": "Nevermind",
|
"cancel": "Nevermind",
|
||||||
"code": "Input {code} as your enrollment code into any trifid-compatible client software to enroll. It will expire in {expires} minutes."
|
"code": "Input {code} as your enrollment code into any trifid-compatible client software to enroll. It will expire in {{expires}} minutes."
|
||||||
},
|
},
|
||||||
"delete": {
|
"delete": {
|
||||||
"title": "Are you sure you want to delete the host {host}?",
|
"title": "Are you sure you want to delete the host {{host}}?",
|
||||||
"explainer": "This action cannot be undone. This host will still be able to connect to the network unless you block it first.",
|
"explainer": "This action cannot be undone. This host will still be able to connect to the network unless you block it first.",
|
||||||
"confirm": "I'm sure",
|
"confirm": "I'm sure",
|
||||||
"cancel": "Nevermind",
|
"cancel": "Nevermind",
|
||||||
|
@ -38,4 +38,4 @@
|
||||||
"ERR_DB_ERROR": "Removal failed"
|
"ERR_DB_ERROR": "Removal failed"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"header": "It works!",
|
"header": "It works!",
|
||||||
"body": "If you're seeing this page, tfweb is installed and (probably) correctly configured.",
|
"body": "If you're seeing this page, tfweb is installed and (probably) correctly configured.",
|
||||||
"linkbody": "Perhaps you meant to visit the {link0} or {link1}?",
|
"linkbody": "Perhaps you meant to visit the {{link0}} or {{link1}}?",
|
||||||
"linkbody.link0": "admin panel",
|
"linkbody.link0": "admin panel",
|
||||||
"linkbody.link1": "create an account"
|
"linkbody.link1": "create an account"
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
"button": "Log in",
|
"button": "Log in",
|
||||||
"email": "Check your email",
|
"email": "Check your email",
|
||||||
"emailbody": "We sent you an email with a link to complete logging in.",
|
"emailbody": "We sent you an email with a link to complete logging in.",
|
||||||
"emailbody2": "Didn't work? Check your junk inbox or click {link0} to try again.",
|
"emailbody2": "Didn't work? Check your junk inbox or click {{link0}} to try again.",
|
||||||
"emailbody2.link0": "here",
|
"emailbody2.link0": "here",
|
||||||
"error": {
|
"error": {
|
||||||
"invalidEmail": "That email address isn't valid. Try again.",
|
"invalidEmail": "That email address isn't valid. Try again.",
|
||||||
"generic": "There was an error logging you in. Try again or contact support with the error code {err}",
|
"generic": "There was an error logging you in. Try again or contact support with the error code {{err}}",
|
||||||
"usermissing": "That user does not exist."
|
"usermissing": "That user does not exist."
|
||||||
},
|
},
|
||||||
"need": "Don't have an account? {link0}",
|
"need": "Don't have an account? {{link0}}",
|
||||||
"need.link0": "Signup"
|
"need.link0": "Signup"
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
"explain": "This defines what IP addresses will be assigned to your devices. The range you enter below must fall within either the RFC 1918 Private Address Space or the RFC 6598 Shared Address Space. Enter your network via CIDR notation.",
|
"explain": "This defines what IP addresses will be assigned to your devices. The range you enter below must fall within either the RFC 1918 Private Address Space or the RFC 6598 Shared Address Space. Enter your network via CIDR notation.",
|
||||||
"label": "Network range",
|
"label": "Network range",
|
||||||
"button": "Create network",
|
"button": "Create network",
|
||||||
"valid": "Valid - {numIps} addresses ({start} to {end})",
|
"valid": "Valid - {{numIps}} addresses ({{start}} to {{end}})",
|
||||||
"invalid": "Invalid",
|
"invalid": "Invalid",
|
||||||
"error": {
|
"error": {
|
||||||
"generic": "Unable to create network: {err}",
|
"generic": "Unable to create network: {{err}}",
|
||||||
"api": "Unable to contact the server. Try again later."
|
"api": "Unable to contact the server. Try again later."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"delete": {
|
"delete": {
|
||||||
"title": "Are you sure you want to delete the role {rule}?",
|
"title": "Are you sure you want to delete the role {{rule}}?",
|
||||||
"explainer": "This action cannot be undone. This role must be removed from all hosts, lighthouses, and relays prior to deleting it.",
|
"explainer": "This action cannot be undone. This role must be removed from all hosts, lighthouses, and relays prior to deleting it.",
|
||||||
"confirm": "I'm sure",
|
"confirm": "I'm sure",
|
||||||
"cancel": "Nevermind",
|
"cancel": "Nevermind",
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"edit": {
|
"edit": {
|
||||||
"title": "Editing role {rule}",
|
"title": "Editing role {{rule}}",
|
||||||
"any": "Any",
|
"any": "Any",
|
||||||
"name": "Role name",
|
"name": "Role name",
|
||||||
"desc": "Role description",
|
"desc": "Role description",
|
||||||
|
@ -74,4 +74,4 @@
|
||||||
"cancel": "Cancel"
|
"cancel": "Cancel"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
"button": "Create account",
|
"button": "Create account",
|
||||||
"email": "Check your email",
|
"email": "Check your email",
|
||||||
"emailbody": "We sent you an email with a link to complete signing up.",
|
"emailbody": "We sent you an email with a link to complete signing up.",
|
||||||
"emailbody2": "Didn't work? Check your junk inbox or click {link0} to try again.",
|
"emailbody2": "Didn't work? Check your junk inbox or click {{link0}} to try again.",
|
||||||
"emailbody2.link0": "here",
|
"emailbody2.link0": "here",
|
||||||
"error": {
|
"error": {
|
||||||
"invalidEmail": "That email address isn't valid. Try again.",
|
"invalidEmail": "That email address isn't valid. Try again.",
|
||||||
"generic": "There was an error logging you in. Try again or contact support with the error code {err}",
|
"generic": "There was an error logging you in. Try again or contact support with the error code {{err}}",
|
||||||
"userexists": "That user already exists. Try {link0}?",
|
"userexists": "That user already exists. Try {{link0}}?",
|
||||||
"userexists.link0": "logging in"
|
"userexists.link0": "logging in"
|
||||||
},
|
},
|
||||||
"already": "Already have an account? {link0}",
|
"already": "Already have an account? {{link0}}",
|
||||||
"already.link0": "Login"
|
"already.link0": "Login"
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.admin")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.admin")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
<h1>{$t('itworks.header')}</h1>
|
<h1>{$t('itworks.header')}</h1>
|
||||||
<p>{$t('itworks.body')}</p>
|
<p>{$t('itworks.body')}</p>
|
||||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||||
<p>{@html $t('itworks.linkbody', {values:{link0:'<a href="/admin">'+$t('itworks.linkbody.link0')+'</a>',link1:'<a href="/signup">'+$t('itworks.linkbody.link1')+'</a>'}})}</p>
|
<p>{@html $t('itworks.linkbody', {link0:'<a href="/admin">'+$t('itworks.linkbody.link0')+'</a>',link1:'<a href="/signup">'+$t('itworks.linkbody.link1')+'</a>'})}</p>
|
||||||
</LoadingWrapper>
|
</LoadingWrapper>
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.2fa")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.2fa")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.2fasetup")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.2fasetup")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
isError = true;
|
isError = true;
|
||||||
error = $t("networkcreate.error.generic", {values:{err:resp_json.errors[0].code}});
|
error = $t("networkcreate.error.generic", {err:resp_json.errors[0].code});
|
||||||
loading = false;
|
loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.admin")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.admin")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
isError = true;
|
isError = true;
|
||||||
error = $t("networkcreate.error.generic", {values:{err:resp_json.errors[0].code}});
|
error = $t("networkcreate.error.generic", {err:resp_json.errors[0].code});
|
||||||
loading = false;
|
loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.hosts")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.hosts")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
isError = true;
|
isError = true;
|
||||||
error = $t("networkcreate.error.generic", {values:{err:resp_json.errors[0].code}});
|
error = $t("networkcreate.error.generic", {err:resp_json.errors[0].code});
|
||||||
loading = false;
|
loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -116,12 +116,12 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.hosts")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.hosts")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
<AdminLayout selected="hosts">
|
<AdminLayout selected="hosts">
|
||||||
<h3>{$t("hosts.delete.title", {values: {host: host.data.name}})}</h3>
|
<h3>{$t("hosts.delete.title", {host: host.data.name})}</h3>
|
||||||
<p>{$t("hosts.delete.explainer")}</p>
|
<p>{$t("hosts.delete.explainer")}</p>
|
||||||
{#if loading}
|
{#if loading}
|
||||||
<button disabled class="btn btn-danger"><i class="fas fa-gear fa-spin"></i></button>
|
<button disabled class="btn btn-danger"><i class="fas fa-gear fa-spin"></i></button>
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
isError = true;
|
isError = true;
|
||||||
error = $t("networkcreate.error.generic", {values:{err:resp_json.errors[0].code}});
|
error = $t("networkcreate.error.generic", {err:resp_json.errors[0].code});
|
||||||
loading = false;
|
loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -100,17 +100,17 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.hosts")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.hosts")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
<AdminLayout selected="hosts">
|
<AdminLayout selected="hosts">
|
||||||
<h3>{$t("hosts.enroll.title", {values: {host: host.data.name}})}</h3>
|
<h3>{$t("hosts.enroll.title", {host: host.data.name})}</h3>
|
||||||
<p>{$t("hosts.enroll.explainer")}</p>
|
<p>{$t("hosts.enroll.explainer")}</p>
|
||||||
{#if loading}
|
{#if loading}
|
||||||
<button disabled class="btn btn-success"><i class="fas fa-gear fa-spin"></i></button>
|
<button disabled class="btn btn-success"><i class="fas fa-gear fa-spin"></i></button>
|
||||||
{:else}
|
{:else}
|
||||||
<p>{$t("hosts.enroll.code", {values:{code: code.code, expires: code.lifetimeSeconds / 60}})}</p>
|
<p>{$t("hosts.enroll.code", {code: code.code, expires: code.lifetimeSeconds / 60})}</p>
|
||||||
<button on:click={window.location.href = "/hosts"} class="btn btn-success">{$t("hosts.enroll.done")}</button>
|
<button on:click={window.location.href = "/hosts"} class="btn btn-success">{$t("hosts.enroll.done")}</button>
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
isError = true;
|
isError = true;
|
||||||
error = $t("networkcreate.error.generic", {values:{err:resp_json.errors[0].code}});
|
error = $t("networkcreate.error.generic", {err:resp_json.errors[0].code});
|
||||||
loading = false;
|
loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.hosts")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.hosts")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
isError = true;
|
isError = true;
|
||||||
error = $t("networkcreate.error.generic", {values:{err:resp_json.errors[0].code}});
|
error = $t("networkcreate.error.generic", {err:resp_json.errors[0].code});
|
||||||
loading = false;
|
loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.lighthouses")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.lighthouses")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
if (err.code == "ERR_USER_DOES_NOT_EXIST") {
|
if (err.code == "ERR_USER_DOES_NOT_EXIST") {
|
||||||
errForm = $t('login.error.usermissing');
|
errForm = $t('login.error.usermissing');
|
||||||
} else {
|
} else {
|
||||||
errForm = $t('login.error.generic', {values: {err: (auth_result[1] as APIError).code}});
|
errForm = $t('login.error.generic', {err: (auth_result[1] as APIError).code});
|
||||||
}
|
}
|
||||||
|
|
||||||
loading = false;
|
loading = false;
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.login")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.login")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
|
|
||||||
<p class="card-text">{$t('login.emailbody')}</p>
|
<p class="card-text">{$t('login.emailbody')}</p>
|
||||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||||
<p class="card-text">{@html $t('login.emailbody2', {values:{link0:'<a href="/admin?definitely_not_taking_advantage_of_the_redirect">'+$t('login.emailbody2.link0')+'</a>'}})}</p>
|
<p class="card-text">{@html $t('login.emailbody2', {link0:'<a href="/admin?definitely_not_taking_advantage_of_the_redirect">'+$t('login.emailbody2.link0')+'</a>'})}</p>
|
||||||
{:else}
|
{:else}
|
||||||
<h4 class="card-title">{$t('login.title')}</h4>
|
<h4 class="card-title">{$t('login.title')}</h4>
|
||||||
<h6 class="card-subtitle">{$t('login.subtitle')}</h6>
|
<h6 class="card-subtitle">{$t('login.subtitle')}</h6>
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
</form>
|
</form>
|
||||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||||
<p class="block mt-2 mb-0">{@html $t('login.need', {values:{link0:'<a href="/signup">'+$t('login.need.link0')+'</a>'}})}</p>
|
<p class="block mt-2 mb-0">{@html $t('login.need', {link0:'<a href="/signup">'+$t('login.need.link0')+'</a>'})}</p>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.login")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.login")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
let resp_json = await e.response.json();
|
let resp_json = await e.response.json();
|
||||||
if (resp_json.errors[0].code != "ERR_NO_ORG") {
|
if (resp_json.errors[0].code != "ERR_NO_ORG") {
|
||||||
isError = true;
|
isError = true;
|
||||||
error = $t("networkcreate.error.generic", {values:{err:resp_json.errors[0].code}});
|
error = $t("networkcreate.error.generic", {err:resp_json.errors[0].code});
|
||||||
loading = false;
|
loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
let cidr = "100.100.0.0/22";
|
let cidr = "100.100.0.0/22";
|
||||||
let valid = true;
|
let valid = true;
|
||||||
let sub = $t("networkcreate.valid", {values:{numIps:$number(1024), start: "100.64.0.0", end: "100.127.255.255"}})
|
let sub = $t("networkcreate.valid", {numIps:$number(1024), start: "100.64.0.0", end: "100.127.255.255"})
|
||||||
|
|
||||||
const regex = new RegExp(/^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$/im);
|
const regex = new RegExp(/^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$/im);
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
let first = [first_num >>> 24 & 0xFF, first_num >>> 16 & 0xFF, first_num >>> 8 & 0xFF, first_num & 0xFF].join(".");
|
let first = [first_num >>> 24 & 0xFF, first_num >>> 16 & 0xFF, first_num >>> 8 & 0xFF, first_num & 0xFF].join(".");
|
||||||
let last = [last_num >>> 24 & 0xFF, last_num >>> 16 & 0xFF, last_num >>> 8 & 0xFF, last_num & 0xFF].join(".");
|
let last = [last_num >>> 24 & 0xFF, last_num >>> 16 & 0xFF, last_num >>> 8 & 0xFF, last_num & 0xFF].join(".");
|
||||||
|
|
||||||
sub = $t("networkcreate.valid", {values:{numIps:$number(addressCount), start: first, end: last}});
|
sub = $t("networkcreate.valid", {numIps:$number(addressCount), start: first, end: last});
|
||||||
valid = true;
|
valid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
error = $t('networkcreate.error.generic', {values:{err:etext}});
|
error = $t('networkcreate.error.generic', {err:etext});
|
||||||
loading = false;
|
loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.networkcreate")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.networkcreate")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
isError = true;
|
isError = true;
|
||||||
error = $t("networkcreate.error.generic", {values:{err:resp_json.errors[0].code}});
|
error = $t("networkcreate.error.generic", {err:resp_json.errors[0].code});
|
||||||
loading = false;
|
loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.relays")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.relays")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
isError = true;
|
isError = true;
|
||||||
error = $t("networkcreate.error.generic", {values:{err:resp_json.errors[0].code}});
|
error = $t("networkcreate.error.generic", {err:resp_json.errors[0].code});
|
||||||
loading = false;
|
loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.roles")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.roles")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
isError = true;
|
isError = true;
|
||||||
error = $t("networkcreate.error.generic", {values:{err:resp_json.errors[0].code}});
|
error = $t("networkcreate.error.generic", {err:resp_json.errors[0].code});
|
||||||
loading = false;
|
loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -117,12 +117,12 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.roles")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.roles")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
<AdminLayout selected="roles">
|
<AdminLayout selected="roles">
|
||||||
<h3>{$t("roles.delete.title", {values: {rule: role.data.name}})}</h3>
|
<h3>{$t("roles.delete.title", {rule: role.data.name})}</h3>
|
||||||
<p>{$t("roles.delete.explainer")}</p>
|
<p>{$t("roles.delete.explainer")}</p>
|
||||||
{#if loading}
|
{#if loading}
|
||||||
<button disabled class="btn btn-danger"><i class="fas fa-gear fa-spin"></i></button>
|
<button disabled class="btn btn-danger"><i class="fas fa-gear fa-spin"></i></button>
|
||||||
|
|
|
@ -276,7 +276,7 @@
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
isError = true;
|
isError = true;
|
||||||
error = $t("networkcreate.error.generic", {values:{err:resp_json.errors[0].code}});
|
error = $t("networkcreate.error.generic", {err:resp_json.errors[0].code});
|
||||||
loading = false;
|
loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -346,12 +346,12 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.roles")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.roles")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
<AdminLayout selected="roles">
|
<AdminLayout selected="roles">
|
||||||
<h3>{$t("roles.edit.title", {values: {rule: roleName}})}</h3>
|
<h3>{$t("roles.edit.title", {rule: roleName})}</h3>
|
||||||
<form>
|
<form>
|
||||||
<label class="mt-2 form-label" for="roleDesc">{$t("roles.edit.desc")}</label>
|
<label class="mt-2 form-label" for="roleDesc">{$t("roles.edit.desc")}</label>
|
||||||
<input class="form-control" bind:value={roleDescription} type="text" id="roleDesc" />
|
<input class="form-control" bind:value={roleDescription} type="text" id="roleDesc" />
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
isError = true;
|
isError = true;
|
||||||
error = $t("networkcreate.error.generic", {values:{err:resp_json.errors[0].code}});
|
error = $t("networkcreate.error.generic", {err:resp_json.errors[0].code});
|
||||||
loading = false;
|
loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -306,7 +306,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.roles")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.roles")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
|
|
|
@ -53,9 +53,9 @@
|
||||||
let err = auth_result[1] as APIError;
|
let err = auth_result[1] as APIError;
|
||||||
|
|
||||||
if (err.code == "ERR_USER_EXISTS") {
|
if (err.code == "ERR_USER_EXISTS") {
|
||||||
errForm = $t('signup.error.userexists', {values:{link0:'<a href="/login">'+$t('signup.error.userexists.link0')+'</a>'}});
|
errForm = $t('signup.error.userexists', {link0:'<a href="/login">'+$t('signup.error.userexists.link0')+'</a>'});
|
||||||
} else {
|
} else {
|
||||||
errForm = $t('signup.error.generic', {values: {err: (auth_result[1] as APIError).code}});
|
errForm = $t('signup.error.generic', {err: (auth_result[1] as APIError).code});
|
||||||
}
|
}
|
||||||
|
|
||||||
loading = false;
|
loading = false;
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{$t("common.title", {values: {title: $t("common.page.signup")}})}</title>
|
<title>{$t("common.title", {title: $t("common.page.signup")})}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
<LoadingWrapper isLoading={currentlyLoading} isError={isError} error={error}>
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
|
|
||||||
<p class="card-text">{$t('signup.emailbody')}</p>
|
<p class="card-text">{$t('signup.emailbody')}</p>
|
||||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||||
<p class="card-text">{@html $t('signup.emailbody2', {values:{link0:'<a href="/admin?definitely_not_taking_advantage_of_the_redirect">'+$t('signup.emailbody2.link0')+'</a>'}})}</p>
|
<p class="card-text">{@html $t('signup.emailbody2', {link0:'<a href="/admin?definitely_not_taking_advantage_of_the_redirect">'+$t('signup.emailbody2.link0')+'</a>'})}</p>
|
||||||
{:else}
|
{:else}
|
||||||
<h4 class="card-title">{$t('signup.title')}</h4>
|
<h4 class="card-title">{$t('signup.title')}</h4>
|
||||||
<h6 class="card-subtitle">{$t('signup.subtitle')}</h6>
|
<h6 class="card-subtitle">{$t('signup.subtitle')}</h6>
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
</form>
|
</form>
|
||||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||||
<p class="block mt-2 mb-0">{@html $t('signup.already', {values:{link0:'<a href="/login">'+$t('signup.already.link0')+'</a>'}})}</p>
|
<p class="block mt-2 mb-0">{@html $t('signup.already', {link0:'<a href="/login">'+$t('signup.already.link0')+'</a>'})}</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue