mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Correct description for out of love badge (#8615)
The bug mentioned here https://meta.discourse.org/t/badge-not-triggering/135896/8 Basically, descriptions for 3 badges: "Out of Love", "Higher Love" and "Crazy in Love" are granted based on on "max_likes_per_day" and the description should reflect that.
This commit is contained in:
committed by
GitHub
parent
8c2e27790c
commit
9e4fcb1a0a
@@ -223,7 +223,7 @@ class Badge < ActiveRecord::Base
|
||||
|
||||
def long_description
|
||||
key = "badges.#{i18n_name}.long_description"
|
||||
I18n.t(key, default: self[:long_description] || '', base_uri: Discourse.base_uri)
|
||||
I18n.t(key, default: self[:long_description] || '', base_uri: Discourse.base_uri, max_likes_per_day: SiteSetting.max_likes_per_day)
|
||||
end
|
||||
|
||||
def long_description=(val)
|
||||
@@ -233,7 +233,7 @@ class Badge < ActiveRecord::Base
|
||||
|
||||
def description
|
||||
key = "badges.#{i18n_name}.description"
|
||||
I18n.t(key, default: self[:description] || '', base_uri: Discourse.base_uri)
|
||||
I18n.t(key, default: self[:description] || '', base_uri: Discourse.base_uri, max_likes_per_day: SiteSetting.max_likes_per_day)
|
||||
end
|
||||
|
||||
def description=(val)
|
||||
|
||||
Reference in New Issue
Block a user