Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use moment.locale() to update locales to make sure the locales are case insensitive.

Dombi Attilabff74e10dd6c
diff --git a/frontend/src/app/core/setup/init-locale.ts b/frontend/src/app/core/setup/init-locale.ts
index 352a411d2f4..4170a93045c 100644
--- a/frontend/src/app/core/setup/init-locale.ts
+++ b/frontend/src/app/core/setup/init-locale.ts
@@ -42,8 +42,10 @@ export function initializeLocale() {
I18n.defaultLocale = defaultLocale;
moment.locale(userLocale);
+
// Remove Postformatting Arabic numbers in dates
- moment.updateLocale(userLocale, { postformat: (string:string) => string });
+ // Using moment.locale() ensures locale like "zh-CN" falls back to "zh-cn"
+ moment.updateLocale(moment.locale(), { postformat: (string:string) => string });
if (!Number.isNaN(firstDayOfWeek) && !Number.isNaN(firstWeekOfYear)) {
// ensure locale like "zh-CN" falls back to "zh-cn"