WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 3 weeks ago

#47373 reviewing enhancement

Extend Moment.js localization

Reported by: swissspidy Owned by: SergeyBiryukov
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: I18N Keywords: good-first-bug has-patch
Focuses: Cc:

Description

With the Gutenberg integration we also got Moment.js in core with some localization support.

However, only a few of the fields that Moment.js supports are localized in WordPress. If a plugin wants to use some features like relative time (e.g. "%s hours ago"), these bits won't be translated.

I suggest also localizing thinks like relativeTime and potentially others.

See https://momentjs.com/docs/#/i18n/ for a full list of things that could be localized in core.

Similar enhancement in the past for jQuery UI datepicker: #29420

Attachments (1)

47373.diff (1.1 KB) - added by manzoorwani.jk 2 years ago.

Download all attachments as: .zip

Change History (10)

@manzoorwani.jk
2 years ago

#1 @manzoorwani.jk
2 years ago

  • Keywords has-patch added; needs-patch removed

It will need the changes in this file. I am on it as well.

#2 @manzoorwani.jk
2 years ago

Here is the corresponding PR to Gutenberg Repo. #16728

#3 @manzoorwani.jk
23 months ago

With the PR being merged, I guess this is now ready to go ahead.

This ticket was mentioned in Slack in #core-editor by talldanwp. View the logs.


21 months ago

This ticket was mentioned in Slack in #core by sergey. View the logs.


20 months ago

#6 @SergeyBiryukov
20 months ago

  • Milestone changed from Awaiting Review to 5.4
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


17 months ago

#8 @davidbaumwald
17 months ago

  • Milestone changed from 5.4 to Future Release

This ticket still needs a review, and with 5.4 Beta 1 landing tomorrow, this is being moved to Future Release. If any maintainer or committer feels this can be included in 5.4 or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.

#9 @adrianduffell
3 weeks ago

If a plugin wants to use some features like relative time (e.g. "%s hours ago"), these bits won't be translated.

This behavior occurs in WooCommerce where relative times are not translated.

Could the patch please be reviewed? Thank you.

Note: See TracTickets for help on using tickets.