Hey.
I’m having difficulties in editing the language string ‘replies’. I can’t seem to find the right string to edit, or it’s somehow gone. I’m referring to the ‘replies’ which appears in the notification area when a user receives a private message.
Ideas?
1 Like
gerhard
(Gerhard Schlager)
March 8, 2019, 12:39pm
2
That should be embed.replies – I recommend you translate it on Transifex . That way it will be translated for everyone.
5 Likes
Thank you. I did try to edit this string but it didn’t work, still doesn’t.
I can’t find the ‘embed.replies’ string on Transifex as well.
gerhard
(Gerhard Schlager)
March 8, 2019, 9:14pm
5
I’m guessing we are talking about Arabic? If so, here’s a direct link: https://www.transifex.com/discourse/discourse-org/translate/#ar/core-server-yml/140679227?q=key%3Aembed.replies
Otherwise change the language on Transifex accordingly.
4 Likes
sam
(Sam Saffron)
March 12, 2019, 1:42am
7
Oh my:
post = first_unread_post(user, post.topic) || post
count = unread_count(user, post.topic)
if count > 1
I18n.with_locale(user.effective_locale) do
opts[:display_username] = I18n.t('embed.replies', count: count)
end
end
This is so hacky, we got to clean this up and do the localization using these guys:
notifications:
tooltip:
regular:
one: "1 unseen notification"
other: "{{count}} unseen notifications"
message:
one: "1 unread message"
other: "{{count}} unread messages"
title: "notifications of @name mentions, replies to your posts and topics, messages, etc"
none: "Unable to load notifications at this time."
empty: "No notifications found."
more: "view older notifications"
total_flagged: "total flagged posts"
mentioned: "<span>{{username}}</span> {{description}}"
group_mentioned: "<span>{{username}}</span> {{description}}"
quoted: "<span>{{username}}</span> {{description}}"
replied: "<span>{{username}}</span> {{description}}"
posted: "<span>{{username}}</span> {{description}}"
edited: "<span>{{username}}</span> {{description}}"
liked: "<span>{{username}}</span> {{description}}"
This file has been truncated. show original
And stop using a “pretend” username which is broken when you switch locales (cause its baked into the notification)
@gerhard can you clean this up and do the localization here instead:
discourse/app/assets/javascripts/discourse/widgets/notification-item.js.es6 at be5e889b1b55de148b32ae864390a585e027b1ec · discourse/discourse · GitHub
3 Likes