mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 15:45:19 +08:00
DEV: Update I18n to 1.13.0 (#21685)
This commit is contained in:
parent
d537265ddd
commit
505f869b70
|
@ -173,7 +173,7 @@ GEM
|
||||||
hkdf (1.0.0)
|
hkdf (1.0.0)
|
||||||
htmlentities (4.3.4)
|
htmlentities (4.3.4)
|
||||||
http_accept_language (2.1.1)
|
http_accept_language (2.1.1)
|
||||||
i18n (1.12.0)
|
i18n (1.13.0)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
image_optim (0.31.3)
|
image_optim (0.31.3)
|
||||||
exifr (~> 1.2, >= 1.2.2)
|
exifr (~> 1.2, >= 1.2.2)
|
||||||
|
|
|
@ -86,14 +86,13 @@ RSpec.describe I18n::Backend::DiscourseI18n do
|
||||||
items: {
|
items: {
|
||||||
one: "%{count} Russian item",
|
one: "%{count} Russian item",
|
||||||
many: "%{count} Russian items are many",
|
many: "%{count} Russian items are many",
|
||||||
other: "%{count} Russian items",
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(backend.translate(:ru, :items, count: 1)).to eq("1 Russian item")
|
expect(backend.translate(:ru, :items, count: 1)).to eq("1 Russian item")
|
||||||
expect(backend.translate(:ru, :items, count: 2)).to eq("2 items")
|
expect(backend.translate(:ru, :items, count: 2)).to eq("2 items")
|
||||||
expect(backend.translate(:ru, :items, count: 5)).to eq("5 Russian items are many")
|
expect(backend.translate(:ru, :items, count: 5)).to eq("5 Russian items are many")
|
||||||
expect(backend.translate(:ru, :items, count: 10.2)).to eq("10.2 Russian items")
|
expect(backend.translate(:ru, :items, count: 10.2)).to eq("10.2 items")
|
||||||
|
|
||||||
backend.store_translations(
|
backend.store_translations(
|
||||||
:ru,
|
:ru,
|
||||||
|
@ -104,7 +103,9 @@ RSpec.describe I18n::Backend::DiscourseI18n do
|
||||||
other: "%{count} Russian items",
|
other: "%{count} Russian items",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(backend.translate(:ru, :items, count: 2)).to eq("2 Russian items are a few")
|
expect(backend.translate(:ru, :items, count: 2)).to eq("2 Russian items are a few")
|
||||||
|
expect(backend.translate(:ru, :items, count: 10.2)).to eq("10.2 Russian items")
|
||||||
|
|
||||||
backend.store_translations(:en, airplanes: { one: "%{count} airplane" })
|
backend.store_translations(:en, airplanes: { one: "%{count} airplane" })
|
||||||
expect(backend.translate(:ru, :airplanes, count: 1)).to eq("1 airplane")
|
expect(backend.translate(:ru, :airplanes, count: 1)).to eq("1 airplane")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user