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(options/i18n): simplify first week of the year
Elian Doran43d9d726f801
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex b422af9f97..a599249f40 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -1412,11 +1412,10 @@"sunday": "Sunday","first-week-of-the-year": "First week of the year","first-week-contains-first-day": "First week contains first day of the year",- "first-week-contains-first-thursday": "First week contains first Thursday of the year",+ "first-week-contains-first-thursday": "First week contains first Thursday (ISO 8601)","first-week-has-minimum-days": "First week has minimum days","min-days-in-first-week": "Minimum days in first week",- "first-week-info": "First week contains first Thursday of the year is based on <a href=\"https://en.wikipedia.org/wiki/ISO_week_date#First_week\">ISO 8601</a> standard.",- "first-week-warning": "Changing first week options may cause duplicate with existing Week Notes and the existing Week Notes will not be updated accordingly.",+ "first-week-warning": "Changing this may cause duplicates with existing Week Notes.","formatting-locale": "Date & number format","formatting-locale-auto": "Based on the application's language"},diff --git a/apps/client/src/widgets/type_widgets/options/i18n.tsx b/apps/client/src/widgets/type_widgets/options/i18n.tsxindex 5f65993021..4809adc3e0 100644--- a/apps/client/src/widgets/type_widgets/options/i18n.tsx+++ b/apps/client/src/widgets/type_widgets/options/i18n.tsx@@ -6,10 +6,7 @@ import OptionsSection from "./components/OptionsSection";import { useTriliumOption, useTriliumOptionJson } from "../../react/hooks";import type { Locale } from "@triliumnext/commons";import { isElectron, restartDesktopApp } from "../../../services/utils";-import FormRadioGroup from "../../react/FormRadioGroup";import FormText from "../../react/FormText";-import RawHtml from "../../react/RawHtml";-import Admonition from "../../react/Admonition";import Button from "../../react/Button";import CheckboxList from "./components/CheckboxList";import RelatedSettings from "./components/RelatedSettings";@@ -96,10 +93,13 @@ function DateSettings() {/></OptionsRow>- <OptionsRow name="first-week-of-year" label={t("i18n.first-week-of-the-year")}>- <FormRadioGroup+ <OptionsRow name="first-week-of-year" label={t("i18n.first-week-of-the-year")} description={t("i18n.first-week-warning")}>+ <FormSelectname="first-week-of-year"- currentValue={firstWeekOfYear} onChange={setFirstWeekOfYear}+ currentValue={firstWeekOfYear}+ onChange={setFirstWeekOfYear}+ keyProperty="value"+ titleProperty="label"values={[{ value: "0", label: t("i18n.first-week-contains-first-day") },{ value: "1", label: t("i18n.first-week-contains-first-thursday") },@@ -117,14 +117,6 @@ function DateSettings() {(_, i) => ({ days: String(i + 1) }))} /></OptionsRow>}- <FormText>- <RawHtml html={t("i18n.first-week-info")} />- </FormText>-- <Admonition type="warning">- {t("i18n.first-week-warning")}- </Admonition>-<OptionsRow name="restart" centered><Buttonname="restart-app-button"