diff options
author | Aishwarya Subramanian <asubramanian@gitlab.com> | 2019-09-11 16:02:11 +0000 |
---|---|---|
committer | James Lopez <james@gitlab.com> | 2019-09-11 16:02:11 +0000 |
commit | 54b51d956e6fd1439f303f233da167d62ce2e50a (patch) | |
tree | b4d3d8f85518da9c780a029b221b9aa2a0aa4391 /config/initializers/countries.rb | |
parent | 3ffdae92b3575960e21515e7646a6f906e9ac1e0 (diff) | |
download | gitlab-ce-54b51d956e6fd1439f303f233da167d62ce2e50a.tar.gz |
Back port changes for country list Api
Diffstat (limited to 'config/initializers/countries.rb')
-rw-r--r-- | config/initializers/countries.rb | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/config/initializers/countries.rb b/config/initializers/countries.rb new file mode 100644 index 00000000000..d65ae19852f --- /dev/null +++ b/config/initializers/countries.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +ISO3166.configure do |config| + config.locales = [:en] +end + +# GitLab permits users to sign up in Ukraine except the Crimean Region: https://about.gitlab.com/handbook/people-operations/code-of-conduct/#trade-compliance-exportimport-control +# This overrides the display name for Ukraine to Ukraine (except Crimean Region) +# To be removed after https://gitlab.com/gitlab-org/gitlab-ee/issues/14784 is implemented +# Data fetched is based on https://github.com/hexorx/countries/blob/master/lib/countries/data/countries/UA.yaml +ISO3166::Data.register( + continent: "Europe", + address_format: "|- + {{recipient}} + {{street}} + {{city}} {{region_short}} + {{postalcode}} + {{country}}", + alpha2: "UA", + alpha3: "UKR", + country_code: '380', + international_prefix: '810', + ioc: "UKR", + gec: "UP", + name: "Ukraine (except Crimean Region)", + national_destination_code_lengths: [2], + national_number_lengths: [8, 9], + national_prefix: '8', + number: '804', + region: "Europe", + subregion: "Eastern Europe", + world_region: "EMEA", + un_locode: "UA", + nationality: "Ukrainian", + vat_rates: { + standard: 20 + }, + reduced: [7], + super_reduced: { + parking: { postal_code: true } + }, + unofficial_names: %w(Ukraine Ucrania ウクライナ Oekraïne Украина Україна Украіна), + languages_official: ["uk"], + languages_spoken: ["uk"], + geo: { + latitude: 48.379433, + latitude_dec: '48.92656326293945', + longitude: 31.16558, + longitude_dec: '31.47578239440918', + max_latitude: 52.37958099999999, + max_longitude: 40.2285809, + min_latitude: 44.2924, + min_longitude: 22.137159, + bounds: { + northeast: { lat: 52.37958099999999, lng: 40.2285809 }, + southwest: { lat: 44.2924, lng: 22.137159 } + } + }, + currency_code: "UAH", + start_of_week: "monday" +) |