mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 08:32:26 +08:00
a446e0fde1
Being that system badges ship with every instance of Discourse, we've opted to define the name, description, and long description in our locales files to promote translation into other languages. When an admin visited the overview page of a system badge in their admin panel, they were met with disabled inputs for these text properties. The problem is that we failed to educate the admin that the text needs to be managed via the site text customization settings. This change adds a small "Customize Text" link under theses inputs that takes the admin to the specific site text customization where they can make desired changes.
14 lines
263 B
Ruby
14 lines
263 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AdminBadgeSerializer < BadgeSerializer
|
|
attributes :query, :trigger, :target_posts, :auto_revoke, :show_posts, :i18n_name
|
|
|
|
def include_long_description?
|
|
true
|
|
end
|
|
|
|
def include_i18n_name?
|
|
object.system?
|
|
end
|
|
end
|