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:
parent
35e4ef045d
commit
c241f25105
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue