Opened 18 years ago

Closed 18 years ago

#3897 closed (fixed)

Add German localflavor

Reported by: Jannis Leidel <jl@…> Owned by: Adrian Holovaty
Component: Contrib apps Version: dev
Severity: Keywords: localflavor, l10n, de
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Patch to add a module to django.contrib.localflavor for Germany: DEZipCodeField and DEStateSelect.

Tests included.

Attachments (2)

de-localflavor.diff (4.6 KB ) - added by Jannis Leidel <jl@…> 18 years ago.
initial de localflavor
de-localflavor2.diff (4.7 KB ) - added by Jannis Leidel <jl@…> 18 years ago.
Marked state names for translation

Download all attachments as: .zip

Change History (10)

by Jannis Leidel <jl@…>, 18 years ago

Attachment: de-localflavor.diff added

initial de localflavor

comment:1 by Simon G. <dev@…>, 18 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Simon G. <dev@…>, 18 years ago

Summary: [patch] Add German localflavorAdd German localflavor

comment:3 by Malcolm Tredinnick, 18 years ago

Triage Stage: Ready for checkinAccepted

Here's an interesting problem: the German states all have reasonably well-established English names that differ from their German versions (e.g. Bayern -> Bavaria, Sachsen -> Saxony). Django, like many other programs, uses (North American) English as the default language for internal strings. So, my feeling is that we should probably be using the English names in this list and mark them as translatable.

Note that this problem does not exist for the Finnish and Norwegian localflavors, as far as I can tell, because everybody -- native and foreign -- uses the local spellings.

The main argument in favour of this is consistency and international "friendliness" (outside of Germany, the English names are more commonly used). The argument against this change is that the German versions are in some way the "real names". However, given that we label the locale as German (and not Deutsch) in other places, the against argument seems less significant.

Am I overlooking a technical (or even non-technical) reason for the state names not to be in English?

comment:4 by Jannis Leidel <jl@…>, 18 years ago

Ok, good point - nevertheless it would be nice to see the translated names if i18n is enabled.

Adding the states to django.conf.locale.de would do this trick though.

by Jannis Leidel <jl@…>, 18 years ago

Attachment: de-localflavor2.diff added

Marked state names for translation

comment:5 by Malcolm Tredinnick, 18 years ago

Triage Stage: AcceptedReady for checkin

Thanks, Jannis.

comment:6 by Malcolm Tredinnick, 18 years ago

This patch isn't quite perfect -- the tests didn't patch properly. When I fixed that, they failed. When I fixed that, it tripped over a bug I seem to have introduced in [4904]. I'm slowly fixing everything and nailing the bugs (particularly since the last one is my fault), but I'm too tired to finish it tonight. Will pick this up again in the morning.

comment:7 by Malcolm Tredinnick, 18 years ago

(In [4919]) Made django.utils.html.escape() work with unicode strings (and unicode-like
objects). Refs #3897.

comment:8 by Malcolm Tredinnick, 18 years ago

Resolution: fixed
Status: newclosed

(In [4920]) Fixed #3897 -- Added German localflavor. Thanks, Jannis Leidel.

Note: See TracTickets for help on using tickets.
Back to Top