Make WordPress Core

Changeset 36845


Ignore:
Timestamp:
03/04/2016 11:11:03 AM (9 years ago)
Author:
SergeyBiryukov
Message:

I18N: Move the aria-label text in get_theme_update_available() to a separate string for easier translation.

Add translator comments.

Props ramiy.
Fixes #36048.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/theme.php

    r36422 r36845  
    167167        if ( !is_multisite() ) {
    168168            if ( ! current_user_can('update_themes') ) {
    169                 /* translators: 1: theme name, 2: theme details URL, 3: theme version number */
    170                 $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox">View version %3$s details</a>.' ) . '</strong></p>',
    171                     $theme_name, esc_url( $details_url ), $update['new_version'] );
     169                /* translators: 1: theme name, 2: theme details URL, 3: accessibility text, 4: version number */
     170                $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a>.' ) . '</strong></p>',
     171                    $theme_name,
     172                    esc_url( $details_url ),
     173                    /* translators: 1: theme name, 2: version number */
     174                    esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) ),
     175                    $update['new_version']
     176                );
    172177            } elseif ( empty( $update['package'] ) ) {
    173                 /* translators: 1: theme name, 2: theme details URL, 3: theme version number */
    174                 $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox">View version %3$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ) . '</strong></p>',
    175                     $theme_name, esc_url( $details_url ), $update['new_version'] );
     178                /* translators: 1: theme name, 2: theme details URL, 3: accessibility text, 4: version number */
     179                $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ) . '</strong></p>',
     180                    $theme_name,
     181                    esc_url( $details_url ),
     182                    /* translators: 1: theme name, 2: version number */
     183                    esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) ),
     184                    $update['new_version']
     185                );
    176186            } else {
    177                 /* translators: 1: theme name, 2: theme details URL, 3: theme version number, 4: theme update URL */
    178                 $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox">View version %3$s details</a> or <a href="%4$s">update now</a>.' ) . '</strong></p>',
    179                     $theme_name, esc_url( $details_url ), $update['new_version'], $update_url );
     187                /* translators: 1: theme name, 2: theme details URL, 3: accessibility text, 4: version number, 5: update URL, 6: accessibility text */
     188                $html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" aria-label="%6$s">update now</a>.' ) . '</strong></p>',
     189                    $theme_name,
     190                    esc_url( $details_url ),
     191                    /* translators: 1: theme name, 2: version number */
     192                    esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) ),
     193                    $update['new_version'],
     194                    $update_url,
     195                    /* translators: %s: theme name */
     196                    esc_attr( sprintf( __( 'Update %s now' ), $theme_name ) )
     197                );
    180198            }
    181199        }
Note: See TracChangeset for help on using the changeset viewer.