From 58ff7216cafe75214be955a19ea2b4cb40789734 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 5 Jun 2019 14:11:04 -0400 Subject: [PATCH] UX: Display "Queued Topic" if a Queued Post will create a topic --- .../javascripts/discourse/models/reviewable.js.es6 | 9 +++++++-- config/locales/client.en.yml | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/models/reviewable.js.es6 b/app/assets/javascripts/discourse/models/reviewable.js.es6 index 3c1869f0e43..25fc62f63dc 100644 --- a/app/assets/javascripts/discourse/models/reviewable.js.es6 +++ b/app/assets/javascripts/discourse/models/reviewable.js.es6 @@ -10,8 +10,13 @@ export const IGNORED = 3; export const DELETED = 4; export default RestModel.extend({ - @computed("type") - humanType(type) { + @computed("type", "topic") + humanType(type, topic) { + // Display "Queued Topic" if the post will create a topic + if (type === "ReviewableQueuedPost" && !topic) { + type = "ReviewableQueuedTopic"; + } + return I18n.t(`review.types.${type.underscore()}.title`, { defaultValue: "" }); diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 034699edba9..e6a00b67a1f 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -486,6 +486,8 @@ en: reviewable_flagged_post: title: "Flagged Post" flagged_by: "Flagged By" + reviewable_queued_topic: + title: "Queued Topic" reviewable_queued_post: title: "Queued Post" reviewable_user: