Skip to content

Commit 0df0e00

Browse files
committed
Add iso_short_name_lower_case attribute as an alternative to #907
1 parent c9dfb65 commit 0df0e00

36 files changed

+77
-33
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ c.gec # => "US"
9696
```ruby
9797
c.iso_long_name # => "The United States of America"
9898
c.iso_short_name # => "United States of America"
99+
c.iso_short_name_lower_case # => "United States of America (the)"
99100
c.common_name # => "United States" (This is a shortcut for c.translations('en'))
100101
c.unofficial_names # => ["United States of America", "Vereinigte Staaten von Amerika", "États-Unis", "Estados Unidos"]
101102

lib/countries/cache/countries.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/countries/country.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ def in_un?
103103
data['un_member'].nil? ? false : data['un_member']
104104
end
105105

106+
# @return [String] The ISO 3166-1 "Short name lower case" value for this Country.
107+
def iso_short_name_lower_case
108+
data['iso_short_name_lower_case'].nil? ? data['iso_short_name'] : data['iso_short_name_lower_case']
109+
end
110+
106111
# @return [String] The regex for valid postal codes in this Country
107112
def postal_code_format
108113
"\\A#{data['postal_code_format']}\\Z" if postal_code

lib/countries/data/countries/AE.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ AE:
2929
international_prefix: '00'
3030
ioc: UAE
3131
iso_long_name: The United Arab Emirates
32-
iso_short_name: United Arab Emirates (the)
32+
iso_short_name: United Arab Emirates
33+
iso_short_name_lower_case: United Arab Emirates (the)
3334
languages_official:
3435
- ar
3536
languages_spoken:

lib/countries/data/countries/BS.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ BS:
2424
international_prefix: '011'
2525
ioc: BAH
2626
iso_long_name: The Commonwealth of The Bahamas
27-
iso_short_name: Bahamas (the)
27+
iso_short_name: Bahamas
28+
iso_short_name_lower_case: Bahamas (the)
2829
languages_official:
2930
- en
3031
languages_spoken:

lib/countries/data/countries/CC.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ CC:
2424
international_prefix: '0011'
2525
ioc:
2626
iso_long_name: The Territory of Cocos (Keeling) Islands
27-
iso_short_name: Cocos (Keeling) Islands (the)
27+
iso_short_name: Cocos (Keeling) Islands
28+
iso_short_name_lower_case: Cocos (Keeling) Islands (the)
2829
languages_official:
2930
- en
3031
languages_spoken:

lib/countries/data/countries/CD.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ CD:
2424
international_prefix: '00'
2525
ioc: COD
2626
iso_long_name: The Democratic Republic of the Congo
27-
iso_short_name: Congo (the Democratic Republic of the)
27+
iso_short_name: Congo (Democratic Republic of the)
28+
iso_short_name_lower_case: Congo (the Democratic Republic of the)
2829
languages_official:
2930
- fr
3031
- ln

lib/countries/data/countries/CF.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ CF:
2424
international_prefix: '00'
2525
ioc: CAF
2626
iso_long_name: The Central African Republic
27-
iso_short_name: Central African Republic (the)
27+
iso_short_name: Central African Republic
28+
iso_short_name_lower_case: Central African Republic (the)
2829
languages_official:
2930
- fr
3031
- sg

lib/countries/data/countries/CG.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ CG:
2424
international_prefix: '00'
2525
ioc: CGO
2626
iso_long_name: The Republic of the Congo
27-
iso_short_name: Congo (the)
27+
iso_short_name: Congo
28+
iso_short_name_lower_case: Congo (the)
2829
languages_official:
2930
- fr
3031
- ln

lib/countries/data/countries/CK.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ CK:
2424
international_prefix: '00'
2525
ioc: COK
2626
iso_long_name: The Cook Islands
27-
iso_short_name: Cook Islands (the)
27+
iso_short_name: Cook Islands
28+
iso_short_name_lower_case: Cook Islands (the)
2829
languages_official:
2930
- en
3031
languages_spoken:

0 commit comments

Comments
 (0)