#16188 closed Cleanup/optimization (fixed)
Added locale formats for swiss german language
Reported by: | Silvan Spross | Owned by: | Jonas Obrist |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Normal | Keywords: | locale, formats |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
The swiss german number formats are slightly different than the german ones:
DECIMAL_SEPARATOR = '.' THOUSAND_SEPARATOR = "'"
Attachments (2)
Change History (16)
by , 13 years ago
Attachment: | de_CH_formats.diff added |
---|
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
by , 13 years ago
Attachment: | ticket-16188.diff added |
---|
comment:3 by , 13 years ago
Patch needs improvement: | set |
---|
So I'm not actually sure this is correct, since according to the government regulations the dot is only used for monetary values, not generally for numbers. http://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de
comment:4 by , 13 years ago
Triage Stage: | Ready for checkin → Accepted |
---|
Bumping done to accepted since this need clarification.
comment:5 by , 13 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
My two cents on the DECIMAL_SEPARATOR issue here:
Unfortunately, there seems to be no real consensus on what the right way to write numbers in Switzerland is. While the link above shows the official way to do it, that rule seems to be applied very rarely.
I have checked with two major newspapers in Switzerland, hoping they would write proper (Swiss-) German, only to find that both use another System:
NZZ (nzz.ch) uses a dot for monetary values and either a dot or a comma (it's not consistent throughout the site) for percentage values and a dot for 'normal' values. Overall, they seem to be very inconsistent. Even more 'shocking' to me as a Swiss is that they use a comma as thousand separator, which is very unnatural for me.
Tagesanzeiger (tagi.ch) is inconsistent too. For values in graphs, they use dots. For values in article text they use commas.
I personally agree with the patch as it is. The "10'000.12" format appears most natural to me. So in my opinion, the patch is ready for checkin.
comment:6 by , 13 years ago
Triage Stage: | Ready for checkin → Accepted |
---|
I'm going back to accepted on this. Comment 5 just pointed out a whole bunch of widely read sources that do NOT use the single quote for the separator. "Looks most natural to me" isn't really the winning argument here in the face of so much alternate public usage (in Swiss publications).
We can leave this open for a couple more months to see if somebody can come up with reasonable evidence (in, say, Wikipedia terms) that the quote is used everywhere "on average". If not, we should leave it as is and not commit this change.
In short: "Patch needs evidence"
comment:7 by , 13 years ago
Patch needs improvement: | set |
---|
comment:8 by , 13 years ago
So according to the specification in comment 3, DECIMAL_SEPARATOR should be a comma by default and THOUSAND_SEPARATOR a space, since single quotes are (according to Wikipedia [1]) only used in hand writing.
However this would be wrong for monetary values. Django cannot know if a value is a monetary or non-monetary value, so maybe the format should default to the more broad use case of non-monetary values.
Is there any place in the docs where we could document this?
[1] http://en.wikipedia.org/wiki/Decimal_mark#Examples_of_use
comment:9 by , 13 years ago
Patch needs improvement: | unset |
---|
My proposed fix for this: https://github.com/ojii/django/compare/django:master...ojii:16188
comment:10 by , 13 years ago
Owner: | changed from | to
---|
comment:11 by , 13 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:12 by , 13 years ago
This was accidentally committed with a faulty commit message due to PEBKAC in r17472.
comment:13 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
adds de_CH/init.py and de_CH/formats.py