Configured region not honored with de-informal language
Problem and impact
When setting my user account’s language to de-informal, the configured region (CH) is no longer honored for formatting money values, e.g. in the orders page.
Expected behaviour
No response
Steps to reproduce
- Configure region to CH
- Configure language to de; orders page lists “CHF 97.56” (with dots)
- Configure language to de-informal; orders page lists “97,56 CHF” (with commas)
Looking at the code, I think the problem is that the language function treats “informal” as a region: https://github.com/pretix/pretix/blob/6bf23b0fddbac3aa8df6f81db35c91fdcc058aba/src/pretix/base/i18n.py#L146-L154
Screenshots
No response
Link
No response
Browser (software, desktop or mobile?) and version
No response
Operating system, dependency versions
No response
Version
2024.2
I'll look into it but it might be not fixable the way the informal variant is implemented, it's basically a fake region in itself :/
Wouldn’t just removing “-informal” before trying to determine the region fix the problem?
No, the region will not be added to the language in the first place if de-informal is used since "informal" is implemented like a region (think de-de, de-at, de-ch and de-informal)