-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render current day formats in the client timezone #21878
Merged
Merged
+46
−17
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ClearlyClaire
requested changes
Dec 1, 2022
ClearlyClaire
requested changes
Dec 2, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine overall, I'd just use a fallback string for relative_format.today
!
ClearlyClaire
approved these changes
Dec 2, 2022
ClearlyClaire
approved these changes
Dec 10, 2022
neatchee
pushed a commit
to neatchee/mastodon
that referenced
this pull request
Dec 16, 2022
* Fix remaining plain %time to %time.formatted * Add %time.relative-formatted to client format dates on the current day * Add missing comma dangle to formats * Use client side message format instead of the server * Add fallback message to relatve_format.today * Remove unused translation key and fix js lint issue Co-authored-by: Effy Elden <[email protected]>
ClearlyClaire
added a commit
to ClearlyClaire/mastodon
that referenced
this pull request
Dec 20, 2022
neatchee
pushed a commit
to neatchee/mastodon
that referenced
this pull request
Dec 20, 2022
* Fix remaining plain %time to %time.formatted * Add %time.relative-formatted to client format dates on the current day * Add missing comma dangle to formats * Use client side message format instead of the server * Add fallback message to relatve_format.today * Remove unused translation key and fix js lint issue Co-authored-by: Effy Elden <[email protected]>
neatchee
pushed a commit
to neatchee/mastodon
that referenced
this pull request
Dec 21, 2022
* Fix remaining plain %time to %time.formatted * Add %time.relative-formatted to client format dates on the current day * Add missing comma dangle to formats * Use client side message format instead of the server * Add fallback message to relatve_format.today * Remove unused translation key and fix js lint issue Co-authored-by: Effy Elden <[email protected]>
nametoolong
pushed a commit
to nametoolong/nuage
that referenced
this pull request
Jan 12, 2023
* Fix remaining plain %time to %time.formatted * Add %time.relative-formatted to client format dates on the current day * Add missing comma dangle to formats * Use client side message format instead of the server * Add fallback message to relatve_format.today * Remove unused translation key and fix js lint issue Co-authored-by: Effy Elden <[email protected]>
nametoolong
pushed a commit
to nametoolong/nuage
that referenced
this pull request
Jan 12, 2023
…mp (mastodon#22555) * Fix incorrectly formatted datetime in account moderation note timestamp Fix oversight from mastodon#21878 * Fix use of non-existent translation string
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #18966 and possibly #21716
Four instances of time formatting were incomplete (
%time
instead of%time.formatted
):Without the
.formatted
class, it renders the UTC time instead of local time. I added a new classrelative-formatted
to replace the original functionality which renders time today and date otherwise.I think my solution is a bit dirty since i have to pass the raw translation format and format it on the client side. Perhaps just better to render just time without specifying
Today at ${time}
?Also any advice for unit tests here?