worldwide 1.25.1 → 1.25.3
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 +7 -0
- data/Gemfile.lock +2 -2
- data/lib/worldwide/numbers.rb +5 -4
- data/lib/worldwide/version.rb +1 -1
- data/translation.yml +38 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f767627279f3cadd37dc899424a233603a022c42e0c32689a154faac1b691bb
|
|
4
|
+
data.tar.gz: 5f94e6e5752f0df479cdc3a8876a5393793abded10b938bf083d66a7a7b4fcea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2fd94d71a9a296da0e7d71d8ecb07305aed62cf271342677d171db093c3ef8c338f9ae8beb94df8997106da556b38bc83f788ed309279700e4a1af2db972435d
|
|
7
|
+
data.tar.gz: ae10758fbf7a3ed126110d26239645890722d33849cb5e940a7cafabd6568853f0d7ec89f70563426f084ddf25b5c11a1c447377cc22719c7ab1e268e1347bd3
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
+
## [1.25.3] - 2026-07-08
|
|
34
|
+
- Add `ar`, `he`, and `ur` to `translation.yml` target languages so the Translation Platform generates RTL localizations of the region address data [#519](https://github.com/Shopify/worldwide/pull/519)
|
|
35
|
+
- Fixed: format Urdu (`ur`) percentages with a trailing % sign in numeric layout order (e.g. `2%` instead of `%2`), matching the existing Hebrew behaviour. [#518](https://github.com/Shopify/worldwide/pull/518)
|
|
36
|
+
|
|
37
|
+
## [1.25.2] - 2026-07-02
|
|
38
|
+
- Bump phonelib from 0.10.17 to 0.10.22 to pick up updated libphonenumber metadata.
|
|
39
|
+
|
|
33
40
|
## [1.25.1] - 2026-05-26
|
|
34
41
|
- Update postal code expectations in Portugal to require seven digit postal code (XXXX-XXX) [#493](https://github.com/Shopify/worldwide/pull/493)
|
|
35
42
|
|
data/Gemfile.lock
CHANGED
|
@@ -13,7 +13,7 @@ GIT
|
|
|
13
13
|
PATH
|
|
14
14
|
remote: .
|
|
15
15
|
specs:
|
|
16
|
-
worldwide (1.25.
|
|
16
|
+
worldwide (1.25.3)
|
|
17
17
|
activesupport (>= 7.0)
|
|
18
18
|
i18n
|
|
19
19
|
phonelib (~> 0.8)
|
|
@@ -66,7 +66,7 @@ GEM
|
|
|
66
66
|
parser (3.3.0.5)
|
|
67
67
|
ast (~> 2.4.1)
|
|
68
68
|
racc
|
|
69
|
-
phonelib (0.10.
|
|
69
|
+
phonelib (0.10.22)
|
|
70
70
|
prettier_print (1.2.0)
|
|
71
71
|
pry (0.14.2)
|
|
72
72
|
coderay (~> 1.1)
|
data/lib/worldwide/numbers.rb
CHANGED
|
@@ -8,6 +8,10 @@ module Worldwide
|
|
|
8
8
|
COMPACT_DECIMAL_BASE_KEY = "numbers.latn.formats.decimal.patterns"
|
|
9
9
|
DEFAULT_COMPACT_PATTERN = "0"
|
|
10
10
|
|
|
11
|
+
# RTL locales that CLDR marks as leading % in numeric layout order, but which
|
|
12
|
+
# actually use a trailing % (e.g. "75%", "2%"). We override the placement for these.
|
|
13
|
+
TRAILING_PERCENT_SIGN_LOCALES = ["he", "ur"].freeze
|
|
14
|
+
|
|
11
15
|
def initialize(locale: I18n.locale)
|
|
12
16
|
@locale = locale.to_sym
|
|
13
17
|
end
|
|
@@ -291,10 +295,7 @@ module Worldwide
|
|
|
291
295
|
second = [digit_pos, percent_pos].max
|
|
292
296
|
|
|
293
297
|
spacing = format[(first + 1)..(second - 1)]
|
|
294
|
-
trailing = if locale.to_s.downcase.split("-").first
|
|
295
|
-
# CLDR says Hebrew is right-to-left with a trailing % sign in character order,
|
|
296
|
-
# which would imply a prefix % sign in numeric layout order, but Hebrew uses
|
|
297
|
-
# a trailing % sign when considered in numeric layout order. So, we override here.
|
|
298
|
+
trailing = if TRAILING_PERCENT_SIGN_LOCALES.include?(locale.to_s.downcase.split("-").first)
|
|
298
299
|
true
|
|
299
300
|
elsif character_order == "right-to-left"
|
|
300
301
|
digit_pos > percent_pos
|
data/lib/worldwide/version.rb
CHANGED
data/translation.yml
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
source_language: en
|
|
2
|
-
target_languages:
|
|
2
|
+
target_languages:
|
|
3
|
+
[
|
|
4
|
+
ar,
|
|
5
|
+
bg,
|
|
6
|
+
cs,
|
|
7
|
+
da,
|
|
8
|
+
de,
|
|
9
|
+
el,
|
|
10
|
+
es,
|
|
11
|
+
fi,
|
|
12
|
+
fr,
|
|
13
|
+
he,
|
|
14
|
+
hi,
|
|
15
|
+
hr,
|
|
16
|
+
hu,
|
|
17
|
+
id,
|
|
18
|
+
it,
|
|
19
|
+
ja,
|
|
20
|
+
ko,
|
|
21
|
+
lt,
|
|
22
|
+
ms,
|
|
23
|
+
nb,
|
|
24
|
+
nl,
|
|
25
|
+
pl,
|
|
26
|
+
pt-BR,
|
|
27
|
+
pt-PT,
|
|
28
|
+
ro,
|
|
29
|
+
ru,
|
|
30
|
+
sk,
|
|
31
|
+
sl,
|
|
32
|
+
sv,
|
|
33
|
+
th,
|
|
34
|
+
tr,
|
|
35
|
+
ur,
|
|
36
|
+
vi,
|
|
37
|
+
zh-CN,
|
|
38
|
+
zh-TW,
|
|
39
|
+
]
|
|
3
40
|
async_pr_mode: per_pr
|
|
4
41
|
components:
|
|
5
42
|
- name: 'buyer'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: worldwide
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.25.
|
|
4
|
+
version: 1.25.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shopify
|
|
@@ -8549,7 +8549,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
8549
8549
|
- !ruby/object:Gem::Version
|
|
8550
8550
|
version: '0'
|
|
8551
8551
|
requirements: []
|
|
8552
|
-
rubygems_version: 4.0.
|
|
8552
|
+
rubygems_version: 4.0.14
|
|
8553
8553
|
specification_version: 4
|
|
8554
8554
|
summary: Internationalization and localization APIs
|
|
8555
8555
|
test_files: []
|