South Africa has Provinces, not States. Please can you change this.

Thank you

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

malberts’s picture

Assigned: Unassigned » malberts
Status: Active » Needs review
FileSize
2.92 KB

- Added a list of South African provinces as per ISO 3166-2:ZA.
- Changed the label "States" to "Provinces" and moved it to be the last item in the form.

As stated in #1219658: GB Specific Changes, this type of solution can become hard to maintain but we need this to support South African provinces.

malberts’s picture

I needed to follow the UK example more closely, so here's a new patch that does not put the locality fields directly next to each other.

hmartens’s picture

Thank you very much for the help! I really appreciate it!

rszrama’s picture

Component: User interface » Address formats
niki v’s picture

Patch works correctly, thanks!

niki v’s picture

Version: 7.x-1.0-beta3 » 7.x-1.0-beta5
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
RStrydom’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
2.3 KB

Updated the patch from #2 to be compatible with the latest version.
Also added '#render_option_value' => TRUE, to the Provinces as we work with the full name and not the abbreviations

foxtrotcharlie’s picture

Status: Needs review » Reviewed & tested by the community

Tested this, and it works for me on addressfield 7.x-1.0-beta5. Thanks :-)

bojanz’s picture

Status: Reviewed & tested by the community » Fixed

Fixed two wrong ISO codes:

'GT' => t('Gauteng'),
'NL' => t('KwaZulu-Natal'),

and committed the patch.

  • bojanz committed be3fbd7 on authored by malberts
    Issue #1669620 by malberts, RStrydom: South Africa doesn't have states
    
bojanz’s picture

Title: South Africa doesn't have states » Add South African provinces
bojanz’s picture

Status: Fixed » Needs work

Hm, Google's dataset says that the states aren't actually used for mailing in South Africa, and
http://www.postoffice.co.za/questions/postofficequestions.html#Correct doesn't mention the state either.

Therefore, we should actually remove the state field?

bojanz’s picture

Based on the official post office quote:

The mailing address must be clearly printed or written on the front of the envelope, left-aligned, starting with Ihe name of the addressee on the first line, the number and street address on the second line, the suburb on the third line, the name of the city on the fourth line, and the correct postal code on the last line.

I have reverted the patch.

It shows that the correct tweaks to apply are
- Hide the administrative area field
- Add the suburb (dependent_locality) field.
- Make sure the ordering is correct.

EDIT: A recent commit has resulted in the administrative area being correctly hidden for South Africa.

  • bojanz committed 2f105d7 on 7.x-1.x
    Revert "Issue #1669620 by malberts, RStrydom: South Africa doesn't have...
hmartens’s picture

Thanks Bojan for your work on this. It's much appreciated!

bojanz’s picture

Title: Add South African provinces » Proper format for South African addresses
Status: Needs work » Fixed

The suburb field now shows up, the ordering is correct.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.