Skip to content

Support regional locales via i18n parent fallback chain#2416

Merged
tf merged 1 commit into
codevise:masterfrom
tf:locale-fallback
May 11, 2026
Merged

Support regional locales via i18n parent fallback chain#2416
tf merged 1 commit into
codevise:masterfrom
tf:locale-fallback

Conversation

@tf
Copy link
Copy Markdown
Member

@tf tf commented May 11, 2026

So sites can use locales like de-CH for Swiss number formatting without forcing a full translation duplicate per region. Translations are merged across the entire I18n fallback chain (entry locale → parents → default locale) instead of just default → entry locale.

In the legacy editor, window.I18n is served by an older Sprockets i18n.js that only falls back to defaultLocale and never walks parent locales. A small lookup patch backports the parent-aware chain that modern npm i18n-js already provides for Webpack-bundled code.

REDMINE-21281

So sites can use locales like de-CH for Swiss number formatting
without forcing a full translation duplicate per region. Translations
are merged across the entire I18n fallback chain (entry locale →
parents → default locale) instead of just default → entry locale.

In the legacy editor, window.I18n is served by an older Sprockets
i18n.js that only falls back to defaultLocale and never walks parent
locales. A small lookup patch backports the parent-aware chain that
modern npm i18n-js already provides for Webpack-bundled code.

REDMINE-21281
@tf tf added this to the v17.2 milestone May 11, 2026
@tf tf merged commit dc5dbfd into codevise:master May 11, 2026
16 checks passed
@tf tf deleted the locale-fallback branch May 11, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant