[FIX] web: assign numbering system to luxon
Before this commit, the numbering system used by luxon was the default
one set by the browser (in most cases: 'latn'). This caused issues when
translating luxon dates with moment dates, as moment supports some
locales differently (e.g.: ar_001 uses the 'arab' numbering system
while Intl uses 'latn').
To have proper consistency, this commit assigns (as much as possible)
the same numbering systems as luxon for each supported locale.
Warning: since the numbering system is now set according to the user
'lang' parameter, it's now unsafe to use `DateTime.fromFormat(...)` with
static date strings, as they might not be parsable with the current
numbering system.
closes odoo/odoo#83944
Signed-off-by:
Géry Debongnie <ged@odoo.com>
Showing
- addons/web/static/src/core/l10n/localization_service.js 28 additions, 8 deletionsaddons/web/static/src/core/l10n/localization_service.js
- addons/web/static/src/search/filter_menu/custom_filter_item.js 7 additions, 7 deletions...s/web/static/src/search/filter_menu/custom_filter_item.js
- addons/web/static/tests/core/l10n/translation_tests.js 114 additions, 36 deletionsaddons/web/static/tests/core/l10n/translation_tests.js
Loading