[wp-trac] [WordPress Trac] #45769: Expose JSON translation file paths

WordPress Trac noreply at wordpress.org
Wed Dec 26 12:32:28 UTC 2018


#45769: Expose JSON translation file paths
-------------------------+-----------------------------
 Reporter:  swissspidy   |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  I18N         |    Version:  5.0.2
 Severity:  normal       |   Keywords:  has-patch
  Focuses:               |
-------------------------+-----------------------------
 As noted by @johnbillion in [ticket:45425#comment:5], the potential
 translation file paths aren't exposed in `load_script_textdomain()` /
 `load_script_translations()`.

 The determined paths are only passed to `load_script_translations()` when
 the files exist. If they don't, `load_script_translations()` only receives
 `false`.

 This way it's impossible to hook into this for proper debugging like in
 [https://wordpress.org/plugins/query-monitor/ Query Monitor], or adding
 language fallbacks like in the [https://wordpress.org/plugins/preferred-
 languages/ Preferred Languages] feature plugin.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45769>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list