worldwide 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/Gemfile.lock +2 -2
  4. data/db/data/regions/_default/bg-BG.yml +1 -0
  5. data/db/data/regions/_default/cs.yml +1 -0
  6. data/db/data/regions/_default/da.yml +1 -0
  7. data/db/data/regions/_default/de.yml +1 -0
  8. data/db/data/regions/_default/el.yml +1 -0
  9. data/db/data/regions/_default/en.yml +1 -0
  10. data/db/data/regions/_default/es.yml +1 -0
  11. data/db/data/regions/_default/fi.yml +1 -0
  12. data/db/data/regions/_default/fr.yml +1 -0
  13. data/db/data/regions/_default/hi.yml +1 -0
  14. data/db/data/regions/_default/hr-HR.yml +1 -0
  15. data/db/data/regions/_default/hu.yml +1 -0
  16. data/db/data/regions/_default/id.yml +1 -0
  17. data/db/data/regions/_default/it.yml +1 -0
  18. data/db/data/regions/_default/ja.yml +1 -0
  19. data/db/data/regions/_default/ko.yml +1 -0
  20. data/db/data/regions/_default/lt-LT.yml +1 -0
  21. data/db/data/regions/_default/ms.yml +1 -0
  22. data/db/data/regions/_default/nb.yml +1 -0
  23. data/db/data/regions/_default/nl.yml +1 -0
  24. data/db/data/regions/_default/pl.yml +1 -0
  25. data/db/data/regions/_default/pt-BR.yml +1 -0
  26. data/db/data/regions/_default/pt-PT.yml +1 -0
  27. data/db/data/regions/_default/ro-RO.yml +1 -0
  28. data/db/data/regions/_default/ru.yml +1 -0
  29. data/db/data/regions/_default/sk-SK.yml +1 -0
  30. data/db/data/regions/_default/sl-SI.yml +1 -0
  31. data/db/data/regions/_default/sv.yml +1 -0
  32. data/db/data/regions/_default/th.yml +1 -0
  33. data/db/data/regions/_default/tr.yml +1 -0
  34. data/db/data/regions/_default/vi.yml +1 -0
  35. data/db/data/regions/_default/zh-CN.yml +1 -0
  36. data/db/data/regions/_default/zh-TW.yml +1 -0
  37. data/lib/worldwide/scripts.rb +3 -2
  38. data/lib/worldwide/version.rb +1 -1
  39. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc574700042481ae2a0c664970a48a597cb6ce9d63776f0b9c1614be5b5c8886
4
- data.tar.gz: da5613732905be039e06e46620e691e50b6d9024e825e4a0220f527180313d26
3
+ metadata.gz: ccf2901e3ab7fc346c98420eac6c21f0fd9cb1086d4362cb94139abf5b6eda73
4
+ data.tar.gz: 304ee422493fc51065fcdadbcc1ce199c5f503b743cd90b7ce5a04bddf29bc32
5
5
  SHA512:
6
- metadata.gz: '02128e2bf5417334ab6acaa61784f6101ac530bc5fe8785dadea1d6f73725ce503a898f7c462a25043883522eec885fb349506009305db096412750d46657575'
7
- data.tar.gz: f85b1718da6adab8673ceeb21281c187bcbe5fe13ae33e2049907ce0fec17b198b58b732596e17f171766f6442ff09cf3df383d9d7bd8b5df1d7c1be8fc095b0
6
+ metadata.gz: 6c1dd49df172de1100a9c4570c00e033abfef1685a14433b03107acc3232d15118d50151a492039270972932f3417627de0205e5c325880991e8f172bcc3a24c
7
+ data.tar.gz: b102e2d83f4c218c4cf29eb0b4b953a75c3c420d93c9ae608816262d9abba08a93f27c3dc2725db320e816cf5af0603871172ad10320a8e18bdd2a51fcaa6baa
data/CHANGELOG.md CHANGED
@@ -31,6 +31,11 @@ Nil.
31
31
 
32
32
  ---
33
33
 
