UX: clearer assign messages on first post

This commit is contained in:
awesomerobot 2023-03-10 16:42:57 -05:00
parent 99e5bb48c9
commit dd4c452c66
2 changed files with 9 additions and 2 deletions

View File

@ -704,6 +704,7 @@ function initialize(api) {
if (assignedToUser) {
assigneeElements.push(
h("span.assignee", [
h("span", `${I18n.t("discourse_assign.topic_to")} `),
h(
"a",
{
@ -720,6 +721,7 @@ function initialize(api) {
if (assignedToGroup) {
assigneeElements.push(
h("span.assignee", [
h("span", `${I18n.t("discourse_assign.topic_to")} `),
h(
"a",
{
@ -747,7 +749,10 @@ function initialize(api) {
href: `${topic.url}/${postNumber}`,
},
},
`#${postNumber} ${assignee.username || assignee.name}`
I18n.t("discourse_assign.assign_post_to", {
post_number: postNumber,
username: assignee.username || assignee.name,
})
),
])
);
@ -756,7 +761,7 @@ function initialize(api) {
if (!isEmpty(assigneeElements)) {
return h("p.assigned-to", [
assignedToUser ? iconNode("user-plus") : iconNode("group-plus"),
h("span.assign-text", I18n.t("discourse_assign.assigned_to")),
h("span.assign-text", I18n.t("discourse_assign.assigned")),
assigneeElements,
]);
}

View File

@ -27,6 +27,8 @@ en:
assigned: "Assigned"
group_everyone: "Everyone"
assigned_to: "Assigned to"
topic_to: "topic to"
assign_post_to: "#%{post_number} to %{username}"
assigned_to_w_ellipsis: "Assigned to..."
assign_notification: "<p><span>%{username}</span> %{description}</p>"
assign_group_notification: "<p><span>%{username}</span> %{description}</p>"