FIX: allows to translate yesterday (#25446)
The value [Yesterday] was a fixed string which couldn't be translated. Also removes nextWeek/nextDay which make no sense for dates which are always supposed to be in the past.
This commit is contained in:
parent
6d57da1d6e
commit
68288a3bfc
|
@ -1,4 +1,5 @@
|
|||
import Component from "@glimmer/component";
|
||||
import I18n from "I18n";
|
||||
import ChatChannelUnreadIndicator from "./chat-channel-unread-indicator";
|
||||
|
||||
export default class ChatChannelMetadata extends Component {
|
||||
|
@ -9,9 +10,7 @@ export default class ChatChannelMetadata extends Component {
|
|||
get lastMessageFormattedDate() {
|
||||
return moment(this.args.channel.lastMessage.createdAt).calendar(null, {
|
||||
sameDay: "LT",
|
||||
nextDay: "[Tomorrow]",
|
||||
nextWeek: "dddd",
|
||||
lastDay: "[Yesterday]",
|
||||
lastDay: `[${I18n.t("chat.dates.yesterday")}]`,
|
||||
lastWeek: "dddd",
|
||||
sameElse: "l",
|
||||
});
|
||||
|
|
|
@ -40,6 +40,7 @@ en:
|
|||
back_to_forum: "Forum"
|
||||
deleted_chat_username: deleted
|
||||
dates:
|
||||
yesterday: "Yesterday"
|
||||
time_tiny: "h:mm"
|
||||
all_loaded: "Showing all messages"
|
||||
already_enabled: "Chat is already enabled on this topic. Please refresh."
|
||||
|
|
Loading…
Reference in New Issue