WordPress.org

Make WordPress Core

Opened 5 months ago

Last modified 6 days ago

#47373 new enhancement

Extend Moment.js localization

Reported by: swissspidy Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: I18N Keywords: good-first-bug has-patch
Focuses: Cc:
PR Number:

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 3 months ago.

Download all attachments as: .zip

Change History (5)

#1 @manzoorwani.jk
3 months 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
3 months ago

Here is the corresponding PR to Gutenberg Repo. #16728

#3 @manzoorwani.jk
3 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.


6 days ago

Note: See TracTickets for help on using tickets.