[wp-trac] [WordPress Trac] #38147: Add sprintf.js library to WordPress

WordPress Trac noreply at wordpress.org
Fri Sep 23 15:50:23 UTC 2016


#38147: Add sprintf.js library to WordPress
--------------------------------+-----------------------------
 Reporter:  swissspidy          |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  External Libraries  |    Version:
 Severity:  normal              |   Keywords:  needs-patch
  Focuses:  javascript          |
--------------------------------+-----------------------------
 Working on #20491 revealed a need for a `sprintf()` function in
 JavaScript.

 Although ES6 supports some basic string formatting, it's not something
 core could use in its various JS files. Thus, I suggest adding the very
 popular [https://github.com/alexei/sprintf.js sprintf.js] library to
 WordPress.

 The minified script is only 3.7 KB in size, the source file is 9.4 KB
 large. Adding it to core with the `sprintf` handle would not only benefit
 core but also various plugins and themes in need of such a functionality,
 especially with translations.

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


More information about the wp-trac mailing list