From d9abb6f06a5ea5a728456c882a0d782e33c35b10 Mon Sep 17 00:00:00 2001 From: dfliess Date: Mon, 3 Aug 2026 12:42:37 +0200 Subject: [PATCH] i18n: migrate personal dashboards and the env notice to message catalogs The personal-files feature and the environment-variables notice in the edit layout still rendered hardcoded English. Move all 26 strings into the en/es catalogs so they follow the selected locale like the rest of the UI. --- .../personal-files/SharePersonalFile.svelte | 17 ++++++--- .../canvas/CreatePersonalCanvasDialog.svelte | 37 ++++++++++++------- .../canvas/PersonalCanvasesList.svelte | 11 ++++-- .../[project]/-/edit/+layout.svelte | 6 ++- web-common/src/lib/i18n/messages/en.json | 26 +++++++++++++ web-common/src/lib/i18n/messages/es.json | 26 +++++++++++++ 6 files changed, 97 insertions(+), 26 deletions(-) diff --git a/web-admin/src/features/personal-files/SharePersonalFile.svelte b/web-admin/src/features/personal-files/SharePersonalFile.svelte index b6c90c308369..1fb9df5812b0 100644 --- a/web-admin/src/features/personal-files/SharePersonalFile.svelte +++ b/web-admin/src/features/personal-files/SharePersonalFile.svelte @@ -7,6 +7,7 @@ import { fileArtifacts } from "@rilldata/web-common/features/entity-management/file-artifacts.ts"; import { addLeadingSlash } from "@rilldata/web-common/features/entity-management/entity-mappers.ts"; import { eventBus } from "@rilldata/web-common/lib/event-bus/event-bus.ts"; + import { m } from "@rilldata/web-common/lib/i18n/gen/messages"; let { organization, @@ -56,7 +57,9 @@ eventBus.emit("notification", { type: "success", - message: `Dashboard ${share ? "shared" : "hidden"} successfully`, + message: share + ? m.personal_files_share_shared_notification() + : m.personal_files_share_hidden_notification(), }); } catch (e) { console.error("Error sharing dashboard:", e); @@ -77,18 +80,18 @@ selected={open} loading={isPending} > - Share + {m.personal_files_share_button()} - Share dashboard + {m.personal_files_share_tooltip()} {/snippet} {#if shared} - This dashboard is shared with all users in the project. + {m.personal_files_share_shared_message()} {:else} - Share this dashboard with other users in the project? + {m.personal_files_share_prompt()} {/if}
@@ -99,7 +102,9 @@ {loading} disabled={loading} > - {shared ? "Hide" : "Share"} + {shared + ? m.personal_files_share_hide_button() + : m.personal_files_share_button()}
diff --git a/web-admin/src/features/personal-files/canvas/CreatePersonalCanvasDialog.svelte b/web-admin/src/features/personal-files/canvas/CreatePersonalCanvasDialog.svelte index 5ff409afdbbb..7f9e5962a7ab 100644 --- a/web-admin/src/features/personal-files/canvas/CreatePersonalCanvasDialog.svelte +++ b/web-admin/src/features/personal-files/canvas/CreatePersonalCanvasDialog.svelte @@ -22,6 +22,7 @@ import { setCanvasMode } from "@rilldata/web-admin/features/personal-files/canvas/mode-utils.ts"; import Switch from "@rilldata/web-common/components/forms/Switch.svelte"; import Label from "@rilldata/web-common/components/forms/Label.svelte"; + import { m } from "@rilldata/web-common/lib/i18n/gen/messages"; let { org, @@ -54,11 +55,12 @@ const schema = yup( object({ - name: string().trim().required("Name is required"), + name: string().trim().required(m.personal_files_create_name_required()), copy: boolean(), copySource: string().when("copy", { is: true, - then: (schema) => schema.required("Copy source is required"), + then: (schema) => + schema.required(m.personal_files_create_copy_source_required()), otherwise: (schema) => schema.notRequired(), }), }), @@ -136,15 +138,16 @@ {#snippet child({ props })} - + {/snippet} - Create personal dashboard + {m.personal_files_create_title()} - Personal dashboards are only visible to you. They live alongside the - project but never sync to git. + {m.personal_files_create_description()} @@ -160,15 +163,19 @@ {#if personalCanvasOptions.length}
- +
@@ -176,7 +183,7 @@