Comments

ItangSanjana’s picture

StatusFileSize
new2.81 KB

replace T() to t()

ItangSanjana’s picture

Issue summary: View changes
StatusFileSize
new2.79 KB

Oops, fixed the standards. Ref: http://nomor.net

badrun’s picture

It works. Thank you for the patch.

Suggestion:
The current input format is
Province, Regency/City, Postal code
Address 1
Address 2

Propose input format is
Address 1
Address 2
Province, Regency/City, Postal code

// Rearrange fields.
$format['locality_block']['#weight'] = 10;
$format['locality_block']['locality']['#weight'] = 0;
$format['locality_block']['administrative_area']['#weight'] = 1;
$format['locality_block']['postal_code']['#weight'] = 2;

The display format is fine.

Question:

'31' => t('Jakarta DKI'),

What does the number "31" represent?
How do you get those numbers?

Why it is not like below?

'Jakarta DKI' => t('Jakarta DKI'),

In Indonesia, there is no province abbreviation like America (example: CA for California), so why did you replace it with number?

If you replace the value with a number, when addressfield module is combined with auto entity label module, it will show the number, instead of the province name.

Thanks

ItangSanjana’s picture

What does the number "31" represent?

Province code.

How do you get those numbers?

http://www.kemendagri.go.id/pages/profil-daerah/provinsi

BTW About the propose input format, I'll patch this ASAP. thanks for stopping by and the auto entity label info! :))

kscheirer’s picture

Status: Needs review » Reviewed & tested by the community

Based on #3.

ItangSanjana’s picture

StatusFileSize
new2.35 KB

Based on #3 + drupal_map_assoc() for render format. For more feature see https://drupal.org/sandbox/is/2129777 there is locality options list now. Enjoy ..

ItangSanjana’s picture

StatusFileSize
new22.29 KB

Added locality options list.

ItangSanjana’s picture

bojanz’s picture

Status: Reviewed & tested by the community » Needs work

We need to use #6, we can't add the locality list to the module, you will need to provide a plugin in your own module for that.

Issues to resolve:
1) The list in #6 is missing "Aceh".

2) The keys of the provinces need to be ISO codes, as listed on https://en.wikipedia.org/wiki/ISO_3166-2:ID.
So AC => Aceh, BA => Bali, BT => Banten, etc.

3) What are the best labels for "Jakarta DKI" and "Yogyakarta DI"?
Google uses "DKI Jakarta" and "Daerah Istimewa Yogyakarta" (and http://yogyakarta.bps.go.id uses "D.I. Yogyakarta").

ItangSanjana’s picture

StatusFileSize
new2.27 KB

Thank you for the review.

1) Fixed. It was Nanggroe Aceh Darussalam, but I prefer ISO 3166-2:ID (shorter and common) so it's Aceh now.

2) Fixed.

3) Fixed. DKI Jakarta (shorter and common) and D.I. Yogyakarta (shorter and common).

ItangSanjana’s picture

Status: Needs work » Needs review
bojanz’s picture

Status: Needs review » Fixed

Committed, thank you!

ItangSanjana’s picture

Most welcome!

Status: Fixed » Closed (fixed)

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