5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2025-02-17 00:41:50 +00:00

fix: deprecar lang en favor de locale

This commit is contained in:
f 2023-10-06 17:34:30 -03:00
parent 35e4ef045d
commit c241f25105
No known key found for this signature in database

View file

@ -62,12 +62,15 @@ MetadataTemplate = Struct.new(:site, :document, :name, :label, :type,
end
# Trae el idioma actual del sitio o del panel
#
# @deprecated Empezar a usar locale
# @return [String]
def lang
@lang ||= post&.lang&.value || I18n.locale
end
# El valor por defecto
alias_method :locale, :lang
def default_value
layout.metadata.dig(name, 'default', lang.to_s)
end