From: Jarkko Hietaniemi Date: Fri, 24 May 2002 14:23:06 +0000 (+0000) Subject: Upgrade to Locale-Codes 2.04. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8d2e4c0e08773566fd8ab1491cbb72a22d4e7f71;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Locale-Codes 2.04. p4raw-id: //depot/perl@16765 --- diff --git a/lib/Locale/Codes/ChangeLog b/lib/Locale/Codes/ChangeLog index 61c7e5b..1f836f0 100644 --- a/lib/Locale/Codes/ChangeLog +++ b/lib/Locale/Codes/ChangeLog @@ -1,6 +1,20 @@ ChangeLog for Locale-Codes Distribution +2.04 2002-05-23 neilb + + * updated according to changes in ISO 3166-1 described + in ISO 3166-1 newsletters V-4 and V-5, dated 2002-05-20: + - Kazakstan is now "Kazakhstan" + - Macau is now "Macao" + The old names are retained as aliases. + + The alpha-2 and alpha-3 codes for East Timor have changed: + tp -> tl + tmp -> tls + the numeric code stays 626. If you want to support the old + codes, you can use the semi-private function alias_code(). + 2.03 2002-03-24 neilb * Fixed a typo in the alias for the Vatican, reported (with patch) diff --git a/lib/Locale/Codes/t/country.t b/lib/Locale/Codes/t/country.t index 0953da1..5fa6b6d 100644 --- a/lib/Locale/Codes/t/country.t +++ b/lib/Locale/Codes/t/country.t @@ -48,6 +48,19 @@ use Locale::Country; ['code2country("zw") eq "Zimbabwe"', 0], # last in DATA segment ['code2country("gb") eq "United Kingdom"', 0], # United Kingdom is "gb", not "uk" + #-- tests added after changes in the standard 2002-05-20 ------ + ['code2country("kz") eq "Kazakhstan"', 0], + ['country2code("kazakhstan") eq "kz"', 0], + ['country2code("kazakstan") eq "kz"', 0], + + ['code2country("mo") eq "Macao"', 0], + ['country2code("macao") eq "mo"', 0], + ['country2code("macau") eq "mo"', 0], + + ['code2country("tl", LOCALE_CODE_ALPHA_2) eq "East Timor"', 0], + ['code2country("tls", LOCALE_CODE_ALPHA_3) eq "East Timor"', 0], + ['code2country("626", LOCALE_CODE_NUMERIC) eq "East Timor"', 0], + #================================================ # TESTS FOR country2code #================================================ diff --git a/lib/Locale/Country.pm b/lib/Locale/Country.pm index 7cbd617..fd7fcec 100644 --- a/lib/Locale/Country.pm +++ b/lib/Locale/Country.pm @@ -1,7 +1,7 @@ # # Locale::Country - ISO codes for country identification (ISO 3166) # -# $Id: Country.pm,v 2.3 2002/03/23 23:39:21 neilb Exp $ +# $Id: Country.pm,v 2.4 2002/05/20 05:05:18 neilb Exp $ # package Locale::Country; @@ -17,7 +17,7 @@ use Locale::Constants; # Public Global Variables #----------------------------------------------------------------------- use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); -$VERSION = sprintf("%d.%02d", q$Revision: 2.3 $ =~ /(\d+)\.(\d+)/); +$VERSION = sprintf("%d.%02d", q$Revision: 2.4 $ =~ /(\d+)\.(\d+)/); @ISA = qw(Exporter); @EXPORT = qw(code2country country2code all_country_codes all_country_names @@ -423,7 +423,7 @@ kp:prk:408:Korea, Democratic People's Republic of:Korea, North:North Korea kr:kor:410:Korea, Republic of:Korea, South:South Korea kw:kwt:414:Kuwait ky:cym:136:Cayman Islands -kz:kaz:398:Kazakstan +kz:kaz:398:Kazakhstan:Kazakstan la:lao:418:Lao People's Democratic Republic lb:lbn:422:Lebanon lc:lca:662:Saint Lucia @@ -444,7 +444,7 @@ mk:mkd:807:Macedonia, the Former Yugoslav Republic of:Macedonia, Former Yugoslav ml:mli:466:Mali mm:mmr:104:Myanmar mn:mng:496:Mongolia -mo:mac:446:Macau +mo:mac:446:Macao:Macau mp:mnp:580:Northern Mariana Islands mq:mtq:474:Martinique mr:mrt:478:Mauritania @@ -517,7 +517,7 @@ tk:tkl:772:Tokelau tm:tkm:795:Turkmenistan tn:tun:788:Tunisia to:ton:776:Tonga -tp:tmp:626:East Timor +tl:tls:626:East Timor tr:tur:792:Turkey tt:tto:780:Trinidad and Tobago tv:tuv:798:Tuvalu