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:
Joffrey JAFFEUX 2024-01-27 07:03:58 +01:00 committed by GitHub
parent 6d57da1d6e
commit 68288a3bfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -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",
});

View File

@ -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."