diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7d1f9c0b..baef3b05 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -156,8 +156,8 @@ module ApplicationHelper private def post_t(*attribute, post:, type:) - post.layout.metadata.dig(*attribute, type.to_s, I18n.locale.to_s) || - post.layout.metadata.dig(*attribute, type.to_s, I18n.default_locale.to_s) || - I18n.t("posts.attributes.#{attribute.join('.')}.#{type}") + post.layout.metadata.dig(*attribute, type.to_s, I18n.locale.to_s).presence || + post.layout.metadata.dig(*attribute, type.to_s, post.site.default_locale.to_s).presence || + I18n.t("posts.attributes.#{attribute.join('.')}.#{type}").presence end end