[wp-trac] [WordPress Trac] #31862: Avoid using HTML tags in translation strings and add context

WordPress Trac noreply at wordpress.org
Thu Sep 24 12:27:17 UTC 2015


#31862: Avoid using HTML tags in translation strings and add context
--------------------------+-----------------------------
 Reporter:  ramiy         |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  4.4
Component:  I18N          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------

Comment (by ramiy):

 Replying to [comment:11 pavelevap]:
 > Translators should view the whole string, because they can also see
 better context.
 >
 > `(active)` - What is active? Where is it diplayed? At least there is a
 need for detailed translators comment, because it does not mean only
 "active plugin", but context is "editing file in plugin editor for active
 plugin and active word in brackets has to be in the end of sentence". This
 is not a good approach...

 What active? the plugin is active.

 This is why we used the `_x()` function.

 We added content to the string.

 The code is `_x( '(active)', 'plugin' );`

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


More information about the wp-trac mailing list