Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(layout): use i18n for options
Elian Doran876e8f843a89
diff --git a/apps/client/src/services/experimental_features.ts b/apps/client/src/services/experimental_features.tsindex 39cfedf6fc..76cca8461e 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.jsonindex 24e30c6a96..83d8700f53 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.tsxindex 091ba4d2f4..739bb32270 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<string[]>("experimentalFeatures");return (- <OptionsSection title="Experimental Options">- <FormText>These options are experimental and may cause instability. Use with caution.</FormText>+ <OptionsSection title={t("experimental_features.title")}>+ <FormText>{t("experimental_features.disclaimer")}</FormText><CheckboxListvalues={experimentalFeatures}@@ -192,5 +192,5 @@ function ExperimentalOptions() {currentValue={enabledExperimentalFeatures} onChange={setEnabledExperimentalFeatures}/></OptionsSection>- )+ );}