Commit b0e6242d by Omar Al-Ithawi

Translate discussion in `discussion posted 1s ago by X`

parent be5c4fad
......@@ -25,16 +25,17 @@
{created_at: created_at},
true
);
var postedTimeAgoMessage;
// Using a separate message to ensure proper translation for different languages
// thread_type describes the kind of post this is (e.g. "question" or "discussion");
// time_ago is how much time has passed since the post was created (e.g. "4 hours ago")
if (thread_type === 'discussion') {
postedTimeAgoMessage = gettext('discussion posted %(time_ago)s by %(author)s');
} else {
postedTimeAgoMessage = gettext('question posted %(time_ago)s by %(author)s');
}
%>
<%=
interpolate(
// Translators: post_type describes the kind of post this is (e.g. "question" or "discussion");
// time_ago is how much time has passed since the post was created (e.g. "4 hours ago")
_.escape(gettext('%(post_type)s posted %(time_ago)s by %(author)s')),
{post_type: thread_type, time_ago: timeAgoHtml, author: author_display},
true
)
%>
<%= interpolate(_.escape(postedTimeAgoMessage), {time_ago: timeAgoHtml, author: author_display}, true) %>
</p>
<div class="post-labels">
<span class="post-label post-label-pinned">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment