[wp-trac] [WordPress Trac] #55250: Avoid sending empty script translations

WordPress Trac noreply at wordpress.org
Tue Mar 15 15:58:14 UTC 2022


#55250: Avoid sending empty script translations
--------------------------+----------------------
 Reporter:  jsnajdr       |       Owner:  ocean90
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  6.0
Component:  I18N          |     Version:  5.0
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+----------------------
Changes (by ocean90):

 * owner:  (none) => ocean90
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"52937" 52937]:
 {{{
 #!CommitTicketReference repository="" revision="52937"
 I18N, Script Loader: Don't register empty locale data objects.

 For `wp.i18n` the library [https://github.com/messageformat/Jed Jed] was
 initially used which was throwing an error if a domain was not registered
 but used in a translate function. Later, the library was replaced by
 [https://github.com/aduth/tannin Tannin] which no longer requires the
 domain to be registered and thus we can avoid printing an empty-ish
 translations script that doesn't add any translations.

 Props jsnajdr.
 Fixes #55250.
 }}}

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


More information about the wp-trac mailing list