I18N: Remove non-translatable link attributes from translatable strings in `wp_plugin_update_row()`, `wp_theme_update_row()`, and `get_theme_update_available()`.
The resulting strings are much easier to translate. See #36048. Built from https://develop.svn.wordpress.org/trunk@38082 git-svn-id: http://core.svn.wordpress.org/trunk@38023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2d19f94fac
commit
fd2d9ef63b
|
@ -171,35 +171,43 @@ function get_theme_update_available( $theme ) {
|
||||||
|
|
||||||
if ( !is_multisite() ) {
|
if ( !is_multisite() ) {
|
||||||
if ( ! current_user_can('update_themes') ) {
|
if ( ! current_user_can('update_themes') ) {
|
||||||
/* translators: 1: theme name, 2: theme details URL, 3: accessibility text, 4: version number */
|
/* translators: 1: theme name, 2: theme details URL, 3: additional link attributes, 4: version number */
|
||||||
$html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>.' ) . '</strong></p>',
|
$html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.' ) . '</strong></p>',
|
||||||
$theme_name,
|
$theme_name,
|
||||||
esc_url( $details_url ),
|
esc_url( $details_url ),
|
||||||
/* translators: 1: theme name, 2: version number */
|
sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
|
||||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) ),
|
/* translators: 1: theme name, 2: version number */
|
||||||
|
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) )
|
||||||
|
),
|
||||||
$update['new_version']
|
$update['new_version']
|
||||||
);
|
);
|
||||||
} elseif ( empty( $update['package'] ) ) {
|
} elseif ( empty( $update['package'] ) ) {
|
||||||
/* translators: 1: theme name, 2: theme details URL, 3: accessibility text, 4: version number */
|
/* translators: 1: theme name, 2: theme details URL, 3: additional link attributes, 4: version number */
|
||||||
$html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ) . '</strong></p>',
|
$html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ) . '</strong></p>',
|
||||||
$theme_name,
|
$theme_name,
|
||||||
esc_url( $details_url ),
|
esc_url( $details_url ),
|
||||||
/* translators: 1: theme name, 2: version number */
|
sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
|
||||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) ),
|
/* translators: 1: theme name, 2: version number */
|
||||||
|
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) )
|
||||||
|
),
|
||||||
$update['new_version']
|
$update['new_version']
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
/* translators: 1: theme name, 2: theme details URL, 3: accessibility text, 4: version number, 5: update URL, 6: accessibility text */
|
/* translators: 1: theme name, 2: theme details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
|
||||||
$html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" aria-label="%6$s" id="update-theme" data-slug="%7$s">update now</a>.' ) . '</strong></p>',
|
$html = sprintf( '<p><strong>' . __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.' ) . '</strong></p>',
|
||||||
$theme_name,
|
$theme_name,
|
||||||
esc_url( $details_url ),
|
esc_url( $details_url ),
|
||||||
/* translators: 1: theme name, 2: version number */
|
sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
|
||||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) ),
|
/* translators: 1: theme name, 2: version number */
|
||||||
|
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) )
|
||||||
|
),
|
||||||
$update['new_version'],
|
$update['new_version'],
|
||||||
$update_url,
|
$update_url,
|
||||||
/* translators: %s: theme name */
|
sprintf( 'aria-label="%s" id="update-theme" data-slug="%s"',
|
||||||
esc_attr( sprintf( __( 'Update %s now' ), $theme_name ) ),
|
/* translators: %s: theme name */
|
||||||
$stylesheet
|
esc_attr( sprintf( __( 'Update %s now' ), $theme_name ) ),
|
||||||
|
$stylesheet
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,34 +368,42 @@ function wp_plugin_update_row( $file, $plugin_data ) {
|
||||||
echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $response->slug . '-update' ) . '" data-slug="' . esc_attr( $response->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt"><p>';
|
echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $response->slug . '-update' ) . '" data-slug="' . esc_attr( $response->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt"><p>';
|
||||||
|
|
||||||
if ( ! current_user_can( 'update_plugins' ) ) {
|
if ( ! current_user_can( 'update_plugins' ) ) {
|
||||||
/* translators: 1: plugin name, 2: details URL, 3: accessibility text, 4: version number */
|
/* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */
|
||||||
printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>.' ),
|
printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.' ),
|
||||||
$plugin_name,
|
$plugin_name,
|
||||||
esc_url( $details_url ),
|
esc_url( $details_url ),
|
||||||
/* translators: 1: plugin name, 2: version number */
|
sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
|
||||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) ),
|
/* translators: 1: plugin name, 2: version number */
|
||||||
|
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
|
||||||
|
),
|
||||||
$response->new_version
|
$response->new_version
|
||||||
);
|
);
|
||||||
} elseif ( empty( $response->package ) ) {
|
} elseif ( empty( $response->package ) ) {
|
||||||
/* translators: 1: plugin name, 2: details URL, 3: accessibility text, 4: version number */
|
/* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */
|
||||||
printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>' ),
|
printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>' ),
|
||||||
$plugin_name,
|
$plugin_name,
|
||||||
esc_url( $details_url ),
|
esc_url( $details_url ),
|
||||||
/* translators: 1: plugin name, 2: version number */
|
sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
|
||||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) ),
|
/* translators: 1: plugin name, 2: version number */
|
||||||
|
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
|
||||||
|
),
|
||||||
$response->new_version
|
$response->new_version
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
/* translators: 1: plugin name, 2: details URL, 3: accessibility text, 4: version number, 5: update URL, 6: accessibility text */
|
/* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
|
||||||
printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="%6$s">update now</a>.' ),
|
printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.' ),
|
||||||
$plugin_name,
|
$plugin_name,
|
||||||
esc_url( $details_url ),
|
esc_url( $details_url ),
|
||||||
/* translators: 1: plugin name, 2: version number */
|
sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
|
||||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) ),
|
/* translators: 1: plugin name, 2: version number */
|
||||||
|
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
|
||||||
|
),
|
||||||
$response->new_version,
|
$response->new_version,
|
||||||
wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ),
|
wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ),
|
||||||
/* translators: %s: plugin name */
|
sprintf( 'class="update-link" aria-label="%s"',
|
||||||
esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) )
|
/* translators: %s: plugin name */
|
||||||
|
esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) )
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -505,34 +513,42 @@ function wp_theme_update_row( $theme_key, $theme ) {
|
||||||
|
|
||||||
echo '<tr class="plugin-update-tr' . $active . '" id="' . esc_attr( $theme->get_stylesheet() . '-update' ) . '" data-slug="' . esc_attr( $theme->get_stylesheet() ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt"><p>';
|
echo '<tr class="plugin-update-tr' . $active . '" id="' . esc_attr( $theme->get_stylesheet() . '-update' ) . '" data-slug="' . esc_attr( $theme->get_stylesheet() ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt"><p>';
|
||||||
if ( ! current_user_can( 'update_themes' ) ) {
|
if ( ! current_user_can( 'update_themes' ) ) {
|
||||||
/* translators: 1: theme name, 2: details URL, 3: accessibility text, 4: version number */
|
/* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number */
|
||||||
printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>.'),
|
printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.'),
|
||||||
$theme['Name'],
|
$theme['Name'],
|
||||||
esc_url( $details_url ),
|
esc_url( $details_url ),
|
||||||
/* translators: 1: theme name, 2: version number */
|
sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
|
||||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme['Name'], $response['new_version'] ) ),
|
/* translators: 1: theme name, 2: version number */
|
||||||
|
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme['Name'], $response['new_version'] ) )
|
||||||
|
),
|
||||||
$response['new_version']
|
$response['new_version']
|
||||||
);
|
);
|
||||||
} elseif ( empty( $response['package'] ) ) {
|
} elseif ( empty( $response['package'] ) ) {
|
||||||
/* translators: 1: theme name, 2: details URL, 3: accessibility text, 4: version number */
|
/* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number */
|
||||||
printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ),
|
printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ),
|
||||||
$theme['Name'],
|
$theme['Name'],
|
||||||
esc_url( $details_url ),
|
esc_url( $details_url ),
|
||||||
/* translators: 1: theme name, 2: version number */
|
sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
|
||||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme['Name'], $response['new_version'] ) ),
|
/* translators: 1: theme name, 2: version number */
|
||||||
|
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme['Name'], $response['new_version'] ) )
|
||||||
|
),
|
||||||
$response['new_version']
|
$response['new_version']
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
/* translators: 1: theme name, 2: details URL, 3: accessibility text, 4: version number, 5: update URL, 6: accessibility text */
|
/* translators: 1: theme name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
|
||||||
printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="%6$s">update now</a>.' ),
|
printf( __( 'There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.' ),
|
||||||
$theme['Name'],
|
$theme['Name'],
|
||||||
esc_url( $details_url ),
|
esc_url( $details_url ),
|
||||||
/* translators: 1: theme name, 2: version number */
|
sprintf( 'class="thickbox open-plugin-details-modal" aria-label="%s"',
|
||||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme['Name'], $response['new_version'] ) ),
|
/* translators: 1: theme name, 2: version number */
|
||||||
|
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme['Name'], $response['new_version'] ) )
|
||||||
|
),
|
||||||
$response['new_version'],
|
$response['new_version'],
|
||||||
wp_nonce_url( self_admin_url( 'update.php?action=upgrade-theme&theme=' ) . $theme_key, 'upgrade-theme_' . $theme_key ),
|
wp_nonce_url( self_admin_url( 'update.php?action=upgrade-theme&theme=' ) . $theme_key, 'upgrade-theme_' . $theme_key ),
|
||||||
/* translators: %s: theme name */
|
sprintf( 'class="update-link" aria-label="%s"',
|
||||||
esc_attr( sprintf( __( 'Update %s now' ), $theme['Name'] ) )
|
/* translators: %s: theme name */
|
||||||
|
esc_attr( sprintf( __( 'Update %s now' ), $theme['Name'] ) )
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.6-beta3-38081';
|
$wp_version = '4.6-beta3-38082';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue