mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 21:26:21 +00:00
fix: idioma por defecto #15068
This commit is contained in:
parent
53ae932393
commit
6063f8dc6b
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue