worldwide 1.25.2 → 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 +4 -0
- data/Gemfile.lock +1 -1
- data/lib/worldwide/numbers.rb +5 -4
- data/lib/worldwide/version.rb +1 -1
- data/translation.yml +38 -1
- metadata +1 -1
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,10 @@ 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
|
+
|
|
33
37
|
## [1.25.2] - 2026-07-02
|
|
34
38
|
- Bump phonelib from 0.10.17 to 0.10.22 to pick up updated libphonenumber metadata.
|
|
35
39
|
|
data/Gemfile.lock
CHANGED
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'
|