[wp-trac] [WordPress Trac] #46305: Update emails w/ placeholders to use sprintf

WordPress Trac noreply at wordpress.org
Fri Feb 22 05:45:55 UTC 2019


#46305: Update emails w/ placeholders to use sprintf
------------------------------+-----------------------------
 Reporter:  garrett-eclipse   |      Owner:  (none)
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  I18N              |    Version:
 Severity:  normal            |   Keywords:
  Focuses:  coding-standards  |
------------------------------+-----------------------------
 In #32263 several comments for 'Do not translate...' placeholders in email
 content were introduced. This has been the convention it seems throughout
 core.

 This puts the onus on translators to read those comments as well as not
 accidentally change them or drop one of the surrounding # characters on
 many of them.

 Can this simply be switched to sprintf functions with numeric placeholders
 and the translator comments be updated to indicate the placeholders. This
 seems a little nicer of an approach than simply saying don't do something
 and hoping for the best.

 Here's all the instances I've found;
 https://github.com/WordPress/WordPress/blob/56c162fbc9867f923862f64f1b4570d885f1ff03
 /wp-admin/ms-delete-site.php#L49-L67
 https://github.com/WordPress/WordPress/blob/50ddffbac37fdae9298d1f11fe1dd7b8535fc839
 /wp-includes/user.php#L2015-L2029
 https://github.com/WordPress/WordPress/blob/50ddffbac37fdae9298d1f11fe1dd7b8535fc839
 /wp-includes/user.php#L3036-L3052
 https://github.com/WordPress/WordPress/blob/0b15142c0bb375fee19f9576356bf2aac2a56d2a
 /wp-includes/ms-functions.php#L1544-L1560
 https://github.com/WordPress/WordPress/blob/0b15142c0bb375fee19f9576356bf2aac2a56d2a
 /wp-includes/ms-functions.php#L2275-L2289
 https://github.com/WordPress/WordPress/blob/dcdfd7f412cb83f43116f6e37d7bfba4b4673cde
 /wp-admin/includes/file.php#L2204-L2218
 https://github.com/WordPress/WordPress/blob/729c8e875fd84e29cb26103ee43eec7f67a61f6e
 /wp-admin/includes/misc.php#L1244-L1262
 https://github.com/WordPress/WordPress/blob/c204ac4bc7972c9ca1e6b354ec8fb0851e255bc5
 /wp-includes/functions.php#L6473-L6486

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


More information about the wp-trac mailing list