country-select-engine 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. data/.gitignore +25 -0
  2. data/Gemfile +17 -0
  3. data/Gemfile.lock +97 -0
  4. data/MIT-LICENSE +20 -0
  5. data/README.rdoc +105 -0
  6. data/Rakefile +29 -0
  7. data/config/locales/countries.de.yml +268 -0
  8. data/config/locales/countries.en-US.yml +268 -0
  9. data/config/locales/countries.en.yml +268 -0
  10. data/config/locales/countries.es.yml +268 -0
  11. data/config/locales/countries.fr.yml +268 -0
  12. data/config/locales/countries.it.yml +268 -0
  13. data/config/locales/countries.ja.yml +268 -0
  14. data/config/locales/countries.ru.yml +268 -0
  15. data/config/locales/countries.zh-CN.yml +268 -0
  16. data/config/locales/countries.zh-TW.yml +268 -0
  17. data/config/locales/currencies.de.yml +163 -0
  18. data/config/locales/currencies.en-US.yml +163 -0
  19. data/config/locales/currencies.en.yml +163 -0
  20. data/config/locales/currencies.es.yml +163 -0
  21. data/config/locales/currencies.fr.yml +163 -0
  22. data/config/locales/currencies.it.yml +163 -0
  23. data/config/locales/currencies.ja.yml +163 -0
  24. data/config/locales/currencies.ru.yml +163 -0
  25. data/config/locales/currencies.zh-CN.yml +163 -0
  26. data/config/locales/currencies.zh-TW.yml +163 -0
  27. data/config/locales/languages.de.yml +12 -0
  28. data/config/locales/languages.en-US.yml +12 -0
  29. data/config/locales/languages.en.yml +12 -0
  30. data/config/locales/languages.es.yml +12 -0
  31. data/config/locales/languages.fr.yml +12 -0
  32. data/config/locales/languages.it.yml +12 -0
  33. data/config/locales/languages.ja.yml +12 -0
  34. data/config/locales/languages.ru.yml +12 -0
  35. data/config/locales/languages.zh-CN.yml +12 -0
  36. data/config/locales/languages.zh-TW.yml +12 -0
  37. data/config/locales/timezones.de.yml +144 -0
  38. data/config/locales/timezones.en.yml +144 -0
  39. data/config/locales/timezones.es.yml +144 -0
  40. data/config/locales/timezones.fr.yml +144 -0
  41. data/config/locales/timezones.it.yml +144 -0
  42. data/config/locales/timezones.ja.yml +144 -0
  43. data/config/locales/timezones.ru.yml +144 -0
  44. data/config/locales/timezones.zh-CN.yml +144 -0
  45. data/config/locales/timezones.zh-TW.yml +144 -0
  46. data/config/routes.rb +2 -0
  47. data/country-select-engine.gemspec +26 -0
  48. data/lib/content_helper.rb +43 -0
  49. data/lib/country-select-engine/engine.rb +4 -0
  50. data/lib/country-select-engine/version.rb +3 -0
  51. data/lib/country-select-engine.rb +181 -0
  52. data/lib/parse_helper.rb +26 -0
  53. data/lib/tasks/import_locales.rake +72 -0
  54. data/script/convert_cldr.rb +116 -0
  55. data/script/google.yml +143 -0
  56. data/script/google.zh-TW.yml +143 -0
  57. data/script/rails +8 -0
  58. data/script/timezones.yml +144 -0
  59. data/script/translate_timezones.rb +26 -0
  60. data/spec/dummy/README.rdoc +261 -0
  61. data/spec/dummy/Rakefile +7 -0
  62. data/spec/dummy/app/assets/javascripts/application.js +16 -0
  63. data/spec/dummy/app/assets/javascripts/dummy.js +2 -0
  64. data/spec/dummy/app/assets/stylesheets/application.css +14 -0
  65. data/spec/dummy/app/assets/stylesheets/dummy.css +4 -0
  66. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  67. data/spec/dummy/app/controllers/dummy_controller.rb +4 -0
  68. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  69. data/spec/dummy/app/helpers/dummy_helper.rb +2 -0
  70. data/spec/dummy/app/mailers/.gitkeep +0 -0
  71. data/spec/dummy/app/models/.gitkeep +0 -0
  72. data/spec/dummy/app/views/dummy/index.html.erb +41 -0
  73. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  74. data/spec/dummy/config/application.rb +62 -0
  75. data/spec/dummy/config/boot.rb +10 -0
  76. data/spec/dummy/config/database.yml +25 -0
  77. data/spec/dummy/config/environment.rb +5 -0
  78. data/spec/dummy/config/environments/development.rb +37 -0
  79. data/spec/dummy/config/environments/production.rb +67 -0
  80. data/spec/dummy/config/environments/test.rb +37 -0
  81. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  82. data/spec/dummy/config/initializers/inflections.rb +15 -0
  83. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  84. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  85. data/spec/dummy/config/initializers/session_store.rb +8 -0
  86. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  87. data/spec/dummy/config/routes.rb +60 -0
  88. data/spec/dummy/config.ru +4 -0
  89. data/spec/dummy/db/development.sqlite3 +0 -0
  90. data/spec/dummy/lib/assets/.gitkeep +0 -0
  91. data/spec/dummy/log/.gitkeep +0 -0
  92. data/spec/dummy/public/404.html +26 -0
  93. data/spec/dummy/public/422.html +26 -0
  94. data/spec/dummy/public/500.html +25 -0
  95. data/spec/dummy/public/favicon.ico +0 -0
  96. data/spec/dummy/script/rails +6 -0
  97. data/spec/localized_country_select_test.rb +134 -0
  98. data/spec/spec_helper.rb +32 -0
  99. data/vendor/assets/images/chosen-sprite.png +0 -0
  100. data/vendor/assets/javascripts/chosen.jquery.min.js +10 -0
  101. data/vendor/assets/stylesheets/chosen.css +396 -0
  102. metadata +209 -0
