chore(layout): use i18n for options

This commit is contained in:
Elian Doran 2025-12-09 22:58:16 +02:00
parent a45c1a1dc8
commit 876e8f843a
No known key found for this signature in database
3 changed files with 12 additions and 5 deletions

View File

@ -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[];

View File

@ -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",

View File

@ -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>
<CheckboxList
values={experimentalFeatures}
@ -192,5 +192,5 @@ function ExperimentalOptions() {
currentValue={enabledExperimentalFeatures} onChange={setEnabledExperimentalFeatures}
/>
</OptionsSection>
)
);
}