From 876e8f843a894c0aa1508d704e0419067c976aa8 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 9 Dec 2025 22:58:16 +0200 Subject: [PATCH] chore(layout): use i18n for options --- apps/client/src/services/experimental_features.ts | 5 +++-- apps/client/src/translations/en/translation.json | 6 ++++++ apps/client/src/widgets/type_widgets/options/advanced.tsx | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/apps/client/src/services/experimental_features.ts b/apps/client/src/services/experimental_features.ts index 39cfedf6f..76cca8461 100644 --- a/apps/client/src/services/experimental_features.ts +++ b/apps/client/src/services/experimental_features.ts @@ -1,3 +1,4 @@ +import { t } from "./i18n"; import options from "./options"; interface ExperimentalFeature { @@ -9,8 +10,8 @@ interface ExperimentalFeature { export const experimentalFeatures = [ { id: "new-layout", - name: "New Layout", - description: "Try out the new layout for a more modern look and improved usability.", + name: t("experimental_features.new_layout_name"), + description: t("experimental_features.new_layout_description"), } ] as const satisfies ExperimentalFeature[]; diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json index 24e30c6a9..83d8700f5 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -1096,6 +1096,12 @@ "vacuuming_database": "Vacuuming database...", "database_vacuumed": "Database has been vacuumed" }, + "experimental_features": { + "title": "Experimental Options", + "disclaimer": "These options are experimental and may cause instability. Use with caution.", + "new_layout_name": "New Layout", + "new_layout_description": "Try out the new layout for a more modern look and improved usability. Subject to heavy change in the upcoming releases." + }, "fonts": { "theme_defined": "Theme defined", "fonts": "Fonts", diff --git a/apps/client/src/widgets/type_widgets/options/advanced.tsx b/apps/client/src/widgets/type_widgets/options/advanced.tsx index 091ba4d2f..739bb3227 100644 --- a/apps/client/src/widgets/type_widgets/options/advanced.tsx +++ b/apps/client/src/widgets/type_widgets/options/advanced.tsx @@ -182,8 +182,8 @@ function ExperimentalOptions() { const [ enabledExperimentalFeatures, setEnabledExperimentalFeatures ] = useTriliumOptionJson("experimentalFeatures"); return ( - - These options are experimental and may cause instability. Use with caution. + + {t("experimental_features.disclaimer")} - ) + ); }