Opened 9 years ago

Closed 8 years ago

#6427 closed (fixed)

created localflavor.at

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

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@…> 9 years ago.
localflavor.at.at_provinces
forms.py (636 bytes) - added by Bela Hausmann <post@…> 9 years ago.
localflavor.at.forms
at_provinces.2.py (1.3 KB) - added by Bela Hausmann <post@…> 8 years ago.
New version with english Names
locale.de.diff (29.9 KB) - added by Horst Gutmann <zerok@…> 8 years ago.
Changes to the German locales
localflavor.at.diff (6.2 KB) - added by Horst Gutmann <zerok@…> 8 years ago.
New localflavor.at
localflavor.at-2.diff (6.2 KB) - added by Horst Gutmann <zerok@…> 8 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@…> 8 years ago.
Updated contrib/localflavor addition to the post-r7971 world
localflavor.at-4.diff (4.1 KB) - added by Horst Gutmann <zerok@…> 8 years ago.
Updated patch for the post-r8087 world

Download all attachments as: .zip

Change History (19)

Changed 9 years ago by Bela Hausmann <post@…>

Attachment: at_provinces.py added

localflavor.at.at_provinces

Changed 9 years ago by Bela Hausmann <post@…>

Attachment: forms.py added

localflavor.at.forms

comment:1 Changed 9 years ago by Bela Hausmann <post@…>

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

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 Changed 9 years ago by Tom Vergote

Has patch: set
Needs tests: set

comment:3 Changed 9 years ago by Jacob

Triage Stage: UnreviewedAccepted

comment:4 Changed 8 years ago by Horst Gutmann <zerok@…>

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 Changed 8 years ago by Bela Hausmann <post@…>

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

Changed 8 years ago by Bela Hausmann <post@…>

Attachment: at_provinces.2.py added

New version with english Names

comment:6 Changed 8 years ago by Horst Gutmann <zerok@…>

Owner: changed from nobody to Horst Gutmann

comment:7 Changed 8 years ago by Horst Gutmann <zerok@…>

Keywords: localflavor austrialocalflavor, 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.

Changed 8 years ago by Horst Gutmann <zerok@…>

Attachment: locale.de.diff added

Changes to the German locales

Changed 8 years ago by Horst Gutmann <zerok@…>

Attachment: localflavor.at.diff added

New localflavor.at

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

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 Changed 8 years ago by Bela Hausmann <post@…>

It's fine by me!

Changed 8 years ago by Horst Gutmann <zerok@…>

Attachment: localflavor.at-2.diff added

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

Changed 8 years ago by Horst Gutmann <zerok@…>

Attachment: localflavor.at-3.diff added

Updated contrib/localflavor addition to the post-r7971 world

Changed 8 years ago by Horst Gutmann <zerok@…>

Attachment: localflavor.at-4.diff added

Updated patch for the post-r8087 world

comment:10 Changed 8 years ago by Horst Gutmann <zerok@…>

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 Changed 8 years ago by Malcolm Tredinnick

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