mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 19:30:48 +08:00
DEV: Update TranslateAccelerator missing translation string (#22158)
Upstream added a capital 'T' to the 'Translation missing' message in https://github.com/ruby-i18n/i18n/commit/c5c6e753f3. This caused our translate accelerator patch to diverge, and the change in case affected a number of our specs. This commit updates the translate accelerator to match the upstream casing, and introduces a spec to detect future divergence.
This commit is contained in:
@ -26,7 +26,13 @@ RSpec.describe "translate accelerator" do
|
||||
orig = I18n.t("i_am_an_unknown_key99")
|
||||
|
||||
expect(I18n.t("i_am_an_unknown_key99").object_id).to eq(orig.object_id)
|
||||
expect(I18n.t("i_am_an_unknown_key99")).to eq("translation missing: en.i_am_an_unknown_key99")
|
||||
expect(I18n.t("i_am_an_unknown_key99")).to eq("Translation missing: en.i_am_an_unknown_key99")
|
||||
end
|
||||
|
||||
it "has the same 'translation missing' message as upstream" do
|
||||
expect(I18n.t("this_key_does_not_exist")).to eq(
|
||||
I18n.translate_no_cache("this_key_does_not_exist"),
|
||||
)
|
||||
end
|
||||
|
||||
it "returns the correct language" do
|
||||
|
Reference in New Issue
Block a user