mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:49:14 +08:00
FIX: Show an example username in Review Settings (#11097)
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
This commit is contained in:
parent
5c662128d3
commit
b73234b75c
|
@ -1,6 +1,8 @@
|
|||
import Controller from "@ember/controller";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default Controller.extend({
|
||||
saving: false,
|
||||
|
@ -25,4 +27,15 @@ export default Controller.extend({
|
|||
.finally(() => this.set("saving", false));
|
||||
},
|
||||
},
|
||||
|
||||
@discourseComputed("settings.reviewable_score_types")
|
||||
scoreTypes(types) {
|
||||
const username = I18n.t("review.example_username");
|
||||
|
||||
return types.map((type) =>
|
||||
Object.assign({}, type, {
|
||||
title: type.title.replace("%{username}", username),
|
||||
})
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="reviewable-settings">
|
||||
<h4>{{i18n "review.settings.priorities.title"}}</h4>
|
||||
|
||||
{{#each settings.reviewable_score_types as |rst|}}
|
||||
{{#each scoreTypes as |rst|}}
|
||||
<div class="reviewable-score-type">
|
||||
<div class="title">{{rst.title}}</div>
|
||||
<div class="field">
|
||||
|
|
|
@ -563,6 +563,7 @@ en:
|
|||
one: "You have <strong>%{count}</strong> post pending."
|
||||
other: "You have <strong>%{count}</strong> posts pending."
|
||||
ok: "OK"
|
||||
example_username: "username"
|
||||
|
||||
user_action:
|
||||
user_posted_topic: "<a href='%{userUrl}'>%{user}</a> posted <a href='%{topicUrl}'>the topic</a>"
|
||||
|
|
Loading…
Reference in New Issue
Block a user