diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.json index 6830a22c..f727cbf5 100644 --- a/src/lib/i18n/en.json +++ b/src/lib/i18n/en.json @@ -44,7 +44,8 @@ "addGuest": "Add Guest", "moveUp": "Move Up", "moveDown": "Move Down", - "guest": "Guest" + "guest": "Guest", + "versionGate": "This version of Photon supports instances running {{version}} or higher." }, "filter": { "location": { @@ -92,6 +93,7 @@ }, "form": { "username": "Username", + "name": "Name", "instance": "Instance URL", "password": "Password", "2fa": "2FA Code", diff --git a/src/routes/login/+page.svelte b/src/routes/login/+page.svelte index 77f49273..82df9e8e 100644 --- a/src/routes/login/+page.svelte +++ b/src/routes/login/+page.svelte @@ -18,6 +18,8 @@ } from 'svelte-hero-icons' import { DOMAIN_REGEX_FORMS } from '$lib/util.js' import { MINIMUM_VERSION } from '$lib/version.js' + import { t } from '$lib/translations' + import Header from '$lib/components/ui/layout/pages/Header.svelte' let data = { instance: DEFAULT_INSTANCE_URL, @@ -69,14 +71,13 @@
-

Log In

+
{$t('account.login')}
{#if $site && mayBeIncompatible(MINIMUM_VERSION, $site.version.replace('v', ''))} - This version of Photon supports instances running - - v{MINIMUM_VERSION} - - or higher. + {$t('account.versionGate', { + //@ts-ignore + version: `v${MINIMUM_VERSION}`, + })} {/if}
@@ -84,14 +85,14 @@ {#if !LINKED_INSTANCE_URL} - Log In + {$t('account.login')}
diff --git a/src/routes/login/guest/+page.svelte b/src/routes/login/guest/+page.svelte index 4c0178f8..3d0b62a5 100644 --- a/src/routes/login/guest/+page.svelte +++ b/src/routes/login/guest/+page.svelte @@ -7,10 +7,12 @@ import { profile, profileData, type Profile } from '$lib/auth' import { LINKED_INSTANCE_URL } from '$lib/instance' import { goto } from '$app/navigation' + import { t } from '$lib/translations' + import Header from '$lib/components/ui/layout/pages/Header.svelte' let form = { instance: '', - username: `Guest ${$profileData.profiles.filter((p) => p.jwt == undefined).length + 1}`, + username: `${$t('account.guest')} ${$profileData.profiles.filter((p) => p.jwt == undefined).length + 1}`, loading: false, } @@ -53,21 +55,20 @@
-

Add Guest

+
{$t('account.addGuest')}
{#if $site && mayBeIncompatible(MINIMUM_VERSION, $site.version.replace('v', ''))} - This version of Photon supports instances running - - v{MINIMUM_VERSION} - - or higher. + {$t('account.versionGate', { + //@ts-ignore + version: `v${MINIMUM_VERSION}`, + })} {/if}
- Submit + {$t('form.submit')}