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

Merge branch 'production.panel.sutty.nl' of 0xacab.org:sutty/sutty into production.panel.sutty.nl

This commit is contained in:
Sutty 2024-07-01 18:50:17 +00:00
commit ef2465e219

View file

@ -156,8 +156,8 @@ module ApplicationHelper
private private
def post_t(*attribute, post:, type:) 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.locale.to_s).presence ||
post.layout.metadata.dig(*attribute, type.to_s, I18n.default_locale.to_s) || post.layout.metadata.dig(*attribute, type.to_s, post.site.default_locale.to_s).presence ||
I18n.t("posts.attributes.#{attribute.join('.')}.#{type}") I18n.t("posts.attributes.#{attribute.join('.')}.#{type}").presence
end end
end end