Make WordPress Core


Ignore:
Timestamp:
02/07/2023 05:08:26 PM (2 years ago)
Author:
SergeyBiryukov
Message:

I18N: Mark screen reader strings as such with translator comments.

This aims to provide better context for translators and make it easier to determine that some strings contain hidden accessibility text and are not displayed in the UI.

Props kebbet, mercime, pavelevap, ocean90, swissspidy, Chouby, jipmoors, afercia, desrosj, costdev, audrasjb, SergeyBiryukov.
Fixes #29748.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-terms-list-table.php

    r54378 r55276  
    361361                '<input type="checkbox" name="delete_tags[]" value="%1$s" id="cb-select-%1$s" />',
    362362                $tag->term_id,
    363                 /* translators: %s: Taxonomy term name. */
     363                /* translators: Hidden accessibility text. %s: Taxonomy term name. */
    364364                sprintf( __( 'Select %s' ), $tag->name )
    365365            );
     
    548548            return $tag->description;
    549549        } else {
    550             return '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . __( 'No description' ) . '</span>';
     550            return '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' .
     551                /* translators: Hidden accessibility text. */
     552                __( 'No description' ) .
     553            '</span>';
    551554        }
    552555    }
Note: See TracChangeset for help on using the changeset viewer.