DEV: Update I18n to 1.13.0 (#21685)

This commit is contained in:
Alan Guo Xiang Tan 2023-05-24 09:59:37 +09:00 committed by GitHub
parent d537265ddd
commit 505f869b70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -173,7 +173,7 @@ GEM
hkdf (1.0.0)
htmlentities (4.3.4)
http_accept_language (2.1.1)
i18n (1.12.0)
i18n (1.13.0)
concurrent-ruby (~> 1.0)
image_optim (0.31.3)
exifr (~> 1.2, >= 1.2.2)

View File

@ -86,14 +86,13 @@ RSpec.describe I18n::Backend::DiscourseI18n do
items: {
one: "%{count} Russian item",
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: 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: 10.2)).to eq("10.2 Russian items")
expect(backend.translate(:ru, :items, count: 10.2)).to eq("10.2 items")
backend.store_translations(
:ru,
@ -104,7 +103,9 @@ RSpec.describe I18n::Backend::DiscourseI18n do
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: 10.2)).to eq("10.2 Russian items")
backend.store_translations(:en, airplanes: { one: "%{count} airplane" })
expect(backend.translate(:ru, :airplanes, count: 1)).to eq("1 airplane")