mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
I18N: Improve translator comments.
* Add missing translator comments. * Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments. Includes minor code layout fixes. Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders! Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov. Fixes #44360. git-svn-id: https://develop.svn.wordpress.org/trunk@45926 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -42,8 +42,19 @@ if ( ! is_multisite() ) {
|
||||
} else {
|
||||
$cap = 'update_languages';
|
||||
}
|
||||
/* translators: %s: number of pending updates */
|
||||
$submenu['index.php'][10] = array( sprintf( __( 'Updates %s' ), "<span class='update-plugins count-{$update_data['counts']['total']}'><span class='update-count'>" . number_format_i18n( $update_data['counts']['total'] ) . '</span></span>' ), $cap, 'update-core.php' );
|
||||
$submenu['index.php'][10] = array(
|
||||
sprintf(
|
||||
/* translators: %s: number of pending updates */
|
||||
__( 'Updates %s' ),
|
||||
sprintf(
|
||||
'<span class="update-plugins count-%s"><span class="update-count">%s</span></span>',
|
||||
$update_data['counts']['total'],
|
||||
number_format_i18n( $update_data['counts']['total'] )
|
||||
)
|
||||
),
|
||||
$cap,
|
||||
'update-core.php',
|
||||
);
|
||||
unset( $cap );
|
||||
}
|
||||
|
||||
@@ -78,11 +89,11 @@ if ( current_user_can( 'edit_posts' ) ) {
|
||||
$awaiting_mod = wp_count_comments();
|
||||
$awaiting_mod = $awaiting_mod->moderated;
|
||||
$awaiting_mod_i18n = number_format_i18n( $awaiting_mod );
|
||||
/* translators: %s: number of comments in moderation */
|
||||
/* translators: %s: number of comments */
|
||||
$awaiting_mod_text = sprintf( _n( '%s Comment in moderation', '%s Comments in moderation', $awaiting_mod ), $awaiting_mod_i18n );
|
||||
|
||||
$menu[25] = array(
|
||||
/* translators: %s: number of comments in moderation */
|
||||
/* translators: %s: number of comments */
|
||||
sprintf( __( 'Comments %s' ), '<span class="awaiting-mod count-' . absint( $awaiting_mod ) . '"><span class="pending-count" aria-hidden="true">' . $awaiting_mod_i18n . '</span><span class="comments-in-moderation-text screen-reader-text">' . $awaiting_mod_text . '</span></span>' ),
|
||||
'edit_posts',
|
||||
'edit-comments.php',
|
||||
@@ -217,7 +228,11 @@ if ( ! is_multisite() && current_user_can( 'update_plugins' ) ) {
|
||||
if ( ! isset( $update_data ) ) {
|
||||
$update_data = wp_get_update_data();
|
||||
}
|
||||
$count = "<span class='update-plugins count-{$update_data['counts']['plugins']}'><span class='plugin-count'>" . number_format_i18n( $update_data['counts']['plugins'] ) . '</span></span>';
|
||||
$count = sprintf(
|
||||
'<span class="update-plugins count-%s"><span class="plugin-count">%s</span></span>',
|
||||
$update_data['counts']['plugins'],
|
||||
number_format_i18n( $update_data['counts']['plugins'] )
|
||||
);
|
||||
}
|
||||
|
||||
/* translators: %s: number of pending plugin updates */
|
||||
|
||||
Reference in New Issue
Block a user