mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +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:
@@ -24,7 +24,19 @@ if ( current_user_can( 'update_core' ) ) {
|
||||
|
||||
$update_data = wp_get_update_data();
|
||||
if ( $update_data['counts']['total'] ) {
|
||||
$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 available 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',
|
||||
);
|
||||
} else {
|
||||
$submenu['index.php'][10] = array( __( 'Updates' ), $cap, 'update-core.php' );
|
||||
}
|
||||
@@ -45,7 +57,23 @@ $submenu['users.php'][5] = array( __( 'All Users' ), 'manage_network_users', 'u
|
||||
$submenu['users.php'][10] = array( _x( 'Add New', 'user' ), 'create_users', 'user-new.php' );
|
||||
|
||||
if ( current_user_can( 'update_themes' ) && $update_data['counts']['themes'] ) {
|
||||
$menu[15] = array( sprintf( __( 'Themes %s' ), "<span class='update-plugins count-{$update_data['counts']['themes']}'><span class='theme-count'>" . number_format_i18n( $update_data['counts']['themes'] ) . '</span></span>' ), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
|
||||
$menu[15] = array(
|
||||
sprintf(
|
||||
/* translators: %s: number of available theme updates */
|
||||
__( 'Themes %s' ),
|
||||
sprintf(
|
||||
'<span class="update-plugins count-%s"><span class="theme-count">%s</span></span>',
|
||||
$update_data['counts']['themes'],
|
||||
number_format_i18n( $update_data['counts']['themes'] )
|
||||
)
|
||||
),
|
||||
'manage_network_themes',
|
||||
'themes.php',
|
||||
'',
|
||||
'menu-top menu-icon-appearance',
|
||||
'menu-appearance',
|
||||
'dashicons-admin-appearance',
|
||||
);
|
||||
} else {
|
||||
$menu[15] = array( __( 'Themes' ), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
|
||||
}
|
||||
@@ -54,7 +82,23 @@ $submenu['themes.php'][10] = array( _x( 'Add New', 'theme' ), 'install_themes',
|
||||
$submenu['themes.php'][15] = array( __( 'Theme Editor' ), 'edit_themes', 'theme-editor.php' );
|
||||
|
||||
if ( current_user_can( 'update_plugins' ) && $update_data['counts']['plugins'] ) {
|
||||
$menu[20] = array( sprintf( __( 'Plugins %s' ), "<span class='update-plugins count-{$update_data['counts']['plugins']}'><span class='plugin-count'>" . number_format_i18n( $update_data['counts']['plugins'] ) . '</span></span>' ), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins' );
|
||||
$menu[20] = array(
|
||||
sprintf(
|
||||
/* translators: %s: number of available plugin updates */
|
||||
__( 'Plugins %s' ),
|
||||
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'] )
|
||||
)
|
||||
),
|
||||
'manage_network_plugins',
|
||||
'plugins.php',
|
||||
'',
|
||||
'menu-top menu-icon-plugins',
|
||||
'menu-plugins',
|
||||
'dashicons-admin-plugins',
|
||||
);
|
||||
} else {
|
||||
$menu[20] = array( __( 'Plugins' ), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins' );
|
||||
}
|
||||
|
||||
@@ -207,8 +207,8 @@ if ( isset( $_GET['updated'] ) ) {
|
||||
<?php
|
||||
if ( is_subdomain_install() ) {
|
||||
echo '<p class="description">';
|
||||
/* translators: 1: NOBLOGREDIRECT, 2: wp-config.php */
|
||||
printf(
|
||||
/* translators: 1: NOBLOGREDIRECT, 2: wp-config.php */
|
||||
__( 'If registration is disabled, please set %1$s in %2$s to a URL you will redirect visitors to if they visit a non-existent site.' ),
|
||||
'<code>NOBLOGREDIRECT</code>',
|
||||
'<code>wp-config.php</code>'
|
||||
@@ -362,7 +362,15 @@ if ( isset( $_GET['updated'] ) ) {
|
||||
<tr>
|
||||
<th scope="row"><?php _e( 'Site upload space' ); ?></th>
|
||||
<td>
|
||||
<label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( (bool) get_site_option( 'upload_space_check_disabled' ), false ); ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" aria-describedby="blog-upload-space-desc" value="' . esc_attr( get_site_option( 'blog_upload_space', 100 ) ) . '" />' ); ?></label><br />
|
||||
<label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( (bool) get_site_option( 'upload_space_check_disabled' ), false ); ?>/>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: number of megabytes to limit uploads to */
|
||||
__( 'Limit total size of files uploaded to %s MB' ),
|
||||
'</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" aria-describedby="blog-upload-space-desc" value="' . esc_attr( get_site_option( 'blog_upload_space', 100 ) ) . '" />'
|
||||
);
|
||||
?>
|
||||
</label><br />
|
||||
<p class="screen-reader-text" id="blog-upload-space-desc">
|
||||
<?php _e( 'Size in megabytes' ); ?>
|
||||
</p>
|
||||
|
||||
@@ -54,8 +54,8 @@ if ( isset( $_REQUEST['action'] ) && 'add-site' == $_REQUEST['action'] ) {
|
||||
|
||||
if ( in_array( $domain, $subdirectory_reserved_names ) ) {
|
||||
wp_die(
|
||||
/* translators: %s: reserved names list */
|
||||
sprintf(
|
||||
/* translators: %s: reserved names list */
|
||||
__( 'The following words are reserved for use by WordPress functions and cannot be used as blog names: %s' ),
|
||||
'<code>' . implode( '</code>, <code>', $subdirectory_reserved_names ) . '</code>'
|
||||
)
|
||||
@@ -147,12 +147,12 @@ if ( isset( $_REQUEST['action'] ) && 'add-site' == $_REQUEST['action'] ) {
|
||||
wp_mail(
|
||||
get_site_option( 'admin_email' ),
|
||||
sprintf(
|
||||
/* translators: %s: network name */
|
||||
/* translators: New site notification email subject. %s: Network name */
|
||||
__( '[%s] New Site Created' ),
|
||||
get_network()->site_name
|
||||
),
|
||||
sprintf(
|
||||
/* translators: 1: user login, 2: site url, 3: site name/title */
|
||||
/* translators: New site notification email. 1: User login, 2: Site URL, 3: Site title */
|
||||
__(
|
||||
'New site created by %1$s
|
||||
|
||||
|
||||
@@ -191,6 +191,7 @@ if ( isset( $_GET['enabled'] ) ) {
|
||||
if ( 1 == $enabled ) {
|
||||
$message = __( 'Theme enabled.' );
|
||||
} else {
|
||||
/* translators: %s: number of themes */
|
||||
$message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
|
||||
}
|
||||
echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
|
||||
@@ -199,6 +200,7 @@ if ( isset( $_GET['enabled'] ) ) {
|
||||
if ( 1 == $disabled ) {
|
||||
$message = __( 'Theme disabled.' );
|
||||
} else {
|
||||
/* translators: %s: number of themes */
|
||||
$message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
|
||||
}
|
||||
echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
|
||||
|
||||
@@ -61,14 +61,23 @@ if ( isset( $_GET['action'] ) ) {
|
||||
|
||||
// A list of valid actions and their associated messaging for confirmation output.
|
||||
$manage_actions = array(
|
||||
/* translators: %s: Site URL */
|
||||
'activateblog' => __( 'You are about to activate the site %s.' ),
|
||||
/* translators: %s: Site URL */
|
||||
'deactivateblog' => __( 'You are about to deactivate the site %s.' ),
|
||||
/* translators: %s: Site URL */
|
||||
'unarchiveblog' => __( 'You are about to unarchive the site %s.' ),
|
||||
/* translators: %s: Site URL */
|
||||
'archiveblog' => __( 'You are about to archive the site %s.' ),
|
||||
/* translators: %s: Site URL */
|
||||
'unspamblog' => __( 'You are about to unspam the site %s.' ),
|
||||
/* translators: %s: Site URL */
|
||||
'spamblog' => __( 'You are about to mark the site %s as spam.' ),
|
||||
/* translators: %s: Site URL */
|
||||
'deleteblog' => __( 'You are about to delete the site %s.' ),
|
||||
/* translators: %s: Site URL */
|
||||
'unmatureblog' => __( 'You are about to mark the site %s as mature.' ),
|
||||
/* translators: %s: Site URL */
|
||||
'matureblog' => __( 'You are about to mark the site %s as not mature.' ),
|
||||
);
|
||||
|
||||
@@ -152,7 +161,14 @@ if ( isset( $_GET['action'] ) ) {
|
||||
$site = get_site( $site_id );
|
||||
$site_address = untrailingslashit( $site->domain . $site->path );
|
||||
|
||||
wp_die( sprintf( __( 'Sorry, you are not allowed to delete the site %s.' ), $site_address ), 403 );
|
||||
wp_die(
|
||||
sprintf(
|
||||
/* translators: %s: Site URL */
|
||||
__( 'Sorry, you are not allowed to delete the site %s.' ),
|
||||
$site_address
|
||||
),
|
||||
403
|
||||
);
|
||||
}
|
||||
|
||||
$updated_action = 'all_delete';
|
||||
|
||||
@@ -287,6 +287,7 @@ if ( isset( $_GET['enabled'] ) ) {
|
||||
if ( 1 == $enabled ) {
|
||||
$message = __( 'Theme enabled.' );
|
||||
} else {
|
||||
/* translators: %s: number of themes */
|
||||
$message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
|
||||
}
|
||||
echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
|
||||
@@ -295,6 +296,7 @@ if ( isset( $_GET['enabled'] ) ) {
|
||||
if ( 1 == $disabled ) {
|
||||
$message = __( 'Theme disabled.' );
|
||||
} else {
|
||||
/* translators: %s: number of themes */
|
||||
$message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
|
||||
}
|
||||
echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
|
||||
@@ -303,6 +305,7 @@ if ( isset( $_GET['enabled'] ) ) {
|
||||
if ( 1 == $deleted ) {
|
||||
$message = __( 'Theme deleted.' );
|
||||
} else {
|
||||
/* translators: %s: number of themes */
|
||||
$message = _n( '%s theme deleted.', '%s themes deleted.', $deleted );
|
||||
}
|
||||
echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $deleted ) ) . '</p></div>';
|
||||
|
||||
@@ -89,11 +89,7 @@ if ( isset( $_GET['update'] ) ) {
|
||||
$message = __( 'User added.' );
|
||||
|
||||
if ( $edit_link ) {
|
||||
$message .= sprintf(
|
||||
' <a href="%s">%s</a>',
|
||||
$edit_link,
|
||||
__( 'Edit user' )
|
||||
);
|
||||
$message .= sprintf( ' <a href="%s">%s</a>', $edit_link, __( 'Edit user' ) );
|
||||
}
|
||||
|
||||
$messages[] = $message;
|
||||
|
||||
@@ -71,7 +71,13 @@ if ( isset( $_GET['action'] ) ) {
|
||||
case 'spam':
|
||||
$user = get_userdata( $user_id );
|
||||
if ( is_super_admin( $user->ID ) ) {
|
||||
wp_die( sprintf( __( 'Warning! User cannot be modified. The user %s is a network administrator.' ), esc_html( $user->user_login ) ) );
|
||||
wp_die(
|
||||
sprintf(
|
||||
/* translators: %s: user login */
|
||||
__( 'Warning! User cannot be modified. The user %s is a network administrator.' ),
|
||||
esc_html( $user->user_login )
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$userfunction = 'all_spam';
|
||||
|
||||
Reference in New Issue
Block a user