Make WordPress Core


Ignore:
Timestamp:
09/28/2025 10:36:30 PM (10 months ago)
Author:
joedolson
Message:

I18n: Combine duplicate text strings into variables.

In cases where a string is used both for a visible label and a screen reader text label, the screen reader text should never be different from the visible label. To help ensure this doesn't happen, use only a single string. The associated screen reader text comments are no longer required.

This is also true for a few cases where there are strings in contexts where variables can't be used. In these cases, the screen reader text comments are also removed.

Props sabernhardt, swissspidy, audrasjb, joedolson.
Fixes #63620.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-permalink.php

    r57793 r60805  
    327327<table class="form-table permalink-structure" role="presentation">
    328328<tbody>
     329<?php $permalink_structure_title = __( 'Permalink structure' ); ?>
    329330<tr>
    330         <th scope="row"><?php _e( 'Permalink structure' ); ?></th>
     331        <th scope="row"><?php echo $permalink_structure_title; ?></th>
    331332        <td>
    332333                <fieldset class="structure-selection">
    333                         <legend class="screen-reader-text">
    334                                 <?php
    335                                 /* translators: Hidden accessibility text. */
    336                                 _e( 'Permalink structure' );
    337                                 ?>
    338                         </legend>
     334                        <legend class="screen-reader-text"><?php echo $permalink_structure_title; ?></legend>
    339335                        <?php foreach ( $default_structures as $input ) : ?>
    340336                        <div class="row">
Note: See TracChangeset for help on using the changeset viewer.