diff --git a/tfweb/src/lib/i18n/locales/en/2fasetup.json b/tfweb/src/lib/i18n/locales/en/2fasetup.json index 257c9d0..941f1c5 100644 --- a/tfweb/src/lib/i18n/locales/en/2fasetup.json +++ b/tfweb/src/lib/i18n/locales/en/2fasetup.json @@ -6,8 +6,8 @@ "verify": "Verify by entering the 6-digit code shown in your authenticator into the box below.", "button": "Enable 2FA", "error": { - "generic": "Unable to enable 2fa: {err}", + "generic": "Unable to enable 2fa: {{err}}", "api": "Unable to contact the server. Try again later.", "ERR_UNAUTHORIZED": "Incorrect 2FA code" } -} \ No newline at end of file +} diff --git a/tfweb/src/lib/i18n/locales/en/common.json b/tfweb/src/lib/i18n/locales/en/common.json index 982510f..1d4c724 100644 --- a/tfweb/src/lib/i18n/locales/en/common.json +++ b/tfweb/src/lib/i18n/locales/en/common.json @@ -1,5 +1,5 @@ { - "title": "{title} | Trifid Web UI", + "title": "{{title}} | Trifid Web UI", "page": { "itworks": "It Works!", "admin": "Admin Panel", @@ -16,4 +16,4 @@ }, "logout": "Log out", "loading": "Dashboard is loading" -} \ No newline at end of file +} diff --git a/tfweb/src/lib/i18n/locales/en/hosts.json b/tfweb/src/lib/i18n/locales/en/hosts.json index ae775ee..1bd2cd3 100644 --- a/tfweb/src/lib/i18n/locales/en/hosts.json +++ b/tfweb/src/lib/i18n/locales/en/hosts.json @@ -23,14 +23,14 @@ } }, "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.", "done": "Done, return me to the hosts page", "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": { - "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.", "confirm": "I'm sure", "cancel": "Nevermind", @@ -38,4 +38,4 @@ "ERR_DB_ERROR": "Removal failed" } } -} \ No newline at end of file +} diff --git a/tfweb/src/lib/i18n/locales/en/itworks.json b/tfweb/src/lib/i18n/locales/en/itworks.json index 5006b5b..0f288e9 100644 --- a/tfweb/src/lib/i18n/locales/en/itworks.json +++ b/tfweb/src/lib/i18n/locales/en/itworks.json @@ -1,7 +1,7 @@ { "header": "It works!", "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.link1": "create an account" -} \ No newline at end of file +} diff --git a/tfweb/src/lib/i18n/locales/en/login.json b/tfweb/src/lib/i18n/locales/en/login.json index d052a10..b3d8c01 100644 --- a/tfweb/src/lib/i18n/locales/en/login.json +++ b/tfweb/src/lib/i18n/locales/en/login.json @@ -5,13 +5,13 @@ "button": "Log in", "email": "Check your email", "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", "error": { "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." }, - "need": "Don't have an account? {link0}", + "need": "Don't have an account? {{link0}}", "need.link0": "Signup" -} \ No newline at end of file +} diff --git a/tfweb/src/lib/i18n/locales/en/networkcreate.json b/tfweb/src/lib/i18n/locales/en/networkcreate.json index 7f3838a..3ec20b5 100644 --- a/tfweb/src/lib/i18n/locales/en/networkcreate.json +++ b/tfweb/src/lib/i18n/locales/en/networkcreate.json @@ -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.", "label": "Network range", "button": "Create network", - "valid": "Valid - {numIps} addresses ({start} to {end})", + "valid": "Valid - {{numIps}} addresses ({{start}} to {{end}})", "invalid": "Invalid", "error": { - "generic": "Unable to create network: {err}", + "generic": "Unable to create network: {{err}}", "api": "Unable to contact the server. Try again later." } -} \ No newline at end of file +} diff --git a/tfweb/src/lib/i18n/locales/en/roles.json b/tfweb/src/lib/i18n/locales/en/roles.json index 5e6074e..1772561 100644 --- a/tfweb/src/lib/i18n/locales/en/roles.json +++ b/tfweb/src/lib/i18n/locales/en/roles.json @@ -1,6 +1,6 @@ { "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.", "confirm": "I'm sure", "cancel": "Nevermind", @@ -46,7 +46,7 @@ } }, "edit": { - "title": "Editing role {rule}", + "title": "Editing role {{rule}}", "any": "Any", "name": "Role name", "desc": "Role description", @@ -74,4 +74,4 @@ "cancel": "Cancel" } } -} \ No newline at end of file +} diff --git a/tfweb/src/lib/i18n/locales/en/signup.json b/tfweb/src/lib/i18n/locales/en/signup.json index 3ddf34a..bc60369 100644 --- a/tfweb/src/lib/i18n/locales/en/signup.json +++ b/tfweb/src/lib/i18n/locales/en/signup.json @@ -5,14 +5,14 @@ "button": "Create account", "email": "Check your email", "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", "error": { "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}", - "userexists": "That user already exists. Try {link0}?", + "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.link0": "logging in" }, - "already": "Already have an account? {link0}", + "already": "Already have an account? {{link0}}", "already.link0": "Login" -} \ No newline at end of file +} diff --git a/tfweb/src/routes/+page.svelte b/tfweb/src/routes/+page.svelte index 439e53a..390adaa 100644 --- a/tfweb/src/routes/+page.svelte +++ b/tfweb/src/routes/+page.svelte @@ -14,12 +14,12 @@ - {$t("common.title", {values: {title: $t("common.page.admin")}})} + {$t("common.title", {title: $t("common.page.admin")})}

