#9289 closed (fixed)
Swedish (se) localflavor
Reported by: | Andreas Pelme | Owned by: | |
---|---|---|---|
Component: | contrib.localflavor | Version: | dev |
Severity: | Keywords: | localflavor, sv, se | |
Cc: | hwaara@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The attached patch contains:
- SECountySelect - Select widget for Swedish counties (län)
- SEMunicipalitySelect - Select widget for Swedish municipalities (kommun)
- SEOrganisationNumber - Form field for Swedish Organisation numbers (organisationsnummer)
- SEPersonalIdentityNumber - Form field for Swedish Identity numbers (personnummer)
Documentation, Swedish translations, and tests that covers all widgets fields are included!
Attachments (6)
Change History (25)
by , 16 years ago
Attachment: | django_localflavor_se.diff added |
---|
comment:1 by , 16 years ago
I forgot to mention in the description above, the patch also contains:
- SEPostalCodeNumberField - Form field for Swedish postal codes
follow-up: 4 comment:3 by , 16 years ago
Patch needs improvement: | set |
---|
When making a patch for Django, do it like this: (Assuming your Django is in ~/django-trunk
)
# Make some edits. cd django-trunk vim ... # Then make patch: svn diff >~/django-foo.diff
and upload that .diff
. This makes it easier for the committers.
comment:4 by , 16 years ago
Patch needs improvement: | unset |
---|
Replying to toxik:
When making a patch for Django, do it like this: ... and upload that
.diff
. This makes it easier for the committers.
The trac patch-viewer has problems showing patches from "git diff", which is an acceptable format for patches according to
http://docs.djangoproject.com/en/dev/internals/contributing/#patch-style
Download the patch and view it with your favourite text editor and you will see the correct file names.
comment:5 by , 16 years ago
URL to the discussion on django-se (in Swedish):
http://groups.google.com/group/django-se/browse_thread/thread/bfa40d7637607f2c
comment:6 by , 16 years ago
Patch needs improvement: | set |
---|
I think putting in all the municipalities is going a bit too far here. We aren't intending to be an encyclopedic reference. What happens when somebody wants to include every town in the US? Where do we draw the line? I think some of these things -- municipalities (when there are 290 of them), towns, postcodes, etc -- probably just have to be some kind of optional third-party package. Otherwise Django is going to be a huge download.
Also, please remove the translation update. That isn't part of the localflavor and can be done in the normal course of doing a translation update.
comment:7 by , 16 years ago
Patch needs improvement: | unset |
---|---|
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
Updated patch which...
- Validates personal identity numbers according to the discussion on the Swedish mailing list
- The cleaned value returns the full year and no sign
- Tests and documentation are updated accordingly
- Adds some more validation checking for SEOrganisationNumberField.
- SEMunicipalitySelect removed
- All translation changes removed
I haven't got any feedback on
http://groups.google.com/group/django-developers/browse_thread/thread/ad5a7866ed5f471b
so I have not done any work on a model field/extra methods for converting between long and short formats and datetime.date objects (which should be trivial once it's decided).
by , 16 years ago
Attachment: | django_localflavor_se_r3.diff added |
---|
Updated patch which works when the checksum digit is 0, tests updated.
comment:8 by , 16 years ago
Cc: | added |
---|
by , 16 years ago
Attachment: | django_localflavor_se_r4.diff added |
---|
Updated patch according to the discussion on django-se. The counties are not appended by "County", and not marked for translation.
by , 16 years ago
Attachment: | django_localflavor_se_r5.diff added |
---|
Some typo changes, and made using svn diff
instead.
comment:9 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
Oh and assign these things to Malcolm.
comment:11 by , 16 years ago
Oh, well then. I stand corrected. I also couldn't delete owner like that.
by , 16 years ago
Attachment: | django_localflavor_se_r6.diff added |
---|
Marked strings for translation, because some languages have non-roman alphabets.
comment:12 by , 16 years ago
What's the next step here, is the patch updated according to the discussions in the newsgroup? Is it ready for review?
comment:13 by , 16 years ago
Yes, it is updated according to the discussions. I would say it is ready for review. I use the code myself in a couple of projects and have no issues with it.
comment:16 by , 16 years ago
milestone: | → 1.1 |
---|
comment:17 by , 16 years ago
milestone: | 1.1 → 1.2 |
---|
We're now past feature freeze, this will have to wait until 1.2 :(
comment:18 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Swedish localflavor patch against current trunk