[wp-trac] [WordPress Trac] #51123: commonL10n and other JS globals removed without backwards compatibility

WordPress Trac noreply at wordpress.org
Sat Aug 29 03:24:17 UTC 2020


#51123: commonL10n and other JS globals removed without backwards compatibility
---------------------------------------------+-------------------------
 Reporter:  kbjohnson90                      |       Owner:  ocean90
     Type:  defect (bug)                     |      Status:  reviewing
 Priority:  normal                           |   Milestone:  5.5.1
Component:  Script Loader                    |     Version:  5.5
 Severity:  normal                           |  Resolution:
 Keywords:  needs-dev-note has-patch commit  |     Focuses:  javascript
---------------------------------------------+-------------------------

Comment (by peterwilsoncc):

 I'm a little concerned about returning empty strings in place of the
 original text, especially for important notices such as
 `commonL10n.warnDelete` and similar that warn an item is about to be
 permanently deleted. (cc @SergeyBiryukov following our conversation in
 Slack regarding this)

 In [attachment:"51123.2.diff"]

 * Deprecated objects include the original text -- where the translation
 was changed in the original commit, I've used the new string to avoid
 causing problems for the translation teams
 * Switched `console.error` to `console.warn` as these match deprecation
 warnings used in the version of React shipped with WordPress, refer
 https://github.com/facebook/react/issues/9395
 * `window.tagsl10n` appears to have been named `window.tagsSuggestL10n` in
 5.5 so I have renamed that to match in the updated patch
 * `wpWidgets.l10n` wasn't included in the previous patches, I have added
 it to `src/js/_enqueues/admin/widgets.js`

 I'm after logic checks on the following:

 * the use of `pagenow` for network and single site plugins
 * how I have used the translation functions
 * placement of translations will not cause extra work per @ocean90's
 concerns above

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


More information about the wp-trac mailing list