worldwide 1.15.2 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/data/regions/GB.yml +1 -1
- data/data/regions/VE.yml +0 -1
- data/lib/worldwide/region.rb +4 -0
- data/lib/worldwide/regions_loader.rb +1 -0
- data/lib/worldwide/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3ae35c7fef387a7a8bd96da08b0c866c8523fb0822de59aed5a9f7e46ebb1d1c
|
|
4
|
+
data.tar.gz: bea0470154cf31dd70749fe41b49523bc6199ba0a1bc645731d16f9720090ccb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4d80bda33704f535981d8dcda6ee9babbdd34dfc8b5e3bc4e5cd58cbf59d9a09f8231c0397683706966e80f20e24f83026c05e5c72168dfa1846de2ac505b222
|
|
7
|
+
data.tar.gz: c0bad66b5445db6d4854fae872e8bc9029786befa99df83e41a52fcbb7b673b6dc053ff2ee89c3331fcff691539e1e0654298109975da6a1aa795215f9ecd845
|
data/CHANGELOG.md
CHANGED
|
@@ -28,9 +28,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
28
28
|
## [Unreleased]
|
|
29
29
|
|
|
30
30
|
Nil.
|
|
31
|
-
|
|
32
31
|
---
|
|
33
32
|
|
|
33
|
+
## [1.16.0] - 2025-02-17
|
|
34
|
+
- Add `ignore_provinces` to regions [#329](https://github.com/Shopify/worldwide/pull/329)
|
|
35
|
+
|
|
34
36
|
## [1.15.2] - 2024-12-27
|
|
35
37
|
- Update Indonesia tax rate to 12%
|
|
36
38
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -939,7 +939,7 @@ Worldwide::Scripts.identify(text: "日本語がわかります。")
|
|
|
939
939
|
|
|
940
940
|
`worldwide` will provide you 2 features for a better international experience:
|
|
941
941
|
- 👨🔧 Fallback mechanism which will default to `english` in case of a missing translation
|
|
942
|
-
- 🚀 Fire off
|
|
942
|
+
- 🚀 Fire off an exception notification in case of a missing translation in `production`
|
|
943
943
|
|
|
944
944
|
It should looks like this on your development environment:
|
|
945
945
|
|
data/data/regions/GB.yml
CHANGED
data/data/regions/VE.yml
CHANGED
|
@@ -14,7 +14,6 @@ format:
|
|
|
14
14
|
edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{city}{zip}{province}_{phone}"
|
|
15
15
|
show: "{firstName} {lastName}_{company}_{address1}_{address2}_{city} {zip} {province}_{country}_{phone}"
|
|
16
16
|
emoji: "\U0001F1FB\U0001F1EA"
|
|
17
|
-
ignore_zones: false
|
|
18
17
|
languages:
|
|
19
18
|
- es
|
|
20
19
|
example_address:
|
data/lib/worldwide/region.rb
CHANGED
|
@@ -109,6 +109,10 @@ module Worldwide
|
|
|
109
109
|
# based on the zip (note that this auto-inference may be wrong for some addresses near a border).
|
|
110
110
|
attr_accessor :hide_provinces_from_addresses
|
|
111
111
|
|
|
112
|
+
# Returns true if provinces should be ignored
|
|
113
|
+
# Used when adding provinces to a country that has none as an intermediate step
|
|
114
|
+
attr_accessor :ignore_provinces
|
|
115
|
+
|
|
112
116
|
# The CLDR code for this region.
|
|
113
117
|
attr_reader :cldr_code
|
|
114
118
|
|
|
@@ -110,6 +110,7 @@ module Worldwide
|
|
|
110
110
|
region.group = spec["group"]
|
|
111
111
|
region.group_name = spec["group_name"]
|
|
112
112
|
region.hide_provinces_from_addresses = spec["hide_provinces_from_addresses"] || false
|
|
113
|
+
region.ignore_provinces = spec["ignore_provinces"] || false
|
|
113
114
|
region.languages = spec["languages"]
|
|
114
115
|
region.partial_zip_regex = spec["partial_zip_regex"]
|
|
115
116
|
region.phone_number_prefix = spec["phone_number_prefix"]
|
data/lib/worldwide/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: worldwide
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.16.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shopify
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-
|
|
10
|
+
date: 2025-02-18 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: activesupport
|
|
@@ -8507,7 +8507,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
8507
8507
|
- !ruby/object:Gem::Version
|
|
8508
8508
|
version: '0'
|
|
8509
8509
|
requirements: []
|
|
8510
|
-
rubygems_version: 3.6.
|
|
8510
|
+
rubygems_version: 3.6.3
|
|
8511
8511
|
specification_version: 4
|
|
8512
8512
|
summary: Internationalization and localization APIs
|
|
8513
8513
|
test_files: []
|