[wp-trac] [WordPress Trac] #60647: Script Modules: Allow modules to depend on existing WordPress scripts

WordPress Trac noreply at wordpress.org
Fri Oct 4 11:07:20 UTC 2024


#60647: Script Modules: Allow modules to depend on existing WordPress scripts
-------------------------------------------------+-------------------------
 Reporter:  jonsurrell                           |       Owner:  jonsurrell
     Type:  feature request                      |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.8
Component:  Script Loader                        |     Version:  6.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:  javascript
  note                                           |
-------------------------------------------------+-------------------------

Comment (by financialcalculators):

 Is this problem discussed below related to this ticket?

 JavaScript Translations Not Working with ES6 Modules in WordPress

 [https://wordpress.org/support/topic/javascript-translations-not-working-
 with-es6-modules-in-wordpress/#post-18050453]

 **Summary:**

 WordPress’ i18n foreign language translation functionality does not work
 as expected in JavaScript when a plugin utilizes ES6 modules. The
 translation data, which should be injected into the webpage, is removed
 after the script_loader_tag filter is applied. This behavior prevents
 JavaScript/.json translations from being displayed.

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


More information about the wp-trac mailing list