FIX: Pluralized translation overrides didn't work for en_US

"en_US" doesn't contain most of the translations, so it falls back to "en". But that behavior stopped translation overrides to work for pluralized strings in "en_US", because it relies on existing translations. This fixes it by looking up the existing translation in all fallback locales.
This commit is contained in:
Gerhard Schlager
2020-08-29 00:11:45 +02:00
parent 7353a4c64a
commit ce1620f2ad
3 changed files with 33 additions and 15 deletions

View File

@@ -94,14 +94,14 @@ describe EmailStyle do
context 'translation override' do
before do
TranslationOverride.upsert!(
'en',
SiteSetting.default_locale,
'user_notifications.signup.text_body_template',
"CLICK THAT LINK: %{base_url}/u/activate-account/%{email_token}"
)
end
after do
TranslationOverride.revert!('en', ['user_notifications.signup.text_body_template'])
TranslationOverride.revert!(SiteSetting.default_locale, ['user_notifications.signup.text_body_template'])
end
it "applies customizations when translation override exists" do