5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2025-03-14 20:18:18 +00:00

Merge branch 'issue-15068' into production.panel.sutty.nl

This commit is contained in:
f 2024-07-01 15:49:57 -03:00
commit 3f7e0c4d2b
No known key found for this signature in database

View file

@ -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