Opened 16 years ago

Closed 16 years ago

#6427 closed (fixed)

created localflavor.at

Reported by: Bela Hausmann <post@…> Owned by: Horst Gutmann
Component: contrib.localflavor Version: dev
Severity: Keywords: localflavor, austria
Cc: zerok@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I created a basic localflavor for Austria (AT).
For now only a Provinces Select and ZipCode field.

Attachments (8)

at_provinces.py (1.1 KB ) - added by Bela Hausmann <post@…> 16 years ago.
localflavor.at.at_provinces
forms.py (636 bytes ) - added by Bela Hausmann <post@…> 16 years ago.
localflavor.at.forms
at_provinces.2.py (1.3 KB ) - added by Bela Hausmann <post@…> 16 years ago.
New version with english Names
locale.de.diff (29.9 KB ) - added by Horst Gutmann <zerok@…> 16 years ago.
Changes to the German locales
localflavor.at.diff (6.2 KB ) - added by Horst Gutmann <zerok@…> 16 years ago.
New localflavor.at
localflavor.at-2.diff (6.2 KB ) - added by Horst Gutmann <zerok@…> 16 years ago.
Some final changes to the documentation to clarify the origin of the whole SSN checker
localflavor.at-3.diff (6.2 KB ) - added by Horst Gutmann <zerok@…> 16 years ago.
Updated contrib/localflavor addition to the post-r7971 world
localflavor.at-4.diff (4.1 KB ) - added by Horst Gutmann <zerok@…> 16 years ago.
Updated patch for the post-r8087 world

Download all attachments as: .zip

Change History (19)

by Bela Hausmann <post@…>, 16 years ago

Attachment: at_provinces.py added

localflavor.at.at_provinces

by Bela Hausmann <post@…>, 16 years ago

Attachment: forms.py added

localflavor.at.forms

comment:1 by Bela Hausmann <post@…>, 16 years ago

the utf8 upload didn't work, so here again at_provinces.py

# -*- coding: utf-8 -*-
"""
A list of all nine provinces in Austria, see also: http://en.wikipedia.org/wiki/ISO_3166-2:AT
In the comments there are their english names, if they are not the same as the german ones.
Vienna is moved to the top, because it's the capital of Austria
"""

from django.utils.translation import ugettext_lazy as _

# after ISO_3166-2
PROVINCE_CHOICES = (
	('9', _(u'Wien')),		# Vienna
	('1', _(u'Burgenland')),
	('2', _(u'Kärnten')),		# Carinthia
	('3', _(u'Niederösterreich')),	# Lower Austria
	('4', _(u'Oberösterreich')),	# Upper Austria
	('5', _(u'Salzburg')),
	('6', _(u'Steiermark')),	# Styria
	('7', _(u'Tirol')),		# Tyrol
	('8', _(u'Vorarlberg')),
)

# alternative keys using initials (not used in forms)
PROVINCE_CHOICES_INITIALS = (
	('W', _(u'Wien')),		# Vienna
	('B', _(u'Burgenland')),
	('K', _(u'Kärnten')),		# Carinthia
	('N', _(u'Niederösterreich')),	# Lower Austria
	('O', _(u'Oberösterreich')),	# Upper Austria
	('S', _(u'Salzburg')),
	('St', _(u'Steiermark')),	# Styria
	('T', _(u'Tirol')),		# Tyrol
	('V', _(u'Vorarlberg')),
)


comment:2 by Tom Vergote, 16 years ago

Has patch: set
Needs tests: set

comment:3 by Jacob, 16 years ago

Triage Stage: UnreviewedAccepted

comment:4 by Horst Gutmann <zerok@…>, 16 years ago

Cc: zerok@… added

Shouldn't normally the province name be stored here in English if translatable? At least that's how its done in the German and Swiss packages.

comment:5 by Bela Hausmann <post@…>, 16 years ago

Yes, I didn't notice that. Attached a new version.

by Bela Hausmann <post@…>, 16 years ago

Attachment: at_provinces.2.py added

New version with english Names

comment:6 by Horst Gutmann <zerok@…>, 16 years ago

Owner: changed from nobody to Horst Gutmann

comment:7 by Horst Gutmann <zerok@…>, 16 years ago

Keywords: localflavor austria → localflavor, austria
Needs tests: unset

Removed some of Bela's lists since they are never used in the bundled forms.py and also added regression tests for all fields as well as a new field for handling Austrian social security numbers.

As requested by jezdez the result is split into two patches. One that includes the actual localflavor implementation, the other is for changes to the German locales.

by Horst Gutmann <zerok@…>, 16 years ago

Attachment: locale.de.diff added

Changes to the German locales

by Horst Gutmann <zerok@…>, 16 years ago

Attachment: localflavor.at.diff added

New localflavor.at

comment:8 by Horst Gutmann <zerok@…>, 16 years ago

I also contacted Bela to check if the removal of his 2 additional lists is OK for him. If he agrees this one would IMO be ready.

comment:9 by Bela Hausmann <post@…>, 16 years ago

It's fine by me!

by Horst Gutmann <zerok@…>, 16 years ago

Attachment: localflavor.at-2.diff added

Some final changes to the documentation to clarify the origin of the whole SSN checker

by Horst Gutmann <zerok@…>, 16 years ago

Attachment: localflavor.at-3.diff added

Updated contrib/localflavor addition to the post-r7971 world

by Horst Gutmann <zerok@…>, 16 years ago

Attachment: localflavor.at-4.diff added

Updated patch for the post-r8087 world

comment:10 by Horst Gutmann <zerok@…>, 16 years ago

localflavor.at-4.diff adds the ATSocialSecurityNumberField to Bernd's patch in #7686 and fixes some minor typos (as well as uses absolute imports).

This does *not* include any changes to the German locales, because there are other updates required in there as well that probably should be coordinated more closely with jezdez.

comment:11 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

(In [8113]) Fixed #6427 -- Added some more features to the Austrian localflavor.
Thanks, Horst Gutmann.

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