SmileyChris / django-countries

A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.
https://pypi.python.org/pypi/django-countries
MIT License
1.43k stars 291 forks source link

Capitalization and diacritics in some country names #16

Closed SmileyChris closed 10 years ago

SmileyChris commented 11 years ago

While comparing the names of countries in the lists with those from iso-codes (http://packages.debian.org/iso-codes) I found some minor differences that should be fixed.

The attached patch fixes all differences that I could find and for the record, those were my references:


SmileyChris commented 11 years ago

body: ! 'Issue #29 was marked as a duplicate of this issue.' created_at: '2013-03-29 18:08:00+00:00' user: ! 'Chris Beaven' number: 3562141

SmileyChris commented 11 years ago

body: ! 'I have similar problem with Kosovo. It is not listed in ISO yet, but country is present and some code is used for this country already.

See http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#User-assigned_code_elements

"The code XK is being used by the European Commission,[20] Switzerland,[21] the Deutsche Bundesbank,[22] and other organizations as a temporary country code for Kosovo.[23]"

[20] http://ec.europa.eu/budget/inforeuro/index.cfm?fuseaction=about&Language=en

[21] http://www.ezv.admin.ch/pdf_linker.php?doc=Tares_Laenderverzeichnis

[22] http://www.bundesbank.de/download/meldewesen/aussenwirtschaft/schluessel/laenderverzeichnis.pdf

[23] http://geonames.wordpress.com/2010/03/08/xk-country-code-for-kosovo/' created_at: '2012-11-19 10:38:39+00:00' user: ! 'Artem Skoretskiy' number: 2422483

SmileyChris commented 11 years ago

body: ! 'Hi, I apologise for my slow response -- haven''t checked up on this project in a while...

I''m wondering about how to keep most politically neutral while providing the options people want.

My current thoughts are that we have a setting that switches between official ISO-3166 and disputed names.

Rather than using the constants from countries.py, I''d say we have a utils.py that has a manual section of the disputed names and the following functions: get_countries() and get_countries_plus(). Those functions build the choices out, respecting the user''s setting.

How does that sound?' created_at: '2012-08-20 02:26:24+00:00' user: ! 'Chris Beaven' number: 1833547

SmileyChris commented 11 years ago

body: ! 'Hi, I would hope you to make this change patch as well. Self-disclosure: I''m a Taiwanese people. It was some political history that got us into this situation. I agree with using the name Taiwan, as it is a name being adopted by the most of the commercial company and open source communities, and it is indeed a political-wise neutral naming.

Since this is a very very old issue, I would like to ask. Is there anyway I could help on this issue to make it being integrated into the mainstream faster? I could help on code as well. :)

Thanks.' created_at: '2012-07-04 10:22:18+00:00' user: ! 'Zero Cho' number: 1625511

SmileyChris commented 11 years ago

body: ! 'Chris, it''s not just about capitalization. Michael also changed "The Former Yugoslav Republic of Macedonia" to "Republic of Macedonia", the current official name used by the country. See http://en.wikipedia.org/wiki/ISO_3166-1#Naming_and_code_construction for country names that are subject to dispute. The UN is actually waiting for the final resolution between this country and Greece.

I think we should at least change "Taiwan, Province of China" to "Taiwan". This change is actually less controversial than the Macedonia case in terms of international acceptance and usability. Note that the official name of the current government in Taiwan is "Republic of China" but is not wildly used anyway.

Perhaps we want to improve the generator AND have two special rules for Republic of Macedonia and Taiwan?' created_at: '2012-07-04 04:46:34+00:00' user: ! 'favonia' number: 1624362

SmileyChris commented 11 years ago

body: ! 'There was an argument about the name of Taiwan, which is represented as “Taiwan, Province of China” in ISO 3166-1 however many governments and companies prevent from using that name because it is politically biased and most Taiwan people don''t like.

Country names in Rails has been an argument in 2008, which Rails separate the country name list all together in the consequence, and caused another group of people forked the country name list and use IBM''s ICU Project instead of ISO 3166-1.

The reason why I am requesting here is that Arch Linux''s download page and mirrorlist is generated with django-countries, which, of course, shown up “Taiwan, Province of China” in the list. Arch Linux maintainers suggests us report this incident to upstream due to their KISS principle.' created_at: '2012-07-04 03:14:20+00:00' user: Anonymous number: 1624176

SmileyChris commented 11 years ago

body: ! 'Thanks for looking at this, Michael.

Rather than patching that file directly, we should make changes to https://bitbucket.org/smileychris/django-countries/src/bf96ebeb6ecd/django_countries/bin/regenerate.py so it''s smarter about capitalization when it pulls in the uppercase-only countries from the official iso list.' created_at: '2011-11-02 23:10:12+00:00' user: ! 'Chris Beaven' number: 756719

SmileyChris commented 10 years ago

ISO's new source has the correct capitalization, so we don't need titlecase or any of that craziness now.

wctaiwan commented 10 years ago

Hi, any chance of changing the bit about Taiwan? The issue with Arch's mirror list still stands. Thanks.

SmileyChris commented 10 years ago

If anyone is passionate about this, see #60