mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 16:08:58 +01:00
feat(collections/calendar): use formatting locale
This commit is contained in:
parent
53805e9c49
commit
b0bd60b9a4
@ -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 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user