{$t('itworks.header')}

{$t('itworks.body')}

-

{@html $t('itworks.linkbody', {values:{link0:''+$t('itworks.linkbody.link0')+'',link1:''+$t('itworks.linkbody.link1')+''}})}

+

{@html $t('itworks.linkbody', {link0:''+$t('itworks.linkbody.link0')+'',link1:''+$t('itworks.linkbody.link1')+''})}

diff --git a/tfweb/src/routes/2fa/+page.svelte b/tfweb/src/routes/2fa/+page.svelte index 3d12337..1383d17 100644 --- a/tfweb/src/routes/2fa/+page.svelte +++ b/tfweb/src/routes/2fa/+page.svelte @@ -67,7 +67,7 @@ - {$t("common.title", {values: {title: $t("common.page.2fa")}})} + {$t("common.title", {title: $t("common.page.2fa")})} diff --git a/tfweb/src/routes/2fasetup/+page.svelte b/tfweb/src/routes/2fasetup/+page.svelte index 6100de9..6b3e8dd 100644 --- a/tfweb/src/routes/2fasetup/+page.svelte +++ b/tfweb/src/routes/2fasetup/+page.svelte @@ -102,7 +102,7 @@ - {$t("common.title", {values: {title: $t("common.page.2fasetup")}})} + {$t("common.title", {title: $t("common.page.2fasetup")})} diff --git a/tfweb/src/routes/admin/+page.svelte b/tfweb/src/routes/admin/+page.svelte index c119818..28ff1a5 100644 --- a/tfweb/src/routes/admin/+page.svelte +++ b/tfweb/src/routes/admin/+page.svelte @@ -49,7 +49,7 @@ return; } else { 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; return; } @@ -68,7 +68,7 @@ - {$t("common.title", {values: {title: $t("common.page.admin")}})} + {$t("common.title", {title: $t("common.page.admin")})} diff --git a/tfweb/src/routes/hosts/+page.svelte b/tfweb/src/routes/hosts/+page.svelte index 49019c9..6068142 100644 --- a/tfweb/src/routes/hosts/+page.svelte +++ b/tfweb/src/routes/hosts/+page.svelte @@ -56,7 +56,7 @@ return; } else { 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; return; } @@ -96,7 +96,7 @@ - {$t("common.title", {values: {title: $t("common.page.hosts")}})} + {$t("common.title", {title: $t("common.page.hosts")})} diff --git a/tfweb/src/routes/hosts/[host_id]/delete/+page.svelte b/tfweb/src/routes/hosts/[host_id]/delete/+page.svelte index 991883f..59f1f08 100644 --- a/tfweb/src/routes/hosts/[host_id]/delete/+page.svelte +++ b/tfweb/src/routes/hosts/[host_id]/delete/+page.svelte @@ -67,7 +67,7 @@ return; } else { 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; return; } @@ -116,12 +116,12 @@ - {$t("common.title", {values: {title: $t("common.page.hosts")}})} + {$t("common.title", {title: $t("common.page.hosts")})} -

{$t("hosts.delete.title", {values: {host: host.data.name}})}

+

{$t("hosts.delete.title", {host: host.data.name})}

{$t("hosts.delete.explainer")}

