feat(collections/calendar): use formatting locale

This commit is contained in:
Elian Doran 2025-11-08 18:01:58 +02:00
parent 53805e9c49
commit b0bd60b9a4
No known key found for this signature in database

View File

@ -197,11 +197,11 @@ function usePlugins(isEditable: boolean, isCalendarRoot: boolean) {
} }
function useLocale() { function useLocale() {
const [ locale ] = useTriliumOption("locale"); const [ formattingLocale ] = useTriliumOption("formattingLocale");
const [ calendarLocale, setCalendarLocale ] = useState<LocaleInput>(); const [ calendarLocale, setCalendarLocale ] = useState<LocaleInput>();
useEffect(() => { useEffect(() => {
const correspondingLocale = LOCALE_MAPPINGS[locale]; const correspondingLocale = LOCALE_MAPPINGS[formattingLocale];
if (correspondingLocale) { if (correspondingLocale) {
correspondingLocale().then((locale) => setCalendarLocale(locale.default)); correspondingLocale().then((locale) => setCalendarLocale(locale.default));
} else { } else {