@@ -0,0 +1,268 @@
1
+ en-US:
2
+ countries:
3
+ AD: Andorra
4
+ AE: United Arab Emirates
5
+ AF: Afghanistan
6
+ AG: Antigua and Barbuda
7
+ AI: Anguilla
8
+ AL: Albania
9
+ AM: Armenia
10
+ AN: Netherlands Antilles
11
+ AO: Angola
12
+ AQ: Antarctica
13
+ AR: Argentina
14
+ AS: American Samoa
15
+ AT: Austria
16
+ AU: Australia
17
+ AW: Aruba
18
+ AX: Åland Islands
19
+ AZ: Azerbaijan
20
+ BA: Bosnia and Herzegovina
21
+ BB: Barbados
22
+ BD: Bangladesh
23
+ BE: Belgium
24
+ BF: Burkina Faso
25
+ BG: Bulgaria
26
+ BH: Bahrain
27
+ BI: Burundi
28
+ BJ: Benin
29
+ BL: Saint Barthélemy
30
+ BM: Bermuda
31
+ BN: Brunei
32
+ BO: Bolivia
33
+ BQ: British Antarctic Territory
34
+ BR: Brazil
35
+ BS: Bahamas
36
+ BT: Bhutan
37
+ BV: Bouvet Island
38
+ BW: Botswana
39
+ BY: Belarus
40
+ BZ: Belize
41
+ CA: Canada
42
+ CC: Cocos [Keeling] Islands
43
+ CD: Congo [DRC]
44
+ CF: Central African Republic
45
+ CG: Congo [Republic]
46
+ CH: Switzerland
47
+ CI: Ivory Coast
48
+ CK: Cook Islands
49
+ CL: Chile
50
+ CM: Cameroon
51
+ CN: China
52
+ CO: Colombia
53
+ CR: Costa Rica
54
+ CS: Serbia and Montenegro
55
+ CT: Canton and Enderbury Islands
56
+ CU: Cuba
57
+ CV: Cape Verde
58
+ CX: Christmas Island
59
+ CY: Cyprus
60
+ CZ: Czech Republic
61
+ DD: East Germany
62
+ DE: Germany
63
+ DJ: Djibouti
64
+ DK: Denmark
65
+ DM: Dominica
66
+ DO: Dominican Republic
67
+ DZ: Algeria
68
+ EC: Ecuador
69
+ EE: Estonia
70
+ EG: Egypt
71
+ EH: Western Sahara
72
+ ER: Eritrea
73
+ ES: Spain
74
+ ET: Ethiopia
75
+ FI: Finland
76
+ FJ: Fiji
77
+ FK: Falkland Islands [Islas Malvinas]
78
+ FM: Micronesia
79
+ FO: Faroe Islands
80
+ FQ: French Southern and Antarctic Territories
81
+ FR: France
82
+ FX: Metropolitan France
83
+ GA: Gabon
84
+ GB: United Kingdom
85
+ GD: Grenada
86
+ GE: Georgia
87
+ GF: French Guiana
88
+ GG: Guernsey
89
+ GH: Ghana
90
+ GI: Gibraltar
91
+ GL: Greenland
92
+ GM: Gambia
93
+ GN: Guinea
94
+ GP: Guadeloupe
95
+ GQ: Equatorial Guinea
96
+ GR: Greece
97
+ GS: South Georgia and the South Sandwich Islands
98
+ GT: Guatemala
99
+ GU: Guam
100
+ GW: Guinea-Bissau
101
+ GY: Guyana
102
+ HK: Hong Kong
103
+ HM: Heard Island and McDonald Islands
104
+ HN: Honduras
105
+ HR: Croatia
106
+ HT: Haiti
107
+ HU: Hungary
108
+ ID: Indonesia
109
+ IE: Ireland
110
+ IL: Israel
111
+ IM: Isle of Man
112
+ IN: India
113
+ IO: British Indian Ocean Territory
114
+ IQ: Iraq
115
+ IR: Iran
116
+ IS: Iceland
117
+ IT: Italy
118
+ JE: Jersey
119
+ JM: Jamaica
120
+ JO: Jordan
121
+ JP: Japan
122
+ JT: Johnston Island
123
+ KE: Kenya
124
+ KG: Kyrgyzstan
125
+ KH: Cambodia
126
+ KI: Kiribati
127
+ KM: Comoros
128
+ KN: Saint Kitts and Nevis
129
+ KP: North Korea
130
+ KR: South Korea
131
+ KW: Kuwait
132
+ KY: Cayman Islands
133
+ KZ: Kazakhstan
134
+ LA: Laos
135
+ LB: Lebanon
136
+ LC: Saint Lucia
137
+ LI: Liechtenstein
138
+ LK: Sri Lanka
139
+ LR: Liberia
140
+ LS: Lesotho
141
+ LT: Lithuania
142
+ LU: Luxembourg
143
+ LV: Latvia
144
+ LY: Libya
145
+ MA: Morocco
146
+ MC: Monaco
147
+ MD: Moldova
148
+ ME: Montenegro
149
+ MF: Saint Martin
150
+ MG: Madagascar
151
+ MH: Marshall Islands
152
+ MI: Midway Islands
153
+ MK: Macedonia [FYROM]
154
+ ML: Mali
155
+ MM: Myanmar [Burma]
156
+ MN: Mongolia
157
+ MO: Macau
158
+ MP: Northern Mariana Islands
159
+ MQ: Martinique
160
+ MR: Mauritania
161
+ MS: Montserrat
162
+ MT: Malta
163
+ MU: Mauritius
164
+ MV: Maldives
165
+ MW: Malawi
166
+ MX: Mexico
167
+ MY: Malaysia
168
+ MZ: Mozambique
169
+ NA: Namibia
170
+ NC: New Caledonia
171
+ NE: Niger
172
+ NF: Norfolk Island
173
+ NG: Nigeria
174
+ NI: Nicaragua
175
+ NL: Netherlands
176
+ 'NO': Norway
177
+ NP: Nepal
178
+ NQ: Dronning Maud Land
179
+ NR: Nauru
180
+ NT: Neutral Zone
181
+ NU: Niue
182
+ NZ: New Zealand
183
+ OM: Oman
184
+ PA: Panama
185
+ PC: Pacific Islands Trust Territory
186
+ PE: Peru
187
+ PF: French Polynesia
188
+ PG: Papua New Guinea
189
+ PH: Philippines
190
+ PK: Pakistan
191
+ PL: Poland
192
+ PM: Saint Pierre and Miquelon
193
+ PN: Pitcairn Islands
194
+ PR: Puerto Rico
195
+ PS: Palestinian Territories
196
+ PT: Portugal
197
+ PU: U.S. Miscellaneous Pacific Islands
198
+ PW: Palau
199
+ PY: Paraguay
200
+ PZ: Panama Canal Zone
201
+ QA: Qatar
202
+ QO: Outlying Oceania
203
+ QU: European Union
204
+ RE: Réunion
205
+ RO: Romania
206
+ RS: Serbia
207
+ RU: Russia
208
+ RW: Rwanda
209
+ SA: Saudi Arabia
210
+ SB: Solomon Islands
211
+ SC: Seychelles
212
+ SD: Sudan
213
+ SE: Sweden
214
+ SG: Singapore
215
+ SH: Saint Helena
216
+ SI: Slovenia
217
+ SJ: Svalbard and Jan Mayen
218
+ SK: Slovakia
219
+ SL: Sierra Leone
220
+ SM: San Marino
221
+ SN: Senegal
222
+ SO: Somalia
223
+ SR: Suriname
224
+ ST: São Tomé and Príncipe
225
+ SU: Union of Soviet Socialist Republics
226
+ SV: El Salvador
227
+ SY: Syria
228
+ SZ: Swaziland
229
+ TC: Turks and Caicos Islands
230
+ TD: Chad
231
+ TF: French Southern Territories
232
+ TG: Togo
233
+ TH: Thailand
234
+ TJ: Tajikistan
235
+ TK: Tokelau
236
+ TL: East Timor
237
+ TM: Turkmenistan
238
+ TN: Tunisia
239
+ TO: Tonga
240
+ TR: Turkey
241
+ TT: Trinidad and Tobago
242
+ TV: Tuvalu
243
+ TW: Taiwan
244
+ TZ: Tanzania
245
+ UA: Ukraine
246
+ UG: Uganda
247
+ UM: U.S. Minor Outlying Islands
248
+ US: United States
249
+ UY: Uruguay
250
+ UZ: Uzbekistan
251
+ VA: Vatican City
252
+ VC: Saint Vincent and the Grenadines
253
+ VD: North Vietnam
254
+ VE: Venezuela
255
+ VG: British Virgin Islands
256
+ VI: U.S. Virgin Islands
257
+ VN: Vietnam
258
+ VU: Vanuatu
259
+ WF: Wallis and Futuna
260
+ WK: Wake Island
261
+ WS: Samoa
262
+ YD: People's Democratic Republic of Yemen
263
+ YE: Yemen
264
+ YT: Mayotte
265
+ ZA: South Africa
266
+ ZM: Zambia
267
+ ZW: Zimbabwe
268
+ ZZ: Unknown or Invalid Region
@@ -0,0 +1,268 @@
1
+ en:
2
+ countries:
3
+ AD: Andorra
4
+ AE: United Arab Emirates
5
+ AF: Afghanistan
6
+ AG: Antigua and Barbuda
7
+ AI: Anguilla
8
+ AL: Albania
9
+ AM: Armenia
10
+ AN: Netherlands Antilles
11
+ AO: Angola
12
+ AQ: Antarctica
13
+ AR: Argentina
14
+ AS: American Samoa
15
+ AT: Austria
16
+ AU: Australia
17
+ AW: Aruba
18
+ AX: Åland Islands
19
+ AZ: Azerbaijan
20
+ BA: Bosnia and Herzegovina
21
+ BB: Barbados
22
+ BD: Bangladesh
23
+ BE: Belgium
24
+ BF: Burkina Faso
25
+ BG: Bulgaria
26
+ BH: Bahrain
27
+ BI: Burundi
28
+ BJ: Benin
29
+ BL: Saint Barthélemy
30
+ BM: Bermuda
31
+ BN: Brunei
32
+ BO: Bolivia
33
+ BQ: British Antarctic Territory
34
+ BR: Brazil
35
+ BS: Bahamas
36
+ BT: Bhutan
37
+ BV: Bouvet Island
38
+ BW: Botswana
39
+ BY: Belarus
40
+ BZ: Belize
41
+ CA: Canada
42
+ CC: Cocos [Keeling] Islands
43
+ CD: Congo [DRC]
44
+ CF: Central African Republic
45
+ CG: Congo [Republic]
46
+ CH: Switzerland
47
+ CI: Ivory Coast
48
+ CK: Cook Islands
49
+ CL: Chile
50
+ CM: Cameroon
51
+ CN: China
52
+ CO: Colombia
53
+ CR: Costa Rica
54
+ CS: Serbia and Montenegro
55
+ CT: Canton and Enderbury Islands
56
+ CU: Cuba
57
+ CV: Cape Verde
58
+ CX: Christmas Island
59
+ CY: Cyprus
60
+ CZ: Czech Republic
61
+ DD: East Germany
62
+ DE: Germany
63
+ DJ: Djibouti
64
+ DK: Denmark
65
+ DM: Dominica
66
+ DO: Dominican Republic
67
+ DZ: Algeria
68
+ EC: Ecuador
69
+ EE: Estonia
70
+ EG: Egypt
71
+ EH: Western Sahara
72
+ ER: Eritrea
73
+ ES: Spain
74
+ ET: Ethiopia
75
+ FI: Finland
76
+ FJ: Fiji
77
+ FK: Falkland Islands [Islas Malvinas]
78
+ FM: Micronesia
79
+ FO: Faroe Islands
80
+ FQ: French Southern and Antarctic Territories
81
+ FR: France
82
+ FX: Metropolitan France
83
+ GA: Gabon
84
+ GB: United Kingdom
85
+ GD: Grenada
86
+ GE: Georgia
87
+ GF: French Guiana
88
+ GG: Guernsey
89
+ GH: Ghana
90
+ GI: Gibraltar
91
+ GL: Greenland
92
+ GM: Gambia
93
+ GN: Guinea
94
+ GP: Guadeloupe
95
+ GQ: Equatorial Guinea
96
+ GR: Greece
97
+ GS: South Georgia and the South Sandwich Islands
98
+ GT: Guatemala
99
+ GU: Guam
100
+ GW: Guinea-Bissau
101
+ GY: Guyana
102
+ HK: Hong Kong
103
+ HM: Heard Island and McDonald Islands
104
+ HN: Honduras
105
+ HR: Croatia
106
+ HT: Haiti
107
+ HU: Hungary
108
+ ID: Indonesia
109
+ IE: Ireland
110
+ IL: Israel
111
+ IM: Isle of Man
112
+ IN: India
113
+ IO: British Indian Ocean Territory
114
+ IQ: Iraq
115
+ IR: Iran
116
+ IS: Iceland
117
+ IT: Italy
118
+ JE: Jersey
119
+ JM: Jamaica
120
+ JO: Jordan
121
+ JP: Japan
122
+ JT: Johnston Island
123
+ KE: Kenya
124
+ KG: Kyrgyzstan
125
+ KH: Cambodia
126
+ KI: Kiribati
127
+ KM: Comoros
128
+ KN: Saint Kitts and Nevis
129
+ KP: North Korea
130
+ KR: South Korea
131
+ KW: Kuwait
132
+ KY: Cayman Islands
133
+ KZ: Kazakhstan
134
+ LA: Laos
135
+ LB: Lebanon
136
+ LC: Saint Lucia
137
+ LI: Liechtenstein
138
+ LK: Sri Lanka
139
+ LR: Liberia
140
+ LS: Lesotho
141
+ LT: Lithuania
142
+ LU: Luxembourg
143
+ LV: Latvia
144
+ LY: Libya
145
+ MA: Morocco
146
+ MC: Monaco
147
+ MD: Moldova
148
+ ME: Montenegro
149
+ MF: Saint Martin
150
+ MG: Madagascar
151
+ MH: Marshall Islands
152
+ MI: Midway Islands
153
+ MK: Macedonia [FYROM]
154
+ ML: Mali
155
+ MM: Myanmar [Burma]
156
+ MN: Mongolia
157
+ MO: Macau
158
+ MP: Northern Mariana Islands
159
+ MQ: Martinique
160
+ MR: Mauritania
161
+ MS: Montserrat
162
+ MT: Malta
163
+ MU: Mauritius
164
+ MV: Maldives
165
+ MW: Malawi
166
+ MX: Mexico
167
+ MY: Malaysia
168
+ MZ: Mozambique
169
+ NA: Namibia
170
+ NC: New Caledonia
171
+ NE: Niger
172
+ NF: Norfolk Island
173
+ NG: Nigeria
174
+ NI: Nicaragua
175
+ NL: Netherlands
176
+ 'NO': Norway
177
+ NP: Nepal
178
+ NQ: Dronning Maud Land
179
+ NR: Nauru
180
+ NT: Neutral Zone
181
+ NU: Niue
182
+ NZ: New Zealand
183
+ OM: Oman
184
+ PA: Panama
185
+ PC: Pacific Islands Trust Territory
186
+ PE: Peru
187
+ PF: French Polynesia
188
+ PG: Papua New Guinea
189
+ PH: Philippines
190
+ PK: Pakistan
191
+ PL: Poland
192
+ PM: Saint Pierre and Miquelon
193
+ PN: Pitcairn Islands
194
+ PR: Puerto Rico
195
+ PS: Palestinian Territories
196
+ PT: Portugal
197
+ PU: U.S. Miscellaneous Pacific Islands
198
+ PW: Palau
199
+ PY: Paraguay
200
+ PZ: Panama Canal Zone
201
+ QA: Qatar
202
+ QO: Outlying Oceania
203
+ QU: European Union
204
+ RE: Réunion
205
+ RO: Romania
206
+ RS: Serbia
207
+ RU: Russia
208
+ RW: Rwanda
209
+ SA: Saudi Arabia
210
+ SB: Solomon Islands
211
+ SC: Seychelles
212
+ SD: Sudan
213
+ SE: Sweden
214
+ SG: Singapore
215
+ SH: Saint Helena
216
+ SI: Slovenia
217
+ SJ: Svalbard and Jan Mayen
218
+ SK: Slovakia
219
+ SL: Sierra Leone
220
+ SM: San Marino
221
+ SN: Senegal
222
+ SO: Somalia
223
+ SR: Suriname
224
+ ST: São Tomé and Príncipe
225
+ SU: Union of Soviet Socialist Republics
226
+ SV: El Salvador
227
+ SY: Syria
228
+ SZ: Swaziland
229
+ TC: Turks and Caicos Islands
230
+ TD: Chad
231
+ TF: French Southern Territories
232
+ TG: Togo
233
+ TH: Thailand
234
+ TJ: Tajikistan
235
+ TK: Tokelau
236
+ TL: East Timor
237
+ TM: Turkmenistan
238
+ TN: Tunisia
239
+ TO: Tonga
240
+ TR: Turkey
241
+ TT: Trinidad and Tobago
242
+ TV: Tuvalu
243
+ TW: Taiwan
244
+ TZ: Tanzania
245
+ UA: Ukraine
246
+ UG: Uganda
247
+ UM: U.S. Minor Outlying Islands
248
+ US: United States
249
+ UY: Uruguay
250
+ UZ: Uzbekistan
251
+ VA: Vatican City
252
+ VC: Saint Vincent and the Grenadines
253
+ VD: North Vietnam
254
+ VE: Venezuela
255
+ VG: British Virgin Islands
256
+ VI: U.S. Virgin Islands
257
+ VN: Vietnam
258
+ VU: Vanuatu
259
+ WF: Wallis and Futuna
260
+ WK: Wake Island
261
+ WS: Samoa
262
+ YD: People's Democratic Republic of Yemen
263
+ YE: Yemen
264
+ YT: Mayotte
265
+ ZA: South Africa
266
+ ZM: Zambia
267
+ ZW: Zimbabwe
268
+ ZZ: Unknown or Invalid Region