Skip to content
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

Use wp_date instead of DateTime format to allow localization of latest news dates #496

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

raikasdev
Copy link
Contributor

@raikasdev raikasdev commented Nov 8, 2023

Changes behaviour to use wp_date instead of DateTime->format() in the "Latest news"-block. This allows the string to be localized on Rosetta/lang.wordpress.org sites.

Closes #493

This uses wp_date to allow for localization of the date strings
@tellyworth tellyworth requested a review from iandunn November 15, 2023 19:51
@raikasdev
Copy link
Contributor Author

Hey @iandunn, could you take a look at this small PR, thank you! 🙏

@ryelle ryelle self-requested a review January 8, 2024 16:44
Copy link
Contributor

@ryelle ryelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, the date is translated correctly 👍🏻

Before After
Screenshot 2024-01-08 at 11 54 16 AM Screenshot 2024-01-08 at 11 53 47 AM

@ryelle ryelle merged commit 6d37a36 into WordPress:trunk Jan 8, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use native WordPress date formatting, instead of PHP DateTime for latest news
2 participants