{#if loading} diff --git a/tfweb/src/routes/hosts/[host_id]/enroll/+page.svelte b/tfweb/src/routes/hosts/[host_id]/enroll/+page.svelte index 13a2ca5..2e26504 100644 --- a/tfweb/src/routes/hosts/[host_id]/enroll/+page.svelte +++ b/tfweb/src/routes/hosts/[host_id]/enroll/+page.svelte @@ -68,7 +68,7 @@ return; } else { 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; return; } @@ -100,17 +100,17 @@ - {$t("common.title", {values: {title: $t("common.page.hosts")}})} + {$t("common.title", {title: $t("common.page.hosts")})} -

{$t("hosts.enroll.title", {values: {host: host.data.name}})}

+

{$t("hosts.enroll.title", {host: host.data.name})}

{$t("hosts.enroll.explainer")}

{#if loading} {:else} -

{$t("hosts.enroll.code", {values:{code: code.code, expires: code.lifetimeSeconds / 60}})}

+

{$t("hosts.enroll.code", {code: code.code, expires: code.lifetimeSeconds / 60})}

{/if} diff --git a/tfweb/src/routes/hosts/add/+page.svelte b/tfweb/src/routes/hosts/add/+page.svelte index a2e0d20..f820d10 100644 --- a/tfweb/src/routes/hosts/add/+page.svelte +++ b/tfweb/src/routes/hosts/add/+page.svelte @@ -59,7 +59,7 @@ return; } else { 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; return; } @@ -164,7 +164,7 @@ - {$t("common.title", {values: {title: $t("common.page.hosts")}})} + {$t("common.title", {title: $t("common.page.hosts")})} diff --git a/tfweb/src/routes/lighthouses/+page.svelte b/tfweb/src/routes/lighthouses/+page.svelte index a550d6f..f2f84cd 100644 --- a/tfweb/src/routes/lighthouses/+page.svelte +++ b/tfweb/src/routes/lighthouses/+page.svelte @@ -51,7 +51,7 @@ return; } else { 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; return; } @@ -68,7 +68,7 @@ - {$t("common.title", {values: {title: $t("common.page.lighthouses")}})} + {$t("common.title", {title: $t("common.page.lighthouses")})} diff --git a/tfweb/src/routes/login/+page.svelte b/tfweb/src/routes/login/+page.svelte index fca9858..7f602bb 100644 --- a/tfweb/src/routes/login/+page.svelte +++ b/tfweb/src/routes/login/+page.svelte @@ -55,7 +55,7 @@ if (err.code == "ERR_USER_DOES_NOT_EXIST") { errForm = $t('login.error.usermissing'); } 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; @@ -68,7 +68,7 @@ - {$t("common.title", {values: {title: $t("common.page.login")}})} + {$t("common.title", {title: $t("common.page.login")})} @@ -80,7 +80,7 @@

{$t('login.emailbody')}

-

{@html $t('login.emailbody2', {values:{link0:''+$t('login.emailbody2.link0')+''}})}

+

{@html $t('login.emailbody2', {link0:''+$t('login.emailbody2.link0')+''})}

{:else}

{$t('login.title')}

{$t('login.subtitle')}
@@ -99,7 +99,7 @@ {/if} -

{@html $t('login.need', {values:{link0:''+$t('login.need.link0')+''}})}

+

{@html $t('login.need', {link0:''+$t('login.need.link0')+''})}

