mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: move chat time formats to core locales (#29236)
This change moves the date/time formats to core locales, so that they can be used outside of the plugin.
This commit is contained in:
@@ -25,6 +25,8 @@ en:
|
|||||||
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
|
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
|
||||||
time: "h:mm a"
|
time: "h:mm a"
|
||||||
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
|
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
|
||||||
|
time_short: "h:mm"
|
||||||
|
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
|
||||||
time_with_zone: "hh:mm a (z)"
|
time_with_zone: "hh:mm a (z)"
|
||||||
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
|
# Use Moment.js format string: https://momentjs.com/docs/#/displaying/format/
|
||||||
time_short_day: "ddd, h:mm a"
|
time_short_day: "ddd, h:mm a"
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ export default function formatChatDate(message, options = {}) {
|
|||||||
const title = date.format(I18n.t("dates.long_with_year"));
|
const title = date.format(I18n.t("dates.long_with_year"));
|
||||||
const display =
|
const display =
|
||||||
options.mode === "tiny"
|
options.mode === "tiny"
|
||||||
? date.format(I18n.t("chat.dates.time_tiny"))
|
? date.format(I18n.t("dates.time_short"))
|
||||||
: date.format(I18n.t("chat.dates.time"));
|
: date.format(I18n.t("dates.time"));
|
||||||
|
|
||||||
if (message.staged) {
|
if (message.staged) {
|
||||||
return htmlSafe(
|
return htmlSafe(
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ en:
|
|||||||
deleted_chat_username: deleted
|
deleted_chat_username: deleted
|
||||||
dates:
|
dates:
|
||||||
yesterday: "Yesterday"
|
yesterday: "Yesterday"
|
||||||
time: "h:mm a"
|
|
||||||
time_tiny: "h:mm"
|
|
||||||
all_loaded: "Showing all messages"
|
all_loaded: "Showing all messages"
|
||||||
already_enabled: "Chat is already enabled on this topic. Please refresh."
|
already_enabled: "Chat is already enabled on this topic. Please refresh."
|
||||||
disabled_for_topic: "Chat is disabled on this topic."
|
disabled_for_topic: "Chat is disabled on this topic."
|
||||||
|
|||||||
Reference in New Issue
Block a user