mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
UX: consistent chat message date format (#29232)
In certain locales like English (GB), If a user posted 2 subsequent messages, the first would have a date displayed in 24 hour format, while the second message would be shown in 12 hour format (when hovering the message). This change forces both messages to display in 12 hour format, the first message showing the am/pm, and the second showing the smaller version without am/pm.
This commit is contained in:
parent
4aa923aab1
commit
6078fb73ea
@ -12,7 +12,7 @@ export default function formatChatDate(message, options = {}) {
|
||||
const display =
|
||||
options.mode === "tiny"
|
||||
? date.format(I18n.t("chat.dates.time_tiny"))
|
||||
: date.format(I18n.t("dates.time"));
|
||||
: date.format(I18n.t("chat.dates.time"));
|
||||
|
||||
if (message.staged) {
|
||||
return htmlSafe(
|
||||
|
@ -45,6 +45,7 @@ en:
|
||||
deleted_chat_username: deleted
|
||||
dates:
|
||||
yesterday: "Yesterday"
|
||||
time: "h:mm a"
|
||||
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
Block a user