mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 04:07:27 +00:00
UX: Improve empty state copy on the activity/replies page (#17784)
This commit is contained in:
parent
d7c1ff3116
commit
e49167b311
@ -2,6 +2,8 @@ import UserAction from "discourse/models/user-action";
|
||||
import UserActivityStreamRoute from "discourse/routes/user-activity-stream";
|
||||
import I18n from "I18n";
|
||||
import { action } from "@ember/object";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
|
||||
export default UserActivityStreamRoute.extend({
|
||||
userActionType: UserAction.TYPES["posts"],
|
||||
@ -9,12 +11,21 @@ export default UserActivityStreamRoute.extend({
|
||||
emptyState() {
|
||||
const user = this.modelFor("user");
|
||||
|
||||
const title = this.isCurrentUser(user)
|
||||
? I18n.t("user_activity.no_replies_title")
|
||||
: I18n.t("user_activity.no_replies_title_others", {
|
||||
username: user.username,
|
||||
});
|
||||
const body = "";
|
||||
let title, body;
|
||||
if (this.isCurrentUser(user)) {
|
||||
title = I18n.t("user_activity.no_replies_title");
|
||||
body = htmlSafe(
|
||||
I18n.t("user_activity.no_replies_body", {
|
||||
searchUrl: getURL("/search"),
|
||||
})
|
||||
);
|
||||
} else {
|
||||
title = I18n.t("user_activity.no_replies_title_others", {
|
||||
username: user.username,
|
||||
});
|
||||
body = "";
|
||||
}
|
||||
|
||||
return { title, body };
|
||||
},
|
||||
|
||||
|
@ -4062,6 +4062,7 @@ en:
|
||||
no_activity_body: "Welcome to our community! You are brand new here and have not yet contributed to discussions. As a first step, visit <a href='%{topUrl}'>Top</a> or <a href='%{categoriesUrl}'>Categories</a> and just start reading! Select %{heartIcon} on posts that you like or want to learn more about. As you participate, your activity will be listed here."
|
||||
no_replies_title: "You have not replied to any topics yet"
|
||||
no_replies_title_others: "%{username} has not replied to any topics yet"
|
||||
no_replies_body: "When you <a href='%{searchUrl}'>discover</a> an interesting conversation that you wish to contribute to, press the <kbd>Reply</kbd> button directly under any post to begin repying to that specific post. Or, if you’d prefer to reply to the general topic rather than any individual post or person, look for the <kbd>Reply</kbd> button at the very bottom of the topic, or under the topic timeline."
|
||||
no_drafts_title: "You haven’t started any drafts"
|
||||
no_drafts_body: "Not quite ready to post? We’ll automatically save a new draft and list it here whenever you start composing a topic, reply, or personal message. Select the cancel button to discard or save your draft to continue later."
|
||||
no_likes_title: "You haven’t liked any topics yet"
|
||||
|
Loading…
x
Reference in New Issue
Block a user