UX: Include the username and link of the user for get_a_room

This commit is contained in:
Robin Ward 2017-02-08 15:27:07 -05:00
parent 9fe4427071
commit 5a4c393231
2 changed files with 9 additions and 3 deletions

View File

@ -317,13 +317,13 @@ en:
Are you sure youre providing adequate time for other people to share their points of view, too? Are you sure youre providing adequate time for other people to share their points of view, too?
get_a_room: | get_a_room: |
### Youre replying a lot to the same person ### Youre replying a lot to @%{reply_username}
Youve already replied %{count} times to this person in this particular topic. Youve already replied %{count} times to this person in this particular topic.
Have you considered replying to *other* people in the discussion, too? A great discussion involves many voices and perspectives. Have you considered replying to *other* people in the discussion, too? A great discussion involves many voices and perspectives.
If youd like to continue your conversation with this particular user at length, consider sending them a personal message. If youd like to continue your conversation with this particular user at length, consider [sending them a personal message](/users/%{reply_username}).
too_many_replies: | too_many_replies: |
### You have reached the reply limit for this topic ### You have reached the reply limit for this topic

View File

@ -156,13 +156,19 @@ class ComposerMessagesFinder
target_user_id: @user.id, target_user_id: @user.id,
topic_id: @details[:topic_id]) topic_id: @details[:topic_id])
reply_username = User.where(id: last_x_replies[0]).pluck(:username).first
{ {
id: 'get_a_room', id: 'get_a_room',
templateName: 'education', templateName: 'education',
wait_for_typing: true, wait_for_typing: true,
extraClass: 'education-message', extraClass: 'education-message',
body: PrettyText.cook( body: PrettyText.cook(
I18n.t('education.get_a_room', count: SiteSetting.get_a_room_threshold) I18n.t(
'education.get_a_room',
count: SiteSetting.get_a_room_threshold,
reply_username: reply_username
)
) )
} }
end end