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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ae493c5bebd8356ca4da63808dfe0bad0959d87afc63798328a22a2419f67ed
4
- data.tar.gz: bb6cf7a229f4c2912058d2db1c22de7547523a794c687799b20a28344fd9dabc
3
+ metadata.gz: 3ae35c7fef387a7a8bd96da08b0c866c8523fb0822de59aed5a9f7e46ebb1d1c
4
+ data.tar.gz: bea0470154cf31dd70749fe41b49523bc6199ba0a1bc645731d16f9720090ccb
5
5
  SHA512:
6
- metadata.gz: 4e525476dacccbfc070c03e767e0c6a343e368106738424f1872f12e8faa37a87fc623fb769f4116129fca589e966f916bb586df07113dcdafd3321bbbe4f762
7
- data.tar.gz: 87f8e8cc2bb1a62e58fe4a65d3614fc160c14d149ec36aa18769a9a19bc4228d54f4606081d7c8b750501ff1054315bb71e4722d20c578658285b4e256fd1094
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
@@ -13,7 +13,7 @@ GIT
13
13
  PATH
14
14
  remote: .
15
15
  specs:
16
- worldwide (1.15.2)
16
+ worldwide (1.16.0)
17
17
  activesupport (>= 7.0)
18
18
  i18n
19
19
  phonelib (~> 0.8)
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 `bugsnag` notification in case of a missing translation in `production`
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
@@ -7,7 +7,7 @@ unit_system: imperial
7
7
  tax_name: VAT
8
8
  tax_inclusive: true
9
9
  hide_provinces_from_addresses: true
10
- ignore_zones: true
10
+ ignore_provinces: true
11
11
  group: European Countries
12
12
  group_name: Europe
13
13
  zip_label: Postcode
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:
@@ -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"]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Worldwide
4
- VERSION = "1.15.2"
4
+ VERSION = "1.16.0"
5
5
  end
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.15.2
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-01-06 00:00:00.000000000 Z
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.2
8510
+ rubygems_version: 3.6.3
8511
8511
  specification_version: 4
8512
8512
  summary: Internationalization and localization APIs
8513
8513
  test_files: []