mirror of
https://github.com/immich-app/yucca.git
synced 2026-09-30 13:33:00 +08:00
feat(yucca sdk): move lingui to orchestration-ui
This commit is contained in:
+1
-1
@@ -77,7 +77,7 @@ run = [{ tasks = ["lint", "lint:go", "*:check"] }, { task = "format" }, { task =
|
||||
|
||||
[tasks.fix]
|
||||
description = "Run all possible code fixes"
|
||||
run = [{ task = "*:fix" }, { task = "web:lingui" }]
|
||||
run = [{ task = "*:fix" }, { task = "yucca-sdk:orchestration-ui:lingui" }]
|
||||
|
||||
[tasks."o11y:render"]
|
||||
description = "Render the o11y bundle"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#MISE description="Build web"
|
||||
#MISE depends=["yucca-api-client:build", "web:lingui", "yucca-sdk:orchestration-ui:build"]
|
||||
#MISE depends=["yucca-api-client:build", "yucca-sdk:orchestration-ui:build"]
|
||||
set -e
|
||||
|
||||
NODE_ENV=production pnpm --filter web build
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#MISE description="Run web in development mode"
|
||||
#MISE depends=["yucca-api-client:build", "common:build", "web:lingui:compile", "yucca-sdk:orchestration-ui:build"]
|
||||
#MISE depends=["yucca-api-client:build", "common:build", "yucca-sdk:orchestration-ui:build"]
|
||||
set -e
|
||||
source "$(dirname "$0")/../yucca-api/env"
|
||||
export WEB_PORT=${WEB_PORT:-36033}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#MISE description="Extract and compile i18n catalogs"
|
||||
mise web:lingui:extract
|
||||
mise web:lingui:compile
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#MISE description="Ensure i18n catalogs are up to date"
|
||||
#MISE depends=["web:lingui"]
|
||||
set -e
|
||||
|
||||
git status --porcelain -- "web/src/locales" | grep -q . && exit 1 || exit 0
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#MISE description="Run Svelte checks for yucca-sdk/orchestration-ui"
|
||||
#MISE depends=["yucca-sdk:orchestration-ui:lingui:compile"]
|
||||
set -e
|
||||
|
||||
pnpm --filter @futo-org/backups-orchestrator-ui check
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#MISE description="Run yucca-sdk/orchestration-ui in development mode"
|
||||
#MISE depends=["yucca-sdk:orchestration-ui:generate-fetch-client"]
|
||||
#MISE depends=["yucca-sdk:orchestration-ui:generate-fetch-client", "yucca-sdk:orchestration-ui:lingui:compile"]
|
||||
set -e
|
||||
export ORCHESTRATOR_WEB_PORT=${ORCHESTRATOR_WEB_PORT:-36066}
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#MISE description="Extract and compile i18n catalogs"
|
||||
mise yucca-sdk:orchestration-ui:lingui:extract
|
||||
mise yucca-sdk:orchestration-ui:lingui:compile
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#MISE description="Ensure i18n catalogs are up to date"
|
||||
#MISE depends=["yucca-sdk:orchestration-ui:lingui"]
|
||||
set -e
|
||||
|
||||
git status --porcelain -- "packages/yucca-sdk/orchestration-ui/src/lib/locales" | grep -q . && exit 1 || exit 0
|
||||
+1
-1
@@ -2,4 +2,4 @@
|
||||
#MISE description="Compile i18n catalogs"
|
||||
set -e
|
||||
|
||||
pnpm --filter web lingui:compile
|
||||
pnpm --filter @futo-org/backups-orchestrator-ui lingui:compile
|
||||
+1
-1
@@ -2,4 +2,4 @@
|
||||
#MISE description="Extract i18n catalog from source code"
|
||||
set -e
|
||||
|
||||
pnpm --filter web lingui:extract
|
||||
pnpm --filter @futo-org/backups-orchestrator-ui lingui:extract
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#MISE description="Run unit tests for yucca-sdk/orchestration-ui"
|
||||
#MISE depends=["yucca-sdk:orchestration-ui:lingui:compile"]
|
||||
set -e
|
||||
|
||||
pnpm --filter @futo-org/backups-orchestrator-ui test:unit "$@"
|
||||
|
||||
@@ -117,7 +117,8 @@ Zod-validated `env.ts`, JWT auth guards via `@AuthRoute()`, OTel from `@common/s
|
||||
| `emails` (`@common/emails`) | Svelte lib | Transactional email templates (better-svelte-email, web theme), prebuilt to JS for the NestJS apps. See `docs/email.md`. |
|
||||
|
||||
**Frontend** (`packages/web`): SvelteKit 5 + Tailwind 4, `@immich/ui`, lingui i18n
|
||||
(`mise web:lingui:*`; compiled locales are generated, not edited), generated API client.
|
||||
(catalogue owned by orchestration-ui, one `.po` per language shared with the SDK: `mise yucca-sdk:orchestration-ui:lingui:*`;
|
||||
compiled locales are generated, not edited), generated API client.
|
||||
**Docs** (`packages/docs`, https://docs.futo.cloud): the **end-user** documentation site (beta setup
|
||||
guides for Immich and the standalone container). SvelteKit + `adapter-static`; every page is a
|
||||
`src/routes/<section>/<slug>/+page.md` compiled by `@immich/svelte-markdown-preprocess` (front matter
|
||||
@@ -191,7 +192,7 @@ staging → prod is promoted by merging the release-please PR (stamps both prod
|
||||
detail; neither the PR body nor the commit message restates it.
|
||||
- ESLint is strict on promises (`no-floating-promises`, `no-misused-promises`, `require-await`,
|
||||
`await-thenable` are errors). Prettier: single quotes, trailing commas, width 120.
|
||||
- Generated files are eslint-ignored: `**/fetch-client.ts`, `packages/web/src/locales`, `dist`,
|
||||
- Generated files are eslint-ignored: `**/fetch-client.ts`, `packages/yucca-sdk/orchestration-ui/src/lib/locales`, `dist`,
|
||||
`build`, `.svelte-kit`.
|
||||
- **Match the package you are in.** Read the surrounding code first; write code that looks like
|
||||
what is already there, not your own conventions. (And remember the life-or-death rule at the
|
||||
|
||||
@@ -179,7 +179,6 @@ docker_build(
|
||||
run('cd /app && pnpm --filter @common/server build', trigger=['./packages/common/src']),
|
||||
run('cd /app && pnpm --filter @futo-org/backups-api-client build', trigger=['./packages/yucca-api-client/src']),
|
||||
run('cd /app && pnpm --filter @futo-org/backups-orchestrator-ui build', trigger=['./packages/yucca-sdk/orchestration-ui/src']),
|
||||
run('cd /app && pnpm --filter web lingui:compile', trigger=['./packages/web/src/locales']),
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ export default typescriptEslint.config([
|
||||
'packages/**/build',
|
||||
'**/.svelte-kit',
|
||||
'**/fetch-client.ts',
|
||||
'packages/web/src/locales',
|
||||
'packages/yucca-sdk/orchestration-ui/src/lib/locales',
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -23,5 +23,3 @@ Thumbs.db
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
|
||||
# Lingui
|
||||
src/locales/*.ts
|
||||
|
||||
@@ -45,8 +45,7 @@ COPY . ./
|
||||
# filter silently matches nothing (pnpm exits 0), leaving web's SSR deps unbuilt.
|
||||
RUN pnpm --filter @common/server build && \
|
||||
pnpm --filter @futo-org/backups-api-client build && \
|
||||
pnpm --filter @futo-org/backups-orchestrator-ui build && \
|
||||
pnpm --filter web lingui:compile
|
||||
pnpm --filter @futo-org/backups-orchestrator-ui build
|
||||
|
||||
EXPOSE 5173
|
||||
CMD ["pnpm", "--filter", "web", "dev", "--host", "0.0.0.0"]
|
||||
|
||||
@@ -16,12 +16,9 @@
|
||||
"test:unit": "vitest run",
|
||||
"test": "npm run test:unit -- --run && npm run test:e2e",
|
||||
"test:e2e": "playwright test",
|
||||
"test:e2e:create": "playwright codegen http://localhost:36033",
|
||||
"lingui:extract": "lingui extract",
|
||||
"lingui:compile": "lingui compile --typescript"
|
||||
"test:e2e:create": "playwright codegen http://localhost:36033"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lingui/cli": "catalog:",
|
||||
"@playwright/test": "catalog:",
|
||||
"@sveltejs/adapter-node": "catalog:",
|
||||
"@sveltejs/kit": "catalog:",
|
||||
|
||||
@@ -1,363 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2026-01-21 14:47+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: @lingui/cli\n"
|
||||
"Language: test\n"
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#~ msgid "{0} objects"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
msgid "{0} repositories"
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/+page.svelte
|
||||
#~ msgid "{num, plural, one {# item} other {# items}}"
|
||||
#~ msgstr "{num, plural, one {# hello} other {# hellos}}"
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
msgid "@{0}, you're invited to the FUTO Backups beta. Sign in to join."
|
||||
msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "1 year"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "30 days"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "90 days"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#~ msgid "A connection is a client that backs up this account — an Immich instance or a restic repository."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "A label for this repository."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "Access key"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "Access key lifetime"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "Access key revoked"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#~ msgid "Access keys"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "Access keys — {0}"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "Access keys: {0}"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#~ msgid "Add {0} connection"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/NewConnectionModal.svelte
|
||||
#~ msgid "Automatic"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
msgid "billed"
|
||||
msgstr ""
|
||||
|
||||
#: src/lib/components/connections/NewConnectionModal.svelte
|
||||
#~ msgid "Cancel"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "Choose a strong repository password"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "Close"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
msgid "Connections"
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#~ msgid "Connections are the sources of data that back up to us — right now, that's mostly Immich."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
msgid "Connections are the sources of data that back up to us. Right now, that's mostly Immich."
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
msgid "Continue"
|
||||
msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "Copied"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "Copied to clipboard"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "Copy"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "Copy command"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "Copy URL"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "Couldn't copy — select the text manually"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "Couldn't copy. Select the text manually"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "Create"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/dashboard/backups/+page.svelte
|
||||
#~ msgid "Create new backup"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "Created {0} · expires {1}"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
msgid "Discord account linked. You can head back to Discord."
|
||||
msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "Done"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "e.g. laptop"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "e.g. my laptop"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
msgid "Enter an invite code to continue."
|
||||
msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "Expired"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "Failed to create restic backup"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "Failed to load access keys"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "Failed to mint a new access key"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "Failed to revoke access key"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/+page.svelte
|
||||
#~ msgid "From the {0}: {1}"
|
||||
#~ msgstr "{0}! {1}?"
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "How long the URL stays valid (max 1 year). Revoke the key any time to end access sooner."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "How long the URL stays valid, e.g. 90d. Blank uses the default."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "How long the URL stays valid. \"No expiry\" relies on revoking the key instead."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "Initialize the repository"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
msgid "Invite code"
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
msgid "Join the beta"
|
||||
msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "Key label"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
msgid "Link account"
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
msgid "Link Discord"
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
msgid "Link Discord account @{0} to {1}?"
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
msgid "Log in to link your Discord account."
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/+page.svelte
|
||||
#: src/routes/+page.svelte
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
msgid "Login"
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/dashboard/+layout.svelte
|
||||
msgid "Logout"
|
||||
msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "Name"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "New access key"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/NewConnectionModal.svelte
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#~ msgid "New connection"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#~ msgid "New restic backup"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "New restic repository"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "No access keys yet."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#~ msgid "No connections yet."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "No expiry"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/NewConnectionModal.svelte
|
||||
#~ msgid "Pick what you want to back up. Each connection type works a little differently."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "Prevent this repository from being deleted or overwritten."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/+page.svelte
|
||||
#~ msgid "Purchase Immich"
|
||||
#~ msgstr "Hello Immich"
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "Repository"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "Repository URL"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "Restic backup ready"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "restic will ask you to set a password when you initialize. Keep it safe — it encrypts your backups and cannot be recovered."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ResticResultModal.svelte
|
||||
#~ msgid "restic will ask you to set a password when you initialize. Keep it safe: it encrypts your backups and cannot be recovered."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "Revoke"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/ManageTokensModal.svelte
|
||||
#~ msgid "Revoked"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "Shown in the access-key list."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/lib/components/connections/NewConnectionModal.svelte
|
||||
#~ msgid "This connection type can't be added from here — see the note above."
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
msgid "This invite link has expired. Go back to Discord and claim it again to get a fresh one."
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
msgid "This link is invalid or has expired. Click the support button in Discord to get a new one."
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
msgid "Unable to link your Discord account."
|
||||
msgstr ""
|
||||
|
||||
#: src/lib/components/connections/CreateResticModal.svelte
|
||||
#~ msgid "Write-once (WORM)"
|
||||
#~ msgstr ""
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
msgid "Your email isn't part of the beta yet."
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/+page.svelte
|
||||
#~ msgid "yucca API"
|
||||
#~ msgstr "the API"
|
||||
@@ -1,30 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2026-01-21 15:06+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: @lingui/cli\n"
|
||||
"Language: test\n"
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#: src/routes/+page.svelte:40
|
||||
msgid "{num, plural, one {# item} other {# items}}"
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/+page.svelte:37
|
||||
msgid "From the {0}: {1}"
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/+page.svelte:33
|
||||
msgid "Purchase Immich"
|
||||
msgstr ""
|
||||
|
||||
#: src/routes/+page.svelte:37
|
||||
msgid "yucca API"
|
||||
msgstr ""
|
||||
@@ -3,10 +3,12 @@
|
||||
import favicon from "$lib/assets/favicon.svg";
|
||||
|
||||
import { locale } from "svelte-i18n-lingui";
|
||||
import { messages } from "../locales/en";
|
||||
import { YuccaContext } from "@futo-org/backups-orchestrator-ui";
|
||||
import {
|
||||
defaultMessages,
|
||||
YuccaContext,
|
||||
} from "@futo-org/backups-orchestrator-ui";
|
||||
|
||||
locale.set("en", messages);
|
||||
locale.set("en", defaultMessages);
|
||||
|
||||
const { children } = $props();
|
||||
</script>
|
||||
|
||||
@@ -23,3 +23,6 @@ Thumbs.db
|
||||
# Vite
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
|
||||
# Lingui
|
||||
src/lib/locales/*.ts
|
||||
|
||||
+4
-3
@@ -1,12 +1,13 @@
|
||||
import { jstsExtractor, svelteExtractor } from 'svelte-i18n-lingui/extractor';
|
||||
|
||||
export default {
|
||||
locales: ['en', 'ja'],
|
||||
locales: ['en', 'en-XA'],
|
||||
pseudoLocale: 'en-XA',
|
||||
sourceLocale: 'en',
|
||||
catalogs: [
|
||||
{
|
||||
path: 'src/locales/{locale}',
|
||||
include: ['src/lib', 'src/routes'],
|
||||
path: 'src/lib/locales/{locale}',
|
||||
include: ['src/lib', '../../web/src/lib', '../../web/src/routes'],
|
||||
},
|
||||
],
|
||||
formatOptions: {
|
||||
@@ -6,7 +6,7 @@
|
||||
"license": "Source First License 1.1",
|
||||
"scripts": {
|
||||
"dev": "vite dev --port 5174",
|
||||
"build": "vite build && npm run prepack",
|
||||
"build": "npm run lingui:compile && vite build && npm run prepack",
|
||||
"preview": "vite preview --port 4174",
|
||||
"prepare": "svelte-kit sync || echo ''",
|
||||
"prepack": "svelte-kit sync && svelte-package && publint",
|
||||
@@ -16,7 +16,9 @@
|
||||
"test": "npm run test:unit && npm run test:e2e",
|
||||
"test:e2e": "playwright test",
|
||||
"test:e2e:create": "playwright codegen http://localhost:36066",
|
||||
"generate:fetch-client": "oazapfts --optimistic ../orchestration-api/openapi-specs.json src/lib/fetch-client.ts"
|
||||
"generate:fetch-client": "oazapfts --optimistic ../orchestration-api/openapi-specs.json src/lib/fetch-client.ts",
|
||||
"lingui:extract": "lingui extract",
|
||||
"lingui:compile": "lingui compile --typescript"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
@@ -40,9 +42,13 @@
|
||||
}
|
||||
},
|
||||
"peerDependencies": {
|
||||
"svelte": "^5.0.0"
|
||||
"@lingui/core": "^5.8.0",
|
||||
"svelte": "^5.0.0",
|
||||
"svelte-i18n-lingui": "^0.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lingui/cli": "catalog:",
|
||||
"@lingui/core": "catalog:",
|
||||
"@playwright/test": "catalog:",
|
||||
"@sveltejs/adapter-auto": "catalog:",
|
||||
"@sveltejs/kit": "catalog:",
|
||||
@@ -59,6 +65,7 @@
|
||||
"publint": "catalog:",
|
||||
"svelte": "catalog:",
|
||||
"svelte-check": "catalog:",
|
||||
"svelte-i18n-lingui": "catalog:",
|
||||
"tailwindcss": "catalog:",
|
||||
"typescript": "catalog:",
|
||||
"vite": "catalog:",
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { defaultMessages, loadMessages } from '$lib/i18n';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
describe('loadMessages', () => {
|
||||
it('falls back to English for a language without a catalogue', async () => {
|
||||
const messages = await loadMessages('xx');
|
||||
expect(messages).toBe(defaultMessages);
|
||||
});
|
||||
|
||||
it('loads the catalogue for a supported language', async () => {
|
||||
const messages = await loadMessages('en-XA');
|
||||
expect(messages).not.toBe(defaultMessages);
|
||||
expect(Object.keys(messages)).toEqual(Object.keys(defaultMessages));
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
import type { Messages } from '@lingui/core';
|
||||
import { messages as defaultMessages } from './locales/en';
|
||||
|
||||
export { messages as defaultMessages } from './locales/en';
|
||||
|
||||
const loaders: Record<string, () => Promise<{ messages: Messages }>> = {
|
||||
'en-XA': () => import('./locales/en-XA'),
|
||||
};
|
||||
|
||||
export const loadMessages = async (lang: string): Promise<Messages> => {
|
||||
const loader = loaders[lang];
|
||||
if (!loader) {
|
||||
return defaultMessages;
|
||||
}
|
||||
|
||||
const { messages } = await loader();
|
||||
return messages;
|
||||
};
|
||||
@@ -39,3 +39,4 @@ export * from './services/task.service';
|
||||
|
||||
export { events, SocketEvent } from './events';
|
||||
export { queryClient } from './query-client';
|
||||
export { defaultMessages, loadMessages } from './i18n';
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"POT-Creation-Date: 2026-09-29 12:28+0100\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: @lingui/cli\n"
|
||||
"Language: en-XA\n"
|
||||
|
||||
#: ../../web/src/routes/dashboard/connections/+page.svelte
|
||||
msgid "{0} repositories"
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "@{0}, you're invited to the FUTO Backups beta. Sign in to join."
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/dashboard/connections/+page.svelte
|
||||
msgid "billed"
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/dashboard/connections/+page.svelte
|
||||
#: ../../web/src/routes/dashboard/connections/+page.svelte
|
||||
msgid "Connections"
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/dashboard/connections/+page.svelte
|
||||
msgid "Connections are the sources of data that back up to us. Right now, that's mostly Immich."
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "Continue"
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Discord account linked. You can head back to Discord."
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "Enter an invite code to continue."
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "Invite code"
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "Join the beta"
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Link account"
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Link Discord"
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Link Discord account @{0} to {1}?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Log in to link your Discord account."
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/+page.svelte
|
||||
#: ../../web/src/routes/+page.svelte
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Login"
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/dashboard/+layout.svelte
|
||||
msgid "Logout"
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "This invite link has expired. Go back to Discord and claim it again to get a fresh one."
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "This link is invalid or has expired. Click the support button in Discord to get a new one."
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Unable to link your Discord account."
|
||||
msgstr ""
|
||||
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "Your email isn't part of the beta yet."
|
||||
msgstr ""
|
||||
+25
-25
@@ -17,7 +17,7 @@ msgstr ""
|
||||
#~ msgid "{0} objects"
|
||||
#~ msgstr "{0} objects"
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#: ../../web/src/routes/dashboard/connections/+page.svelte
|
||||
msgid "{0} repositories"
|
||||
msgstr "{0} repositories"
|
||||
|
||||
@@ -25,7 +25,7 @@ msgstr "{0} repositories"
|
||||
#~ msgid "{num, plural, one {# item} other {# items}}"
|
||||
#~ msgstr "{num, plural, one {# item} other {# items}}"
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "@{0}, you're invited to the FUTO Backups beta. Sign in to join."
|
||||
msgstr "@{0}, you're invited to the FUTO Backups beta. Sign in to join."
|
||||
|
||||
@@ -81,7 +81,7 @@ msgstr "@{0}, you're invited to the FUTO Backups beta. Sign in to join."
|
||||
#~ msgid "Automatic"
|
||||
#~ msgstr "Automatic"
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#: ../../web/src/routes/dashboard/connections/+page.svelte
|
||||
msgid "billed"
|
||||
msgstr "billed"
|
||||
|
||||
@@ -97,8 +97,8 @@ msgstr "billed"
|
||||
#~ msgid "Close"
|
||||
#~ msgstr "Close"
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#: ../../web/src/routes/dashboard/connections/+page.svelte
|
||||
#: ../../web/src/routes/dashboard/connections/+page.svelte
|
||||
msgid "Connections"
|
||||
msgstr "Connections"
|
||||
|
||||
@@ -106,11 +106,11 @@ msgstr "Connections"
|
||||
#~ msgid "Connections are the sources of data that back up to us — right now, that's mostly Immich."
|
||||
#~ msgstr "Connections are the sources of data that back up to us — right now, that's mostly Immich."
|
||||
|
||||
#: src/routes/dashboard/connections/+page.svelte
|
||||
#: ../../web/src/routes/dashboard/connections/+page.svelte
|
||||
msgid "Connections are the sources of data that back up to us. Right now, that's mostly Immich."
|
||||
msgstr "Connections are the sources of data that back up to us. Right now, that's mostly Immich."
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "Continue"
|
||||
msgstr "Continue"
|
||||
|
||||
@@ -156,7 +156,7 @@ msgstr "Continue"
|
||||
#~ msgid "Created {0} · expires {1}"
|
||||
#~ msgstr "Created {0} · expires {1}"
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Discord account linked. You can head back to Discord."
|
||||
msgstr "Discord account linked. You can head back to Discord."
|
||||
|
||||
@@ -172,7 +172,7 @@ msgstr "Discord account linked. You can head back to Discord."
|
||||
#~ msgid "e.g. my laptop"
|
||||
#~ msgstr "e.g. my laptop"
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "Enter an invite code to continue."
|
||||
msgstr "Enter an invite code to continue."
|
||||
|
||||
@@ -216,13 +216,13 @@ msgstr "Enter an invite code to continue."
|
||||
#~ msgid "Initialize the repository"
|
||||
#~ msgstr "Initialize the repository"
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "Invite code"
|
||||
msgstr "Invite code"
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "Join the beta"
|
||||
msgstr "Join the beta"
|
||||
|
||||
@@ -230,29 +230,29 @@ msgstr "Join the beta"
|
||||
#~ msgid "Key label"
|
||||
#~ msgstr "Key label"
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Link account"
|
||||
msgstr "Link account"
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Link Discord"
|
||||
msgstr "Link Discord"
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Link Discord account @{0} to {1}?"
|
||||
msgstr "Link Discord account @{0} to {1}?"
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Log in to link your Discord account."
|
||||
msgstr "Log in to link your Discord account."
|
||||
|
||||
#: src/routes/+page.svelte
|
||||
#: src/routes/+page.svelte
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
#: ../../web/src/routes/+page.svelte
|
||||
#: ../../web/src/routes/+page.svelte
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Login"
|
||||
msgstr "Login"
|
||||
|
||||
#: src/routes/dashboard/+layout.svelte
|
||||
#: ../../web/src/routes/dashboard/+layout.svelte
|
||||
msgid "Logout"
|
||||
msgstr "Logout"
|
||||
|
||||
@@ -338,15 +338,15 @@ msgstr "Logout"
|
||||
#~ msgid "This connection type can't be added from here — see the note above."
|
||||
#~ msgstr "This connection type can't be added from here — see the note above."
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "This invite link has expired. Go back to Discord and claim it again to get a fresh one."
|
||||
msgstr "This invite link has expired. Go back to Discord and claim it again to get a fresh one."
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "This link is invalid or has expired. Click the support button in Discord to get a new one."
|
||||
msgstr "This link is invalid or has expired. Click the support button in Discord to get a new one."
|
||||
|
||||
#: src/routes/link/discord/+page.svelte
|
||||
#: ../../web/src/routes/link/discord/+page.svelte
|
||||
msgid "Unable to link your Discord account."
|
||||
msgstr "Unable to link your Discord account."
|
||||
|
||||
@@ -354,7 +354,7 @@ msgstr "Unable to link your Discord account."
|
||||
#~ msgid "Write-once (WORM)"
|
||||
#~ msgstr "Write-once (WORM)"
|
||||
|
||||
#: src/routes/login/invite/+page.svelte
|
||||
#: ../../web/src/routes/login/invite/+page.svelte
|
||||
msgid "Your email isn't part of the beta yet."
|
||||
msgstr "Your email isn't part of the beta yet."
|
||||
|
||||
Generated
+9
-3
@@ -823,9 +823,6 @@ importers:
|
||||
specifier: 'catalog:'
|
||||
version: 0.2.2(@lingui/cli@5.8.0(typescript@5.9.3))(@lingui/core@5.8.0(@lingui/babel-plugin-lingui-macro@5.8.0(typescript@5.9.3)))(svelte@5.56.9(@typescript-eslint/types@8.52.0))(typescript@5.9.3)
|
||||
devDependencies:
|
||||
'@lingui/cli':
|
||||
specifier: 'catalog:'
|
||||
version: 5.8.0(typescript@5.9.3)
|
||||
'@playwright/test':
|
||||
specifier: 'catalog:'
|
||||
version: 1.59.1
|
||||
@@ -1381,6 +1378,12 @@ importers:
|
||||
specifier: 'catalog:'
|
||||
version: 4.8.3
|
||||
devDependencies:
|
||||
'@lingui/cli':
|
||||
specifier: 'catalog:'
|
||||
version: 5.8.0(typescript@5.9.3)
|
||||
'@lingui/core':
|
||||
specifier: 'catalog:'
|
||||
version: 5.8.0(@lingui/babel-plugin-lingui-macro@5.8.0(typescript@5.9.3))
|
||||
'@playwright/test':
|
||||
specifier: 'catalog:'
|
||||
version: 1.59.1
|
||||
@@ -1429,6 +1432,9 @@ importers:
|
||||
svelte-check:
|
||||
specifier: 'catalog:'
|
||||
version: 4.3.5(picomatch@4.0.7)(svelte@5.56.9(@typescript-eslint/types@8.52.0))(typescript@5.9.3)
|
||||
svelte-i18n-lingui:
|
||||
specifier: 'catalog:'
|
||||
version: 0.2.2(@lingui/cli@5.8.0(typescript@5.9.3))(@lingui/core@5.8.0(@lingui/babel-plugin-lingui-macro@5.8.0(typescript@5.9.3)))(svelte@5.56.9(@typescript-eslint/types@8.52.0))(typescript@5.9.3)
|
||||
tailwindcss:
|
||||
specifier: 'catalog:'
|
||||
version: 4.3.3
|
||||
|
||||
Reference in New Issue
Block a user