diff --git a/src/intl/en-US.js b/src/intl/en-US.js index e145bef6..c7502834 100644 --- a/src/intl/en-US.js +++ b/src/intl/en-US.js @@ -394,7 +394,7 @@ export default { hideUnread: 'Hide unread notifications count (i.e. the red dot)', // The quality that makes something seem important or interesting because it seems to be happening now immediacy: 'Immediacy', - showAbsoluteTimestamps: 'Show absolute timestamps instead of relative timestamps', + showAbsoluteTimestamps: 'Show absolute timestamps (e.g. "March 3rd") instead of relative timestamps (e.g. "5 minutes ago")', ui: 'UI', grayscaleMode: 'Grayscale mode', wellnessFooter: `These settings are partly based on guidelines from the diff --git a/src/routes/_a11y/getAccessibleLabelForStatus.js b/src/routes/_a11y/getAccessibleLabelForStatus.js index 2fa78bb3..62b8e5f8 100644 --- a/src/routes/_a11y/getAccessibleLabelForStatus.js +++ b/src/routes/_a11y/getAccessibleLabelForStatus.js @@ -35,7 +35,7 @@ function cleanupText (text) { } export function getAccessibleLabelForStatus (originalAccount, account, plainTextContent, - timeagoFormattedDate, spoilerText, showContent, + shortInlineFormattedDate, spoilerText, showContent, reblog, notification, visibility, omitEmojiInDisplayNames, disableLongAriaLabels, showMedia, showPoll) { const originalAccountDisplayName = getAccountAccessibleName(originalAccount, omitEmojiInDisplayNames) @@ -58,7 +58,7 @@ export function getAccessibleLabelForStatus (originalAccount, account, plainText contentTextToShow, mediaTextToShow, pollTextToShow, - timeagoFormattedDate, + shortInlineFormattedDate, `@${originalAccount.acct}`, privacyText, getReblogText(reblog, account, omitEmojiInDisplayNames) diff --git a/src/routes/_components/status/Status.html b/src/routes/_components/status/Status.html index 9e617d4e..b94e2db5 100644 --- a/src/routes/_components/status/Status.html +++ b/src/routes/_components/status/Status.html @@ -127,7 +127,7 @@ import { formatTimeagoDate } from '../../_intl/formatTimeagoDate' import { measureText } from '../../_utils/measureText' import { LONG_POST_LENGTH, LONG_POST_TEXT } from '../../_static/statuses' - import { absoluteDateFormatter } from '../../_utils/formatters' + import { absoluteDateFormatter, dayOnlyAbsoluteDateFormatter } from '../../_utils/formatters' import { composeNewStatusMentioning } from '../../_actions/mention' import { createStatusOrNotificationUuid } from '../../_utils/createStatusOrNotificationUuid' import { addEmojiTooltips } from '../../_utils/addEmojiTooltips' @@ -277,15 +277,19 @@ createdAtDate: ({ originalStatus }) => originalStatus.created_at, createdAtDateTS: ({ createdAtDate }) => new Date(createdAtDate).getTime(), absoluteFormattedDate: ({ createdAtDateTS }) => absoluteDateFormatter.format(createdAtDateTS), - timeagoFormattedDate: ({ createdAtDateTS, $now }) => formatTimeagoDate(createdAtDateTS, $now), + shortInlineFormattedDate: ({ createdAtDateTS, $now, $disableRelativeTimestamps }) => ( + $disableRelativeTimestamps + ? dayOnlyAbsoluteDateFormatter.format(createdAtDateTS) + : formatTimeagoDate(createdAtDateTS, $now) + ), reblog: ({ status }) => status.reblog, ariaLabel: ({ - originalAccount, account, plainTextContent, timeagoFormattedDate, spoilerText, + originalAccount, account, plainTextContent, shortInlineFormattedDate, spoilerText, showContent, reblog, notification, visibility, $omitEmojiInDisplayNames, $disableLongAriaLabels, showMedia, showPoll }) => ( getAccessibleLabelForStatus(originalAccount, account, plainTextContent, - timeagoFormattedDate, spoilerText, showContent, + shortInlineFormattedDate, spoilerText, showContent, reblog, notification, visibility, $omitEmojiInDisplayNames, $disableLongAriaLabels, showMedia, showPoll ) @@ -309,10 +313,10 @@ showContent: ({ spoilerText, spoilerShown }) => !spoilerText || spoilerShown, // These timestamp params may change every 10 seconds due to now() polling, so keep them // separate from the generic `params` list to avoid costly recomputes. - timestampParams: ({ createdAtDate, createdAtDateTS, timeagoFormattedDate, absoluteFormattedDate }) => ({ + timestampParams: ({ createdAtDate, createdAtDateTS, shortInlineFormattedDate, absoluteFormattedDate }) => ({ createdAtDate, createdAtDateTS, - timeagoFormattedDate, + shortInlineFormattedDate, absoluteFormattedDate }), // This params list deliberately does *not* include `spoilersShown` or `replyShown`, because these diff --git a/src/routes/_components/status/StatusRelativeDate.html b/src/routes/_components/status/StatusRelativeDate.html index e16bea97..a8284651 100644 --- a/src/routes/_components/status/StatusRelativeDate.html +++ b/src/routes/_components/status/StatusRelativeDate.html @@ -4,9 +4,9 @@ rel="prefetch" {tabindex} > -