From 505f869b70c202e0688cde021042b4ce446de1e4 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Wed, 24 May 2023 09:59:37 +0900 Subject: [PATCH] DEV: Update I18n to 1.13.0 (#21685) --- Gemfile.lock | 2 +- spec/lib/i18n/discourse_i18n_spec.rb | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e3fafbca9b4..2bcb8c8ebc3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) diff --git a/spec/lib/i18n/discourse_i18n_spec.rb b/spec/lib/i18n/discourse_i18n_spec.rb index cd990834e91..6f265aed516 100644 --- a/spec/lib/i18n/discourse_i18n_spec.rb +++ b/spec/lib/i18n/discourse_i18n_spec.rb @@ -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")