34
+ [0.9.0] - 2024-02-05
35
+
36
+ - Add Thai to the list of scripts identified by `Worldwide::Scripts.identify`. [#96](https://github.com/Shopify/worldwide/pull/96)
37
+ - Add translations for address fields with invalid province errors. [#97](https://github.com/Shopify/worldwide/pull/97)
38
+
34
39
  [0.8.0] - 2024-02-02
35
40
 
36
41
  - Add translations for address fields with mathematical symbols errors. [#92](https://github.com/Shopify/worldwide/pull/92)
data/Gemfile.lock CHANGED
@@ -13,7 +13,7 @@ GIT
13
13
  PATH
14
14
  remote: .
15
15
  specs:
16
- worldwide (0.8.0)
16
+ worldwide (0.9.0)
17
17
  activesupport (~> 7.0)
18
18
  i18n
19
19
  phonelib (~> 0.8)
@@ -62,7 +62,7 @@ GEM
62
62
  parallel (1.22.1)
63
63
  parser (3.2.0.0)
64
64
  ast (~> 2.4.1)
65
- phonelib (0.8.3)
65
+ phonelib (0.8.7)
66
66
  prettier_print (1.2.0)
67
67
  psych (5.1.0)
68
68
  stringio
@@ -133,6 +133,7 @@ bg-BG:
133
133
  optional: Регион (незадължително)
134
134
  errors:
135
135
  blank: Изберете регион
136
+ invalid: Въведете валиден регион
136
137
  invalid_for_country: Въведете валиден регион за %{country}
137
138
  unknown_for_city_and_zip: Въведете валиден регион за %{city}, %{zip}
138
139
  unknown_for_city: Изберете валиден регион за %{city}
@@ -131,6 +131,7 @@ cs:
131
131
  optional: Oblast (volitelné)
132
132
  errors:
133
133
  blank: Vyberte oblast
134
+ invalid: Zadejte platnou oblast
134
135
  invalid_for_country: Zadejte platnou oblast pro zemi %{country}
135
136
  unknown_for_city_and_zip: 'Zadejte platnou oblast pro: %{city}, %{zip}'
136
137
  unknown_for_city: 'Vyberte platnou oblast pro: %{city}'
@@ -131,6 +131,7 @@ da:
131
131
  optional: Område (valgfrit)
132
132
  errors:
133
133
  blank: Vælg et område
134
+ invalid: Indtast et gyldigt område
134
135
  invalid_for_country: Angiv et gyldigt område for %{country}
135
136
  unknown_for_city_and_zip: Angiv et gyldigt område for %{city}, %{zip}
136
137
  unknown_for_city: Vælg et gyldigt område for %{city}
@@ -132,6 +132,7 @@ de:
132
132
  optional: Region (optional)
133
133
  errors:
134
134
  blank: Wähle eine Region aus
135
+ invalid: Eine gültige Region eingeben
135
136
  invalid_for_country: Gültige Region für %{country} eingeben
136
137
  unknown_for_city_and_zip: Eine gültige Region für %{city}, %{zip} eingeben
137
138
  unknown_for_city: Eine gültige Region für %{city} auswählen
@@ -137,6 +137,7 @@ el:
137
137
  optional: Περιοχή (προαιρετικά)
138
138
  errors:
139
139
  blank: Επιλέξτε περιοχή
140
+ invalid: Εισαγάγετε μια έγκυρη περιοχή
140
141
  invalid_for_country: Εισαγάγετε μια έγκυρη περιοχή για τη χώρα %{country}
141
142
  unknown_for_city_and_zip: Εισαγάγετε έγκυρη περιοχή για %{city}, %{zip}
142
143
  unknown_for_city: Επιλέξτε έγκυρη περιοχή για %{city}
@@ -106,6 +106,7 @@ en:
106
106
  optional: Region (optional)
107
107
  errors:
108
108
  blank: Select a region
109
+ invalid: Enter a valid region
109
110
  invalid_for_country: Enter a valid region for %{country}
110
111
  unknown_for_city_and_zip: Enter a valid region for %{city}, %{zip}
111
112
  unknown_for_city: Select a valid region for %{city}
@@ -138,6 +138,7 @@ es:
138
138
  optional: Región (opcional)
139
139
  errors:
140
140
  blank: Selecciona una región
141
+ invalid: Ingresa una región válida
141
142
  invalid_for_country: Ingresa una región válida para %{country}
142
143
  unknown_for_city_and_zip: Introduce una región válida para %{city}, %{zip}
143
144
  unknown_for_city: Selecciona una región válida para %{city}.
@@ -132,6 +132,7 @@ fi:
132
132
  optional: Alue (valinnainen)
133
133
  errors:
134
134
  blank: Valitse alue
135
+ invalid: Anna kelvollinen alue
135
136
  invalid_for_country: Anna kelvollinen alue maalle %{country}
136
137
  unknown_for_city_and_zip: Anna kelvollinen alue kohteelle %{city}, %{zip}
137
138
  unknown_for_city: Valitse kelvollinen alue kohteelle %{city}
@@ -135,6 +135,7 @@ fr:
135
135
  optional: Région (facultatif)
136
136
  errors:
137
137
  blank: Sélectionner une région
138
+ invalid: Saisissez une région valide
138
139
  invalid_for_country: 'Saisissez une région valide pour : %{country}'
139
140
  unknown_for_city_and_zip: Saisissez une région valide pour %{city}, %{zip}
140
141
  unknown_for_city: Saisissez une région valide pour %{city}
@@ -131,6 +131,7 @@ hi:
131
131
  optional: क्षेत्र (वैकल्पिक)
132
132
  errors:
133
133
  blank: एक क्षेत्र चुनें
134
+ invalid: एक मान्य प्रदेश दर्ज करें
134
135
  invalid_for_country: "%{country} के लिए एक मान्य क्षेत्र दर्ज करें"
135
136
  unknown_for_city_and_zip: "%{city}, %{zip} के लिए एक मान्य प्रांत दर्ज
136
137
  करें"
@@ -136,6 +136,7 @@ hr-HR:
136
136
  optional: Regija (nije obavezno)
137
137
  errors:
138
138
  blank: Odaberi regiju
139
+ invalid: Unesite valjanu regiju
139
140
  invalid_for_country: Unesite valjanu regiju za %{country}
140
141
  unknown_for_city_and_zip: Unesite valjanu regiju za %{city}, %{zip}
141
142
  unknown_for_city: Unesite valjanu regiju za %{city}
@@ -136,6 +136,7 @@ hu:
136
136
  optional: Régió (nem kötelező megadni)
137
137
  errors:
138
138
  blank: Válassz régiót
139
+ invalid: Adj meg egy érvényes régiót
139
140
  invalid_for_country: "%{country} területén nincs ilyen nevű régió"
140
141
  unknown_for_city_and_zip: Add meg a településnek (%{city}, %{zip}) megfelelő
141
142
  régiót
@@ -131,6 +131,7 @@ id:
131
131
  optional: Wilayah (opsional)
132
132
  errors:
133
133
  blank: Pilih wilayah
134
+ invalid: Masukkan wilayah yang valid
134
135
  invalid_for_country: Masukkan wilayah yang valid untuk %{country}
135
136
  unknown_for_city_and_zip: Masukkan wilayah yang valid untuk %{city}, %{zip}
136
137
  unknown_for_city: Pilih wilayah yang valid untuk %{city}
@@ -135,6 +135,7 @@ it:
135
135
  optional: Area geografica (facoltativo)
136
136
  errors:
137
137
  blank: Seleziona un'area geografica
138
+ invalid: Inserisci un'area geografica valida
138
139
  invalid_for_country: 'Inserisci un''area geografica valida per il seguente
139
140
  paese: %{country}'
140
141
  unknown_for_city_and_zip: Inserisci un'area geografica valida per %{city},
@@ -116,6 +116,7 @@ ja:
116
116
  optional: 地域 (任意)
117
117
  errors:
118
118
  blank: 地域を選択してください
119
+ invalid: 有効な地域を入力してください
119
120
  invalid_for_country: "%{country}の有効な地域を入力してください"
120
121
  unknown_for_city_and_zip: "%{zip}、%{city}の有効な地域を入力してください"
121
122
  unknown_for_city: "%{city}の有効な地域を選択してください"
@@ -118,6 +118,7 @@ ko:
118
118
  optional: 지역(선택 사항)
119
119
  errors:
120
120
  blank: 지역 선택
121
+ invalid: 유효한 지역을 입력하세요
121
122
  invalid_for_country: "%{country}의 유효한 지역을 입력하십시오"
122
123
  unknown_for_city_and_zip: "%{city}, %{zip}에 대해 올바른 지역을 입력하십시오"
123
124
  unknown_for_city: "%{city}에 대해 올바른 지역을 선택하십시오"
@@ -138,6 +138,7 @@ lt-LT:
138
138
  optional: Regionas (pasirinktinai)
139
139
  errors:
140
140
  blank: Pasirinkite regioną
141
+ invalid: Įveskite tinkamą regioną
141
142
  invalid_for_country: Įveskite tinkamą %{country} regioną
142
143
  unknown_for_city_and_zip: Įveskite tinkamą %{city}, %{zip}, regioną
143
144
  unknown_for_city: Pasirinkite tinkamą %{city} regioną
@@ -131,6 +131,7 @@ ms:
131
131
  optional: Rantau (opsyenal)
132
132
  errors:
133
133
  blank: Pilih rantau
134
+ invalid: Pilih rantau yang sah
134
135
  invalid_for_country: Masukkan rantau yang sah untuk %{country}
135
136
  unknown_for_city_and_zip: Masukkan rantau yang sah untuk %{city}, %{zip}
136
137
  unknown_for_city: Pilih rantau yang sah untuk %{city}
@@ -129,6 +129,7 @@ nb:
129
129
  optional: Region (valgfritt)
130
130
  errors:
131
131
  blank: Velg et område
132
+ invalid: Angi en gyldig region
132
133
  invalid_for_country: Skriv inn et gyldig område i %{country}
133
134
  unknown_for_city_and_zip: Angi et gyldig område for %{city}, %{zip}
134
135
  unknown_for_city: Velg et gyldig område for %{city}
@@ -132,6 +132,7 @@ nl:
132
132
  optional: Regio (optioneel)
133
133
  errors:
134
134
  blank: Selecteer een regio
135
+ invalid: Voer een geldige regio in
135
136
  invalid_for_country: Voer een geldige regio in voor %{country}
136
137
  unknown_for_city_and_zip: Voer een geldige regio in voor %{city}, %{zip}
137
138
  unknown_for_city: Selecteer een geldige regio voor %{city}
@@ -135,6 +135,7 @@ pl:
135
135
  optional: Region (opcjonalnie)
136
136
  errors:
137
137
  blank: Wybierz region
138
+ invalid: Wprowadź prawidłowy region
138
139
  invalid_for_country: Wprowadź prawidłowy region dla %{country}
139
140
  unknown_for_city_and_zip: Wprowadź prawidłowy region dla %{city}, %{zip}
140
141
  unknown_for_city: Wybierz prawidłowy region dla %{city}
@@ -130,6 +130,7 @@ pt-BR:
130
130
  optional: Região (opcional)
131
131
  errors:
132
132
  blank: Selecione uma região
133
+ invalid: Insira uma região válida
133
134
  invalid_for_country: Insira uma região válida para %{country}
134
135
  unknown_for_city_and_zip: Insira uma região válida para %{city}, %{zip}
135
136
  unknown_for_city: Selecione uma região válida para %{city}
@@ -135,6 +135,7 @@ pt-PT:
135
135
  optional: Região (opcional)
136
136
  errors:
137
137
  blank: Selecione uma região
138
+ invalid: Introduza uma região válida
138
139
  invalid_for_country: Introduzir uma região válida para %{country}
139
140
  unknown_for_city_and_zip: Introduza uma região válida para %{city}, %{zip}
140
141
  unknown_for_city: Selecione uma região válida para %{city}
@@ -137,6 +137,7 @@ ro-RO:
137
137
  optional: Regiune (opțional)
138
138
  errors:
139
139
  blank: Selectează o regiune
140
+ invalid: Introdu o regiune validă
140
141
  invalid_for_country: Introdu o regiune validă pentru %{country}
141
142
  unknown_for_city_and_zip: Introdu o regiune validă pentru %{city}, %{zip}
142
143
  unknown_for_city: Selectează o regiune validă pentru %{city}
@@ -133,6 +133,7 @@ ru:
133
133
  optional: Регион (необязательно)
134
134
  errors:
135
135
  blank: Выберите регион
136
+ invalid: Укажите действительное название региона
136
137
  invalid_for_country: 'Укажите действительный регион этой страны: %{country}'
137
138
  unknown_for_city_and_zip: Укажите действительное название региона для
138
139
  %{city}, %{zip}
@@ -132,6 +132,7 @@ sk-SK:
132
132
  optional: Oblasť (voliteľné)
133
133
  errors:
134
134
  blank: Vyberte oblasť
135
+ invalid: Zadajte platnú oblasť
135
136
  invalid_for_country: Zadajte platnú oblasť pre krajinu %{country}
136
137
  unknown_for_city_and_zip: 'Zadajte platnú oblasť pre: %{city}, %{zip}'
137
138
  unknown_for_city: 'Vyberte platnú oblasť pre: %{city}'
@@ -137,6 +137,7 @@ sl-SI:
137
137
  optional: Regija (izbirno)
138
138
  errors:
139
139
  blank: Izberite regijo
140
+ invalid: Vnesite veljavno regijo
140
141
  invalid_for_country: Vnesite veljavno regijo za državo %{country}
141
142
  unknown_for_city_and_zip: Vnesite veljavno regijo za mesto %{city}, %{zip}
142
143
  unknown_for_city: Izberite veljavno regijo za mesto %{city}
@@ -131,6 +131,7 @@ sv:
131
131
  optional: Region (valfritt)
132
132
  errors:
133
133
  blank: Välj region
134
+ invalid: Ange en giltig region
134
135
  invalid_for_country: Ange en giltig region för %{country}
135
136
  unknown_for_city_and_zip: Ange en giltig region för %{city}, %{zip}
136
137
  unknown_for_city: Ange en giltig region för %{city}
@@ -128,6 +128,7 @@ th:
128
128
  optional: ภูมิภาค (ไม่บังคับ)
129
129
  errors:
130
130
  blank: เลือกภูมิภาค
131
+ invalid: ป้อนภูมิภาคที่ถูกต้อง
131
132
  invalid_for_country: ป้อนภูมิภาคที่ถูกต้องสำหรับ %{country}
132
133
  unknown_for_city_and_zip: ป้อนชื่อภูมิภาคที่ถูกต้องสำหรับ %{city}, %{zip}
133
134
  unknown_for_city: เลือกชื่อภูมิภาคที่ถูกต้องสำหรับ %{city}
@@ -129,6 +129,7 @@ tr:
129
129
  optional: Bölge (isteğe bağlı)
130
130
  errors:
131
131
  blank: Bölge seçin
132
+ invalid: Geçerli bir bölge girin
132
133
  invalid_for_country: "%{country} için geçerli bir bölge girin."
133
134
  unknown_for_city_and_zip: "%{city}, %{zip} için geçerli bir bölge girin"
134
135
  unknown_for_city: "%{city} için geçerli bir bölge seçin"
@@ -129,6 +129,7 @@ vi:
129
129
  optional: Vùng (không bắt buộc)
130
130
  errors:
131
131
  blank: Chọn vùng
132
+ invalid: Nhập khu vực hợp lệ
132
133
  invalid_for_country: Nhập khu vực hợp lệ cho %{country}
133
134
  unknown_for_city_and_zip: Nhập khu vực hợp lệ cho %{city}, %{zip}
134
135
  unknown_for_city: Chọn khu vực hợp lệ cho %{city}
@@ -116,6 +116,7 @@ zh-CN:
116
116
  optional: 区域(可选)
117
117
  errors:
118
118
  blank: 选择地区
119
+ invalid: 输入有效的地区
119
120
  invalid_for_country: 输入 %{country} 的有效地区
120
121
  unknown_for_city_and_zip: 输入 %{zip} %{city} 对应的有效城市
121
122
  unknown_for_city: 选择 %{city} 对应的有效区域
@@ -116,6 +116,7 @@ zh-TW:
116
116
  optional: 區域 (選填)
117
117
  errors:
118
118
  blank: 選擇一個地區
119
+ invalid: 請輸入有效的地區
119
120
  invalid_for_country: 請輸入%{country}的有效地區
120
121
  unknown_for_city_and_zip: 請輸入%{zip}%{city}的有效地區
121
122
  unknown_for_city: 請選取%{city}的有效地區
@@ -5,17 +5,18 @@ module Worldwide
5
5
  class << self
6
6
  # Based off of the text provided, method will return the scripts identified
7
7
  def identify(text:)
8
- return [] if text.blank?
8
+ return [] if Util.blank?(text)
9
9
 
10
10
  discovered_scripts = []
11
11
 
12
12
  script_regexes = {
13
13
  "Arabic": "\\p{Arabic}",
14
- "Latn": "\\p{Latin}",
15
14
  "Han": "\\p{Han}",
16
15
  "Hangul": "\\p{Hangul}",
17
16
  "Hiragana": "\\p{Hiragana}",
18
17
  "Katakana": "\\p{Katakana}",
18
+ "Latn": "\\p{Latin}",
19
+ "Thai": "\\p{Thai}",
19
20
  }
20
21
 
21
22
  script_regexes.each do |script, regex|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Worldwide
4
- VERSION = "0.8.0"
4
+ VERSION = "0.9.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worldwide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-02 00:00:00.000000000 Z
11
+ date: 2024-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport