mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Allow completely custom score reasons. (#28348)
After this change, a reason won't exclusively be a translation key anymore, but now, it can display a custom reason as well.
This commit is contained in:
@@ -42,9 +42,9 @@ class ReviewableScoreSerializer < ApplicationSerializer
|
||||
|
||||
if link_text
|
||||
link = build_link_for(object.reason, link_text)
|
||||
text = I18n.t("reviewables.reasons.#{object.reason}", link: link, default: nil)
|
||||
text = I18n.t("reviewables.reasons.#{object.reason}", link: link, default: object.reason)
|
||||
else
|
||||
text = I18n.t("reviewables.reasons.#{object.reason}", default: nil)
|
||||
text = I18n.t("reviewables.reasons.#{object.reason}", default: object.reason)
|
||||
end
|
||||
|
||||
text
|
||||
|
||||
Reference in New Issue
Block a user