{/if} diff --git a/tfweb/src/routes/magic-link/+page.svelte b/tfweb/src/routes/magic-link/+page.svelte index 5684231..01b73fc 100644 --- a/tfweb/src/routes/magic-link/+page.svelte +++ b/tfweb/src/routes/magic-link/+page.svelte @@ -45,7 +45,7 @@ - {$t("common.title", {values: {title: $t("common.page.login")}})} + {$t("common.title", {title: $t("common.page.login")})} diff --git a/tfweb/src/routes/networkcreate/+page.svelte b/tfweb/src/routes/networkcreate/+page.svelte index 6bfd48a..6fef866 100644 --- a/tfweb/src/routes/networkcreate/+page.svelte +++ b/tfweb/src/routes/networkcreate/+page.svelte @@ -47,7 +47,7 @@ let resp_json = await e.response.json(); if (resp_json.errors[0].code != "ERR_NO_ORG") { 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; return; } @@ -63,7 +63,7 @@ let cidr = "100.100.0.0/22"; 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); @@ -138,7 +138,7 @@ 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("."); - 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; } @@ -161,7 +161,7 @@ return; } - error = $t('networkcreate.error.generic', {values:{err:etext}}); + error = $t('networkcreate.error.generic', {err:etext}); loading = false; return; } @@ -173,7 +173,7 @@ - {$t("common.title", {values: {title: $t("common.page.networkcreate")}})} + {$t("common.title", {title: $t("common.page.networkcreate")})} diff --git a/tfweb/src/routes/relays/+page.svelte b/tfweb/src/routes/relays/+page.svelte index 2f15e96..444f3af 100644 --- a/tfweb/src/routes/relays/+page.svelte +++ b/tfweb/src/routes/relays/+page.svelte @@ -51,7 +51,7 @@ return; } else { 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; return; } @@ -68,7 +68,7 @@ - {$t("common.title", {values: {title: $t("common.page.relays")}})} + {$t("common.title", {title: $t("common.page.relays")})} diff --git a/tfweb/src/routes/roles/+page.svelte b/tfweb/src/routes/roles/+page.svelte index 898532d..ad982d2 100644 --- a/tfweb/src/routes/roles/+page.svelte +++ b/tfweb/src/routes/roles/+page.svelte @@ -53,7 +53,7 @@ return; } else { 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; return; } @@ -80,7 +80,7 @@ - {$t("common.title", {values: {title: $t("common.page.roles")}})} + {$t("common.title", {title: $t("common.page.roles")})} diff --git a/tfweb/src/routes/roles/[role_id]/delete/+page.svelte b/tfweb/src/routes/roles/[role_id]/delete/+page.svelte index 183acbe..5d13428 100644 --- a/tfweb/src/routes/roles/[role_id]/delete/+page.svelte +++ b/tfweb/src/routes/roles/[role_id]/delete/+page.svelte @@ -68,7 +68,7 @@ return; } else { 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; return; } @@ -117,12 +117,12 @@ - {$t("common.title", {values: {title: $t("common.page.roles")}})} + {$t("common.title", {title: $t("common.page.roles")})} -

{$t("roles.delete.title", {values: {rule: role.data.name}})}

+

{$t("roles.delete.title", {rule: role.data.name})}

{$t("roles.delete.explainer")}

{#if loading} diff --git a/tfweb/src/routes/roles/[role_id]/edit/+page.svelte b/tfweb/src/routes/roles/[role_id]/edit/+page.svelte index 625afab..d96f4c9 100644 --- a/tfweb/src/routes/roles/[role_id]/edit/+page.svelte +++ b/tfweb/src/routes/roles/[role_id]/edit/+page.svelte @@ -276,7 +276,7 @@ return; } else { 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; return; } @@ -346,12 +346,12 @@ - {$t("common.title", {values: {title: $t("common.page.roles")}})} + {$t("common.title", {title: $t("common.page.roles")})} -

{$t("roles.edit.title", {values: {rule: roleName}})}

+

{$t("roles.edit.title", {rule: roleName})}

diff --git a/tfweb/src/routes/roles/add/+page.svelte b/tfweb/src/routes/roles/add/+page.svelte index 29a8b14..5a28983 100644 --- a/tfweb/src/routes/roles/add/+page.svelte +++ b/tfweb/src/routes/roles/add/+page.svelte @@ -58,7 +58,7 @@ return; } else { 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; return; } @@ -306,7 +306,7 @@ - {$t("common.title", {values: {title: $t("common.page.roles")}})} + {$t("common.title", {title: $t("common.page.roles")})} diff --git a/tfweb/src/routes/signup/+page.svelte b/tfweb/src/routes/signup/+page.svelte index 0f4eff5..c425d71 100644 --- a/tfweb/src/routes/signup/+page.svelte +++ b/tfweb/src/routes/signup/+page.svelte @@ -53,9 +53,9 @@ let err = auth_result[1] as APIError; if (err.code == "ERR_USER_EXISTS") { - errForm = $t('signup.error.userexists', {values:{link0:''+$t('signup.error.userexists.link0')+''}}); + errForm = $t('signup.error.userexists', {link0:''+$t('signup.error.userexists.link0')+''}); } 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; @@ -68,7 +68,7 @@ - {$t("common.title", {values: {title: $t("common.page.signup")}})} + {$t("common.title", {title: $t("common.page.signup")})} @@ -80,7 +80,7 @@

{$t('signup.emailbody')}

-

{@html $t('signup.emailbody2', {values:{link0:''+$t('signup.emailbody2.link0')+''}})}

+

{@html $t('signup.emailbody2', {link0:''+$t('signup.emailbody2.link0')+''})}

{:else}

{$t('signup.title')}

{$t('signup.subtitle')}
@@ -100,7 +100,7 @@ {/if} -

{@html $t('signup.already', {values:{link0:''+$t('signup.already.link0')+''}})}

+

{@html $t('signup.already', {link0:''+$t('signup.already.link0')+''})}

{/if}