Fix custom labels and descriptions
Dieser Commit ist enthalten in:
Ursprung
39b323c5d1
Commit
b4e8572fd7
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
|
@ -142,12 +142,12 @@ end
|
||||||
attributes :dropdown_none, :image
|
attributes :dropdown_none, :image
|
||||||
|
|
||||||
def label
|
def label
|
||||||
return object.label if object.label
|
return object.label if object.label.present?
|
||||||
I18n.t("#{object.key || i18n_key}.label", default: '')
|
I18n.t("#{object.key || i18n_key}.label", default: '')
|
||||||
end
|
end
|
||||||
|
|
||||||
def description
|
def description
|
||||||
return object.description if object.description
|
return object.description if object.description.present?
|
||||||
I18n.t("#{object.key || i18n_key}.description", default: '', base_url: Discourse.base_url)
|
I18n.t("#{object.key || i18n_key}.description", default: '', base_url: Discourse.base_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren