[wp-trac] [WordPress Trac] #63620: Remove translator comments when hidden text matches visible text

WordPress Trac noreply at wordpress.org
Wed Jun 25 18:30:50 UTC 2025


#63620: Remove translator comments when hidden text matches visible text
-------------------------------------------------+-------------------------
 Reporter:  sabernhardt                          |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  I18N                                 |     Version:  6.2
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch changes-requested 2nd-     |     Focuses:
  opinion                                        |  accessibility
-------------------------------------------------+-------------------------
Changes (by sabernhardt):

 * keywords:  has-patch changes-requested => has-patch changes-requested
     2nd-opinion


Comment:

 > in the end it's 1 string in GlotPress with a shared translator comment,
 which is confusing.

 For example, '[https://translate.wordpress.org/projects/wp/dev/admin/en-
 ca/default/?filters%5Bterm%5D=Email+me+whenever Email me whenever]' is
 used exactly twice in the administration, both to describe the same
 `fieldset`. Translators can read the comment for the hidden string even
 though the same text is also visible. If the comment changes how someone
 translates the text, that translation might not be appropriate for the
 header cell.

 > the better solution here is to add context to the string to distinguish
 them.

 I counted 36 strings in the (current) PR, and I do not wish to create so
 many new strings with the `_x()` context. An even better solution would be
 [https://core.trac.wordpress.org/ticket/39441#comment:22 displaying the
 legend] without repeating the same text in a table header cell. The
 upcoming admin redesign might revise the layout for settings pages, and
 maybe concentrating on that is a better way forward than making edits on
 this ticket.

 > is duplicated strings the only issue you want to solve here?

 Not the only reason. I started looking at this because the 'Enable menus'
 legend did not match the 'Enable administration menus' visible text. The
 header cell text is more precise, and screen reader users who can see the
 page could benefit from an exact match. Of course, adding the word
 'administration' in that `legend` should also reduce the total strings by
 one.

 ----

 History:
 - #6859 added the hidden legends
 - [11180] changed the class name from `.hidden` to `.invisible`
 - #9783 added `span` elements
 - #9791 changed the class name to `.screen-reader-text`

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


More information about the wp-trac mailing list