FIX: Customizing missing pluralized translations didn't work

This commit is contained in:
Gerhard Schlager
2019-05-11 01:52:27 +02:00
parent 6d44be5142
commit 81c329fbb8
3 changed files with 184 additions and 19 deletions

View File

@@ -12,10 +12,10 @@ class SiteTextSerializer < ApplicationSerializer
end
def overridden?
current_val = value
I18n.overrides_disabled do
return I18n.t(object[:id]) != current_val
if I18n.exists?(object[:id])
I18n.overrides_disabled { I18n.t(object[:id]) != object[:value] }
else
TranslationOverride.exists?(locale: I18n.locale, translation_key: object[:id])
end
end