message_list_view: Use translated form of "at" in timestamp tooltip.

The English word "at" was manually appended to the string output of
datetime-related functions to generate the string shown in the tooltip
when hovering over the timestamp of a message. Use the translated form
"{date} at {time}" instead, as found elsewhere in the codebase.
This commit is contained in:
Josh Klar 2023-01-10 21:31:53 -08:00 committed by Tim Abbott
parent 1a3b0edf4b
commit 465d0b2710
1 changed files with 6 additions and 4 deletions

View File

@ -256,10 +256,12 @@ export class MessageListView {
if (last_edit_timestamp !== undefined) {
const last_edit_time = new Date(last_edit_timestamp * 1000);
const today = new Date();
return (
timerender.render_date(last_edit_time, undefined, today)[0].textContent +
" at " +
timerender.stringify_time(last_edit_time)
return $t(
{defaultMessage: "{date} at {time}"},
{
date: timerender.render_date(last_edit_time, undefined, today)[0].textContent,
time: timerender.stringify_time(last_edit_time),
},
);
}
return undefined;