[wp-trac] [WordPress Trac] #51142: Invalid Moment.js locale from get_user_locale()

WordPress Trac noreply at wordpress.org
Thu Mar 24 23:55:20 UTC 2022


#51142: Invalid Moment.js locale from get_user_locale()
--------------------------------+-------------------------
 Reporter:  slightlyfaulty      |       Owner:  (none)
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  6.0
Component:  External Libraries  |     Version:  5.0
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:  javascript
--------------------------------+-------------------------
Changes (by noisysocks):

 * milestone:  Awaiting Review => 6.0


Comment:

 I opened [https://github.com/WordPress/wordpress-develop/pull/2456 a PR]
 which should fix this. Noting this comment here for extra visibility:

 > An alternative to this PR is to remove the inline script from moment
 altogether. It was added in
 https://core.trac.wordpress.org/changeset/44262 without any note. I
 believe it was a mistake. It's not necessary since @wordpress/date will
 also call moment.updateLocale / moment.defineLocale and @wordpress/date is
 the only part of WP Admin that relies on moment localisation. It's
 possible that third party plugins now rely on this, though. What do you
 think @hellofromTonya @SergeyBiryukov?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51142#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list