Make WordPress Core

Changeset 37162


Ignore:
Timestamp:
04/06/2016 12:51:57 PM (10 years ago)
Author:
ocean90
Message:

I18N: On the Updates screen simplify plugin's version details link.

Replace the use of a .screen-reader-text element with an aria-label attribute to make the text easier to translate.

Props dimadin, ocean90.
See #35001.
Fixes #36410.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/update-core.php

    r36964 r37162  
    282282
    283283                $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin_data->update->slug . '&section=changelog&TB_iframe=true&width=640&height=662');
    284                 $details_name = sprintf( '<span class="screen-reader-text">%1$s</span>', esc_attr( $plugin_data->Name ) );
    285                 /* translators: 1: Plugin name 2: Plugin version */
    286                 $details_text = sprintf( __( 'View %1$s version %2$s details.' ), $details_name, $plugin_data->update->new_version );
    287                 $details = sprintf( '<a href="%1$s" class="thickbox open-plugin-details-modal">%2$s</a>', esc_url( $details_url ), $details_text );
    288                 $checkbox_id =  "checkbox_" . md5( $plugin_data->Name );
     284                $details = sprintf(
     285                        '<a href="%1$s" class="thickbox open-plugin-details-modal" aria-label="%2$s">%3$s</a>',
     286                        esc_url( $details_url ),
     287                        /* translators: 1: plugin name, 2: version number */
     288                        esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_data->Name, $plugin_data->update->new_version ) ),
     289                        /* translators: %s: plugin version */
     290                        sprintf( __( 'View version %s details.' ), $plugin_data->update->new_version )
     291                );
     292
     293                $checkbox_id = "checkbox_" . md5( $plugin_data->Name );
    289294                ?>
    290295                <tr>
Note: See TracChangeset for help on using the changeset viewer.