diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.gjs index b00f21c38dd..37d2347301b 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.gjs @@ -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", }); diff --git a/plugins/chat/config/locales/client.en.yml b/plugins/chat/config/locales/client.en.yml index 88769aa6927..9d2ccb10b73 100644 --- a/plugins/chat/config/locales/client.en.yml +++ b/plugins/chat/config/locales/client.en.yml @@ -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."