Steps to reproduce
- Set the user's language and locale to a non-English one (Russian in my case). The same happens when the instance defaults are used (
occ config:system:set default_language --value ru / default_locale --value ru_RU) and the user never picked anything.
- Open the Calendar app in month view with a fresh page load.
- Look at the period label between the ◀ / ▶ buttons.
Expected behavior
The month name follows the user's locale, e.g. август 2026.
Actual behavior
On the first render the month name is in English — August 2026 — while everything around it is correctly localized (weekday headers, buttons, app title, the rest of the UI).
Clicking ▶ (or ◀) re-renders the label correctly: сентябрь 2026. Reloading the page brings the English name back. So the label is only wrong until the first period change.
Root cause (from reading the source)
The label is rendered by formatDateRange(date, view.value, settingsStore.momentLocale, false) in src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderDatePicker.vue, which ends up in moment(value).locale(locale).format('MMMM YYYY') (src/filters/dateRangeFormat.js).
settingsStore.momentLocale is initialized to the literal 'en' in src/store/settings.js, and only replaced with the real locale later, in Calendar.vue:
async mounted() {
...
await this.loadMomentLocale() // -> settingsStore.setMomentLocale({ locale })
}
The first render of the header happens while the store still holds 'en'. The picker receives the formatter as a prop (:format="dateFormatWrapper"), so the already-rendered label is not recomputed when the store value changes a moment later — it stays English until something forces a re-render, which is exactly what pressing ▶ does.
Ruled out (all checked in the browser console on the affected page)
OC.getLocale(), OC.getLanguage() and document.documentElement.lang are all ru
- the Russian moment locale chunk is fetched fine:
calendar-node_modules_moment_locale_ru_js.js → 200
moment().locale('ru').format('MMMM YYYY') returns август 2026 on that very page
So moment has the locale data, the app just formats the first label before the store learns about it.
Calendar app version
6.5.4
CalDAV-clients used
No response
Browser
Chromium (headless and normal, same result)
Client operating system
macOS
Server operating system
Debian (official nextcloud:34.0.2-apache Docker image)
Nextcloud version
34.0.2
Steps to reproduce
occ config:system:set default_language --value ru/default_locale --value ru_RU) and the user never picked anything.Expected behavior
The month name follows the user's locale, e.g.
август 2026.Actual behavior
On the first render the month name is in English —
August 2026— while everything around it is correctly localized (weekday headers, buttons, app title, the rest of the UI).Clicking ▶ (or ◀) re-renders the label correctly:
сентябрь 2026. Reloading the page brings the English name back. So the label is only wrong until the first period change.Root cause (from reading the source)
The label is rendered by
formatDateRange(date, view.value, settingsStore.momentLocale, false)insrc/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderDatePicker.vue, which ends up inmoment(value).locale(locale).format('MMMM YYYY')(src/filters/dateRangeFormat.js).settingsStore.momentLocaleis initialized to the literal'en'insrc/store/settings.js, and only replaced with the real locale later, inCalendar.vue:The first render of the header happens while the store still holds
'en'. The picker receives the formatter as a prop (:format="dateFormatWrapper"), so the already-rendered label is not recomputed when the store value changes a moment later — it stays English until something forces a re-render, which is exactly what pressing ▶ does.Ruled out (all checked in the browser console on the affected page)
OC.getLocale(),OC.getLanguage()anddocument.documentElement.langare allrucalendar-node_modules_moment_locale_ru_js.js→200moment().locale('ru').format('MMMM YYYY')returnsавгуст 2026on that very pageSo moment has the locale data, the app just formats the first label before the store learns about it.
Calendar app version
6.5.4
CalDAV-clients used
No response
Browser
Chromium (headless and normal, same result)
Client operating system
macOS
Server operating system
Debian (official
nextcloud:34.0.2-apacheDocker image)Nextcloud version
34.0.2