Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #6872 (closed defect: fixed)

Opened 2 years ago

Last modified 8 months ago

[XPATCH] Removed duplicated country from ActionView::Helpers::FormOptionsHelper::COUNTRIES

Reported by: ruben Assigned to: nzkoz
Priority: normal Milestone: 1.2.6
Component: ActionPack Version: edge
Severity: normal Keywords: tiny
Cc:

Description

"Espana" figures already in the list as "Spain", therefore this entry is duplicated.

BTW: The correct spelling is España, but that is not really important here.

Attachments

removed_duplicate_country.diff (1.0 kB) - added by ruben on 12/20/06 20:16:45.
Removed Duplicated Country
removed_duplicate_country2.diff (1.0 kB) - added by danger on 05/25/07 05:08:25.
updated against rev 6833
removed_duplicate_country_updated_tests.diff (51.0 kB) - added by mikong on 10/06/07 17:17:57.
iso3166_synced_country_select.diff (84.2 kB) - added by abhay on 10/15/07 05:39:51.

Change History

12/20/06 20:16:45 changed by ruben

  • attachment removed_duplicate_country.diff added.

Removed Duplicated Country

12/20/06 20:19:36 changed by ruben

  • version set to edge.

05/25/07 05:08:25 changed by danger

  • attachment removed_duplicate_country2.diff added.

updated against rev 6833

05/25/07 07:04:20 changed by danger

+1 for this ticket

Since we're using English-only names for the countries and we've already got Spain we should remove Espana.

Even if country_select is pluginized we should fix it up before it goes.

09/23/07 22:00:45 changed by david

  • keywords changed from tiny to tiny unverified.

Tests currently fail on trunk with this applied.

10/06/07 17:17:57 changed by mikong

  • attachment removed_duplicate_country_updated_tests.diff added.

10/06/07 17:26:58 changed by mikong

Tests now work with the newly attached patch.

(follow-up: ↓ 6 ) 10/09/07 22:06:01 changed by kamk

+1 though there's also both United Kingdom and Great Britain

(in reply to: ↑ 5 ) 10/10/07 02:57:11 changed by mikong

Replying to kamk:

+1 though there's also both United Kingdom and Great Britain

I could fix that, but what should be left though, United Kingdom? or Great Britain?

IMHO, we should use United Kingdom because most sites usually refer to the country as such. I also made a quick check on some big sites, Amazon, Google, and Yahoo and they all have United Kingdom instead of Great Britain or Britain. Facebook doesn't have United Kingdom or Britain or Great Britain. They have England, Scotland, Wales and Ireland. That could be another way to do it. Suggestions?

We could also resolve this in another ticket.

10/12/07 16:16:17 changed by fcheung

  • keywords changed from tiny unverified to tiny verified.

+1 applies cleanly and tests pass.

(follow-up: ↓ 9 ) 10/13/07 01:38:30 changed by abhay

-1

Yes it's clean but the country names are still not consistent with any standard. I'm coming up with a patch that will have parity with ISO3166 list in a little bit.

(in reply to: ↑ 8 ; follow-up: ↓ 10 ) 10/15/07 05:06:12 changed by nzkoz

  • keywords changed from tiny verified to tiny.
  • owner changed from core to nzkoz.
  • status changed from new to assigned.
  • summary changed from [PATCH] Removed duplicated country from ActionView::Helpers::FormOptionsHelper::COUNTRIES to [XPATCH] Removed duplicated country from ActionView::Helpers::FormOptionsHelper::COUNTRIES.

Replying to abhay:

-1 Yes it's clean but the country names are still not consistent with any standard. I'm coming up with a patch that will have parity with ISO3166 list in a little bit.

I'll take a patch consistent with the iso list. But to avoid future political questions coming up (http://www.linux.com/articles/25749?tid=23) I'd like to move country_select to a plugin and freeze it.

(in reply to: ↑ 9 ) 10/15/07 05:38:40 changed by abhay

Replying to nzkoz:

Replying to abhay:

-1 Yes it's clean but the country names are still not consistent with any standard. I'm coming up with a patch that will have parity with ISO3166 list in a little bit.

I'll take a patch consistent with the iso list. But to avoid future political questions coming up (http://www.linux.com/articles/25749?tid=23) I'd like to move country_select to a plugin and freeze it.

That's a good point. I'll attach this patch but there are two problems with it:

  1. Taiwan is listed as "Taiwan, Province of China"
  2. A couple of countries have accented names and this patch does not take that into account.

Here are the changes I made:

added:
  - "Aland Islands"
  - "Guernsey"
  - "Isle of Man"
  - "Jersey"
  - "Libyan Arab Jamahiriya"
  - "Montenegro"
  - "Palestinian Territory, Occupied"
  - "Saint Barthelemy"
  - "Sudan"
  - "Syrian Arab Republic"
removed:
  - "Burma"
  - "England"
  - "Espana"
  - "Northern Ireland"
  - "Scotland"
  - "Korea (South)"
  - "Trinidad"
  - "Wales"
updated:
  - "Falkland Islands"
    - "Falkland Islands (Malvinas)"
  - "Heard and Mc Donald Islands"
    - "Heard and McDonald Islands"
  - "Iran"
    - "Iran, Islamic Republic of"
  - "East Timor"
    - "Timor-Leste"
  - "South Korea"
    - "Korea, Republic of"
  - "Korea, Republic of"
    - "Korea, Democratic People's Republic of"
  - "Macau"
    - "Macao"
  - "Macedonia"
    - "Macedonia, The Former Yugoslav Republic Of"
  - "Russia"
    - "Russian Federation"
  - "Samoa (Independent)"
    - "Samoa"
  - "Serbia and Montenegro"
    - "Serbia"
  - "St. Helena"
    - "Saint Helena"
  - "St. Pierre and Miquelon"
    - "Saint Pierre and Miquelon"
  - "Svalbard and Jan Mayen Islands"
    - "Svalbard and Jan Mayen"
  - "Taiwan"
    - "Taiwan, Province of China"
  - "Tanzania"
    - "Tanzania, United Republic of"
  - "Vatican City State (Holy See)"
    - "Holy See (Vatican City State)"
  - "Virgin Islands (British)"
    - "Virgin Islands, British"
  - "Virgin Islands (U.S.)"
    - "Virgin Islands, U.S."
  - "Wallis and Futuna Islands"
    - "Wallis and Futuna"
moved:
  - "Ireland"
  - "Israel"
  - "Italy"

10/15/07 05:39:51 changed by abhay

  • attachment iso3166_synced_country_select.diff added.

10/15/07 06:52:04 changed by nzkoz

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [7904]) Sync country_select with ISO 3166 long names. Closes #6872 [abhay, mikong, ruben]

12/03/07 22:42:56 changed by johnjosephbachir

  • status changed from closed to reopened.
  • resolution deleted.
  • milestone changed from 1.2.5 to 1.2.6.

The list still contains both Great Britain and United Kingdom. Great Britain is not in ISO 3166:

http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm

12/05/07 05:55:29 changed by nzkoz

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [8277]) Remove Great Britain from the Country select helper to ensure consistency with iso 3166's long_names. Closes #6872 [Koz]