#47373 closed defect (bug) (fixed)
Extend Moment.js localization
Reported by: | swissspidy | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | good-first-bug has-patch commit |
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 (2)
Change History (29)
This ticket was mentioned in Slack in #core-editor by talldanwp. View the logs.
5 years ago
This ticket was mentioned in Slack in #core by sergey. View the logs.
5 years ago
#6
@
5 years 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.
5 years ago
#8
@
5 years 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
@
4 years 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.
This ticket was mentioned in Slack in #core by chihsuan. View the logs.
2 years ago
This ticket was mentioned in Slack in #core by chihsuan. View the logs.
2 years ago
#12
@
2 years ago
- Keywords dev-feedback added
- Milestone changed from Future Release to 6.1
With this being raised in Slack recently, this issue is still relevant. The patch looks straightforward and I think we can land it in 6.1.
It would be good to get feedback from someone with more i18n experience than myself.
@swissspidy @SergeyBiryukov what else might this need to move forward?
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
2 years ago
#14
@
2 years ago
- Milestone changed from 6.1 to 6.2
As discussed ahead of today's scheduled 6.1 Beta 1 release party (see the Slack link above), it was deemed that this ticket was not ready and should be punted to the 6.2 milestone to be reviewed and addressed then.
This ticket was mentioned in Slack in #core by costdev. View the logs.
23 months ago
#16
@
23 months ago
Hello all,
I see that Gutenberg's instance got an update. I'm curious:
Does it meet the needs of the enhancement request in this ticket?
If yes, then it might worth someone comparing the latest code https://github.com/WordPress/gutenberg/blob/trunk/packages/date/src/index.js#L70 to determine if the patch in this ticket is up-to-date.
This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.
23 months ago
#18
@
23 months ago
This ticket was discussed during the recent bug scrub.
@SergeyBiryukov As the patch may need to be revised, and we're approaching 6.2 Beta 1 on February 7th, is this ticket still on your radar for 6.2, or should it be moved to Future Release
?
Additional props: @mukesh27
This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.
22 months ago
#20
@
22 months ago
- Milestone changed from 6.2 to Future Release
Thanks @swissspidy for the ticket.
This ticket was discussed during the bug scrub. As this ticket still needs discussion and 6.2 Beta 1 is being released today, I'll move this to Future Release
.
Additional props: @costdev
#21
@
18 months ago
- Keywords needs-refresh added; has-patch removed
Since there has been an update in the Gutenberg code, the attached patch needs a refresh.
#23
@
16 months ago
Looks like the PR at https://github.com/WordPress/wordpress-develop/pull/5101 resolves this, with #59219 being a duplicate of this ticket.
#24
@
16 months ago
- Milestone changed from Future Release to 6.4
Moving to milestone 6.4 as this is going to be fixed by https://github.com/WordPress/wordpress-develop/pull/5101
It will need the changes in this file. I am on it as well.