[wp-trac] [WordPress Trac] #44599: Add translator notes to _post_states via _x

WordPress Trac noreply at wordpress.org
Mon Aug 20 20:29:20 UTC 2018


#44599: Add translator notes to _post_states via _x
-------------------------------------------------+-------------------------
 Reporter:  garrett-eclipse                      |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  4.9.9
Component:  I18N                                 |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-unit-tests i18n-     |     Focuses:
  change needs-refresh                           |  administration
-------------------------------------------------+-------------------------
Changes (by desrosj):

 * keywords:  has-patch needs-testing needs-unit-tests i18n-change => has-
     patch needs-unit-tests i18n-change needs-refresh


Comment:

 Hey @ccoa, thanks for the contribution!

 A few points of feedback on the latest patch.

 First, although it is simpler to use a `$context` variable for all `_x()`
 calls that share the same context, variables cannot be used in translation
 functions. The translation tools do not run within the context of PHP, so
 they have no way to determine what the value of the `$context` variable is
 when compiling the list of strings for translators.

 Second, it seems that the patch does not apply correctly. When creating a
 patch, it should be created against a development copy of WordPress. Check
 out the page about [https://make.wordpress.org/core/handbook/tutorials
 /installing-wordpress-locally/ Installing WordPress Locally] for some
 pointers on that.

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


More information about the wp-trac mailing list