diff --git a/web/src/lib/i18n/en.json b/web/src/lib/i18n/en.json index 0cb9c122edab6..df69fa623cfb2 100644 --- a/web/src/lib/i18n/en.json +++ b/web/src/lib/i18n/en.json @@ -410,6 +410,7 @@ "done": "Done", "download": "Download", "downloading": "Downloading", + "duplicates": "Duplicates", "duration": "Duration", "durations": { "days": "{days, plural, one {day} other {{days, number} days}}", @@ -551,6 +552,7 @@ "hour": "Hour", "image": "Image", "immich_logo": "Immich Logo", + "immich_web_interface": "Immich Web Interface", "import_from_json": "Import from JSON", "import_path": "Import path", "in_archive": "In archive", @@ -793,6 +795,7 @@ "shared_by_you": "Shared by you", "shared_from_partner": "Photos from {partner}", "shared_links": "Shared links", + "shared_photos_and_videos_count": "{assetCount} shared photos & videos.", "shared_with_partner": "Shared with {partner}", "sharing": "Sharing", "sharing_sidebar_description": "Display a link to Sharing in the sidebar", @@ -896,6 +899,7 @@ "viewer": "Viewer", "waiting": "Waiting", "week": "Week", + "welcome": "Welcome", "welcome_to_immich": "Welcome to immich", "year": "Year", "yes": "Yes", diff --git a/web/src/routes/(user)/albums/+page.ts b/web/src/routes/(user)/albums/+page.ts index a76231485d9bc..50f3696123224 100644 --- a/web/src/routes/(user)/albums/+page.ts +++ b/web/src/routes/(user)/albums/+page.ts @@ -1,17 +1,20 @@ import { authenticate } from '$lib/utils/auth'; import { getAllAlbums } from '@immich/sdk'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async () => { await authenticate(); const sharedAlbums = await getAllAlbums({ shared: true }); const albums = await getAllAlbums({}); + const $t = get(t); return { albums, sharedAlbums, meta: { - title: 'Albums', + title: $t('albums'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/archive/[[photos=photos]]/[[assetId=id]]/+page.ts b/web/src/routes/(user)/archive/[[photos=photos]]/[[assetId=id]]/+page.ts index 0c608506c28fa..1739cc7cd0789 100644 --- a/web/src/routes/(user)/archive/[[photos=photos]]/[[assetId=id]]/+page.ts +++ b/web/src/routes/(user)/archive/[[photos=photos]]/[[assetId=id]]/+page.ts @@ -1,15 +1,18 @@ import { authenticate } from '$lib/utils/auth'; import { getAssetInfoFromParam } from '$lib/utils/navigation'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async ({ params }) => { await authenticate(); const asset = await getAssetInfoFromParam(params); + const $t = get(t); return { asset, meta: { - title: 'Archive', + title: $t('archive'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/explore/+page.ts b/web/src/routes/(user)/explore/+page.ts index 4894714a2410a..8651acfe8360d 100644 --- a/web/src/routes/(user)/explore/+page.ts +++ b/web/src/routes/(user)/explore/+page.ts @@ -1,16 +1,19 @@ import { authenticate } from '$lib/utils/auth'; import { getAllPeople, getExploreData } from '@immich/sdk'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async () => { await authenticate(); const [items, response] = await Promise.all([getExploreData(), getAllPeople({ withHidden: false })]); + const $t = get(t); return { items, response, meta: { - title: 'Explore', + title: $t('explore'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/favorites/[[photos=photos]]/[[assetId=id]]/+page.ts b/web/src/routes/(user)/favorites/[[photos=photos]]/[[assetId=id]]/+page.ts index f11e352bd980f..85266fbed7ec3 100644 --- a/web/src/routes/(user)/favorites/[[photos=photos]]/[[assetId=id]]/+page.ts +++ b/web/src/routes/(user)/favorites/[[photos=photos]]/[[assetId=id]]/+page.ts @@ -1,15 +1,18 @@ import { authenticate } from '$lib/utils/auth'; import { getAssetInfoFromParam } from '$lib/utils/navigation'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async ({ params }) => { await authenticate(); const asset = await getAssetInfoFromParam(params); + const $t = get(t); return { asset, meta: { - title: 'Favorites', + title: $t('favorites'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/map/[[photos=photos]]/[[assetId=id]]/+page.ts b/web/src/routes/(user)/map/[[photos=photos]]/[[assetId=id]]/+page.ts index 4367dd98965a8..b09a500f41218 100644 --- a/web/src/routes/(user)/map/[[photos=photos]]/[[assetId=id]]/+page.ts +++ b/web/src/routes/(user)/map/[[photos=photos]]/[[assetId=id]]/+page.ts @@ -1,15 +1,18 @@ import { authenticate } from '$lib/utils/auth'; import { getAssetInfoFromParam } from '$lib/utils/navigation'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async ({ params }) => { await authenticate(); const asset = await getAssetInfoFromParam(params); + const $t = get(t); return { asset, meta: { - title: 'Map', + title: $t('map'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/memory/[[photos=photos]]/[[assetId=id]]/+page.ts b/web/src/routes/(user)/memory/[[photos=photos]]/[[assetId=id]]/+page.ts index 2e5e8915797c1..1c127d25881e2 100644 --- a/web/src/routes/(user)/memory/[[photos=photos]]/[[assetId=id]]/+page.ts +++ b/web/src/routes/(user)/memory/[[photos=photos]]/[[assetId=id]]/+page.ts @@ -1,16 +1,19 @@ import { authenticate } from '$lib/utils/auth'; import { getAssetInfoFromParam } from '$lib/utils/navigation'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async ({ params }) => { const user = await authenticate(); const asset = await getAssetInfoFromParam(params); + const $t = get(t); return { user, asset, meta: { - title: 'Memory', + title: $t('memory'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/partners/[userId]/[[photos=photos]]/[[assetId=id]]/+page.ts b/web/src/routes/(user)/partners/[userId]/[[photos=photos]]/[[assetId=id]]/+page.ts index a01c79a93c84f..194fb53f7b574 100644 --- a/web/src/routes/(user)/partners/[userId]/[[photos=photos]]/[[assetId=id]]/+page.ts +++ b/web/src/routes/(user)/partners/[userId]/[[photos=photos]]/[[assetId=id]]/+page.ts @@ -1,6 +1,8 @@ import { authenticate } from '$lib/utils/auth'; import { getAssetInfoFromParam } from '$lib/utils/navigation'; import { getUser } from '@immich/sdk'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async ({ params }) => { @@ -8,11 +10,13 @@ export const load = (async ({ params }) => { const partner = await getUser({ id: params.userId }); const asset = await getAssetInfoFromParam(params); + const $t = get(t); + return { asset, partner, meta: { - title: 'Partner', + title: $t('partner'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/people/+page.ts b/web/src/routes/(user)/people/+page.ts index c7ac50a493247..95dfef7646364 100644 --- a/web/src/routes/(user)/people/+page.ts +++ b/web/src/routes/(user)/people/+page.ts @@ -1,15 +1,19 @@ import { authenticate } from '$lib/utils/auth'; import { getAllPeople } from '@immich/sdk'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async () => { await authenticate(); const people = await getAllPeople({ withHidden: true }); + const $t = get(t); + return { people, meta: { - title: 'People', + title: $t('people'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.ts b/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.ts index 1f9f9e26c9084..fbb2e763aaa0a 100644 --- a/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.ts +++ b/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.ts @@ -1,6 +1,8 @@ import { authenticate } from '$lib/utils/auth'; import { getAssetInfoFromParam } from '$lib/utils/navigation'; import { getPerson, getPersonStatistics } from '@immich/sdk'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async ({ params }) => { @@ -11,13 +13,14 @@ export const load = (async ({ params }) => { getPersonStatistics({ id: params.personId }), getAssetInfoFromParam(params), ]); + const $t = get(t); return { person, statistics, asset, meta: { - title: person.name || 'Person', + title: person.name || $t('person'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/photos/[[assetId=id]]/+page.ts b/web/src/routes/(user)/photos/[[assetId=id]]/+page.ts index 663e3cebba308..31373ef62138f 100644 --- a/web/src/routes/(user)/photos/[[assetId=id]]/+page.ts +++ b/web/src/routes/(user)/photos/[[assetId=id]]/+page.ts @@ -1,14 +1,18 @@ import { authenticate } from '$lib/utils/auth'; import { getAssetInfoFromParam } from '$lib/utils/navigation'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async ({ params }) => { await authenticate(); const asset = await getAssetInfoFromParam(params); + const $t = get(t); + return { asset, meta: { - title: 'Photos', + title: $t('photos'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/places/+page.ts b/web/src/routes/(user)/places/+page.ts index 1f3a15fb640a6..055a8dcae08db 100644 --- a/web/src/routes/(user)/places/+page.ts +++ b/web/src/routes/(user)/places/+page.ts @@ -1,15 +1,18 @@ import { authenticate } from '$lib/utils/auth'; import { getAssetsByCity } from '@immich/sdk'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async () => { await authenticate(); const items = await getAssetsByCity(); + const $t = get(t); return { items, meta: { - title: 'Places', + title: $t('places'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.ts b/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.ts index c0384cf38d767..c282577c8d6eb 100644 --- a/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.ts +++ b/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.ts @@ -1,14 +1,18 @@ import { authenticate } from '$lib/utils/auth'; import { getAssetInfoFromParam } from '$lib/utils/navigation'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async ({ params }) => { await authenticate(); const asset = await getAssetInfoFromParam(params); + const $t = get(t); + return { asset, meta: { - title: 'Search', + title: $t('search'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/share/[key]/[[photos=photos]]/[[assetId=id]]/+page.ts b/web/src/routes/(user)/share/[key]/[[photos=photos]]/[[assetId=id]]/+page.ts index 94969a088e097..06e9b2905e3ca 100644 --- a/web/src/routes/(user)/share/[key]/[[photos=photos]]/[[assetId=id]]/+page.ts +++ b/web/src/routes/(user)/share/[key]/[[photos=photos]]/[[assetId=id]]/+page.ts @@ -2,12 +2,15 @@ import { getAssetThumbnailUrl, setSharedLink } from '$lib/utils'; import { authenticate } from '$lib/utils/auth'; import { getAssetInfoFromParam } from '$lib/utils/navigation'; import { getMySharedLink, isHttpError } from '@immich/sdk'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async ({ params }) => { const { key } = params; await authenticate({ public: true }); const asset = await getAssetInfoFromParam(params); + const $t = get(t); try { const sharedLink = await getMySharedLink({ key }); @@ -20,8 +23,8 @@ export const load = (async ({ params }) => { asset, key, meta: { - title: sharedLink.album ? sharedLink.album.albumName : 'Public Share', - description: sharedLink.description || `${assetCount} shared photos & videos.`, + title: sharedLink.album ? sharedLink.album.albumName : $t('public_share'), + description: sharedLink.description || $t('shared_photos_and_videos_count', { values: { assetCount } }), imageUrl: assetId ? getAssetThumbnailUrl(assetId) : '/feature-panel.png', }, }; @@ -31,7 +34,7 @@ export const load = (async ({ params }) => { passwordRequired: true, sharedLinkKey: key, meta: { - title: 'Password Required', + title: $t('password_required'), }, }; } diff --git a/web/src/routes/(user)/sharing/+page.ts b/web/src/routes/(user)/sharing/+page.ts index 2fa8415e7c553..fc2d90d95e360 100644 --- a/web/src/routes/(user)/sharing/+page.ts +++ b/web/src/routes/(user)/sharing/+page.ts @@ -1,17 +1,20 @@ import { authenticate } from '$lib/utils/auth'; import { getAllAlbums, getPartners } from '@immich/sdk'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async () => { await authenticate(); const sharedAlbums = await getAllAlbums({ shared: true }); const partners = await getPartners({ direction: 'shared-with' }); + const $t = get(t); return { sharedAlbums, partners, meta: { - title: 'Sharing', + title: $t('sharing'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/sharing/sharedlinks/+page.ts b/web/src/routes/(user)/sharing/sharedlinks/+page.ts index dd07ff42f92ac..027276d538fd9 100644 --- a/web/src/routes/(user)/sharing/sharedlinks/+page.ts +++ b/web/src/routes/(user)/sharing/sharedlinks/+page.ts @@ -1,11 +1,15 @@ import { authenticate } from '$lib/utils/auth'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async () => { await authenticate(); + const $t = get(t); + return { meta: { - title: 'Shared Links', + title: $t('shared_links'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/trash/[[photos=photos]]/[[assetId=id]]/+page.ts b/web/src/routes/(user)/trash/[[photos=photos]]/[[assetId=id]]/+page.ts index 3fb1757cc1385..fe363d224054f 100644 --- a/web/src/routes/(user)/trash/[[photos=photos]]/[[assetId=id]]/+page.ts +++ b/web/src/routes/(user)/trash/[[photos=photos]]/[[assetId=id]]/+page.ts @@ -1,14 +1,18 @@ import { authenticate } from '$lib/utils/auth'; import { getAssetInfoFromParam } from '$lib/utils/navigation'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async ({ params }) => { await authenticate(); const asset = await getAssetInfoFromParam(params); + const $t = get(t); + return { asset, meta: { - title: 'Trash', + title: $t('trash'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/utilities/+page.ts b/web/src/routes/(user)/utilities/+page.ts index 1a62d6ec3f22b..23e3fc450df93 100644 --- a/web/src/routes/(user)/utilities/+page.ts +++ b/web/src/routes/(user)/utilities/+page.ts @@ -1,15 +1,18 @@ import { authenticate } from '$lib/utils/auth'; import { getAssetInfoFromParam } from '$lib/utils/navigation'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async ({ params }) => { await authenticate(); const asset = await getAssetInfoFromParam(params); + const $t = get(t); return { asset, meta: { - title: 'Utilities', + title: $t('utilities'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/(user)/utilities/[duplicates]/[[photos=photos]]/[[assetId=id]]/+page.ts b/web/src/routes/(user)/utilities/[duplicates]/[[photos=photos]]/[[assetId=id]]/+page.ts index 67c33b85fd8be..9968b73d9073a 100644 --- a/web/src/routes/(user)/utilities/[duplicates]/[[photos=photos]]/[[assetId=id]]/+page.ts +++ b/web/src/routes/(user)/utilities/[duplicates]/[[photos=photos]]/[[assetId=id]]/+page.ts @@ -1,18 +1,21 @@ import { authenticate } from '$lib/utils/auth'; import { getAssetInfoFromParam } from '$lib/utils/navigation'; import { getAssetDuplicates } from '@immich/sdk'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import type { PageLoad } from './$types'; export const load = (async ({ params }) => { await authenticate(); const asset = await getAssetInfoFromParam(params); const duplicates = await getAssetDuplicates(); + const $t = get(t); return { asset, duplicates, meta: { - title: 'Duplicates', + title: $t('duplicates'), }, }; }) satisfies PageLoad; diff --git a/web/src/routes/+page.ts b/web/src/routes/+page.ts index 3f66cc9f41ea5..ed10f6020bb8e 100644 --- a/web/src/routes/+page.ts +++ b/web/src/routes/+page.ts @@ -1,6 +1,8 @@ import { AppRoute } from '$lib/constants'; import { getServerConfig } from '@immich/sdk'; import { redirect } from '@sveltejs/kit'; +import { t } from 'svelte-i18n'; +import { get } from 'svelte/store'; import { loadUser } from '../lib/utils/auth'; import type { PageLoad } from './$types'; @@ -19,10 +21,12 @@ export const load = (async () => { redirect(302, AppRoute.AUTH_LOGIN); } + const $t = get(t); + return { meta: { - title: 'Welcome 🎉', - description: 'Immich Web Interface', + title: $t('welcome') + ' 🎉', + description: $t('immich_web_interface'), }, }; }) satisfies PageLoad;