Changeset 31941
- Timestamp:
- 03/31/2015 06:44:46 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit.php
r31709 r31941 248 248 $bulk_messages['post'] = array( 249 249 'updated' => _n( '%s post updated.', '%s posts updated.', $bulk_counts['updated'] ), 250 'locked' => _n( '%s post not updated, somebody is editing it.', '%s posts not updated, somebody is editing them.', $bulk_counts['locked'] ), 250 'locked' => ( 1 == $bulk_counts['locked'] ) ? __( '1 post not updated, somebody is editing it.' ) : 251 _n( '%s post not updated, somebody is editing it.', '%s posts not updated, somebody is editing them.', $bulk_counts['locked'] ), 251 252 'deleted' => _n( '%s post permanently deleted.', '%s posts permanently deleted.', $bulk_counts['deleted'] ), 252 253 'trashed' => _n( '%s post moved to the Trash.', '%s posts moved to the Trash.', $bulk_counts['trashed'] ), … … 255 256 $bulk_messages['page'] = array( 256 257 'updated' => _n( '%s page updated.', '%s pages updated.', $bulk_counts['updated'] ), 257 'locked' => _n( '%s page not updated, somebody is editing it.', '%s pages not updated, somebody is editing them.', $bulk_counts['locked'] ), 258 'locked' => ( 1 == $bulk_counts['locked'] ) ? __( '1 page not updated, somebody is editing it.' ) : 259 _n( '%s page not updated, somebody is editing it.', '%s pages not updated, somebody is editing them.', $bulk_counts['locked'] ), 258 260 'deleted' => _n( '%s page permanently deleted.', '%s pages permanently deleted.', $bulk_counts['deleted'] ), 259 261 'trashed' => _n( '%s page moved to the Trash.', '%s pages moved to the Trash.', $bulk_counts['trashed'] ), -
trunk/src/wp-admin/includes/ajax-actions.php
r31897 r31941 380 380 'id' => $comment_id, 381 381 'supplemental' => array( 382 'total_items_i18n' => sprintf( _n( ' 1item', '%s items', $total ), number_format_i18n( $total ) ),382 'total_items_i18n' => sprintf( _n( '%s item', '%s items', $total ), number_format_i18n( $total ) ), 383 383 'total_pages' => ceil( $total / $per_page ), 384 384 'total_pages_i18n' => number_format_i18n( ceil( $total / $per_page ) ), -
trunk/src/wp-admin/network.php
r31200 r31941 414 414 $num_keys_salts = count( $keys_salts ); 415 415 ?> 416 <p><?php 417 echo _n( 'This unique authentication key is also missing from your <code>wp-config.php</code> file.', 'These unique authentication keys are also missing from your <code>wp-config.php</code> file.', $num_keys_salts ); ?> <?php _e( 'To make your installation more secure, you should also add:' ) ?></p> 416 <p> 417 <?php 418 if ( 1 == $num_keys_salts ) { 419 _e( 'This unique authentication key is also missing from your <code>wp-config.php</code> file.' ); 420 } else { 421 _e( 'These unique authentication keys are also missing from your <code>wp-config.php</code> file.' ); 422 } 423 ?> 424 <?php _e( 'To make your installation more secure, you should also add:' ); ?> 425 </p> 418 426 <textarea class="code" readonly="readonly" cols="100" rows="<?php echo $num_keys_salts; ?>"><?php echo esc_textarea( $keys_salts_str ); ?></textarea> 419 427 <?php -
trunk/src/wp-admin/network/themes.php
r31696 r31941 147 147 wp_enqueue_script( 'jquery' ); 148 148 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 149 $themes_to_delete = count( $themes ); 149 150 ?> 150 151 <div class="wrap"> 151 <?php 152 $themes_to_delete = count( $themes ); 153 echo '<h2>' . _n( 'Delete Theme', 'Delete Themes', $themes_to_delete ) . '</h2>'; 154 ?> 155 <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo _n( 'This theme may be active on other sites in the network.', 'These themes may be active on other sites in the network.', $themes_to_delete ); ?></p></div> 156 <p><?php echo _n( 'You are about to remove the following theme:', 'You are about to remove the following themes:', $themes_to_delete ); ?></p> 152 <?php if ( 1 == $themes_to_delete ) : ?> 153 <h2><?php _e( 'Delete Theme' ); ?></h2> 154 <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'This theme may be active on other sites in the network.' ); ?></p></div> 155 <p><?php _e( 'You are about to remove the following theme:' ); ?></p> 156 <?php else : ?> 157 <h2><?php _e( 'Delete Themes' ); ?></h2> 158 <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'These themes may be active on other sites in the network.' ); ?></p></div> 159 <p><?php _e( 'You are about to remove the following themes:' ); ?></p> 160 <?php endif; ?> 157 161 <ul class="ul-disc"> 158 162 <?php … … 163 167 ?> 164 168 </ul> 165 <p><?php _e('Are you sure you wish to delete these themes?'); ?></p> 169 <?php if ( 1 == $themes_to_delete ) : ?> 170 <p><?php _e( 'Are you sure you wish to delete this theme?' ); ?></p> 171 <?php else : ?> 172 <p><?php _e( 'Are you sure you wish to delete these themes?' ); ?></p> 173 <?php endif; ?> 166 174 <form method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" style="display:inline;"> 167 175 <input type="hidden" name="verify-delete" value="1" /> … … 171 179 echo '<input type="hidden" name="checked[]" value="' . esc_attr($theme) . '" />'; 172 180 } 181 182 wp_nonce_field( 'bulk-themes' ); 183 184 if ( 1 == $themes_to_delete ) { 185 submit_button( __( 'Yes, Delete this theme' ), 'button', 'submit', false ); 186 } else { 187 submit_button( __( 'Yes, Delete these themes' ), 'button', 'submit', false ); 188 } 173 189 ?> 174 <?php wp_nonce_field('bulk-themes') ?>175 <?php submit_button( _n( 'Yes, Delete this theme', 'Yes, Delete these themes', $themes_to_delete ), 'button', 'submit', false ); ?>176 190 </form> 177 191 <?php … … 255 269 <?php 256 270 if ( isset( $_GET['enabled'] ) ) { 257 $_GET['enabled'] = absint( $_GET['enabled'] ); 258 echo '<div id="message" class="updated"><p>' . sprintf( _n( 'Theme enabled.', '%s themes enabled.', $_GET['enabled'] ), number_format_i18n( $_GET['enabled'] ) ) . '</p></div>'; 271 $enabled = absint( $_GET['enabled'] ); 272 if ( 1 == $enabled ) { 273 $message = __( 'Theme enabled.' ); 274 } else { 275 $message = _n( '%s theme enabled.', '%s themes enabled.', $enabled ); 276 } 277 echo '<div id="message" class="updated"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>'; 259 278 } elseif ( isset( $_GET['disabled'] ) ) { 260 $_GET['disabled'] = absint( $_GET['disabled'] ); 261 echo '<div id="message" class="updated"><p>' . sprintf( _n( 'Theme disabled.', '%s themes disabled.', $_GET['disabled'] ), number_format_i18n( $_GET['disabled'] ) ) . '</p></div>'; 279 $disabled = absint( $_GET['disabled'] ); 280 if ( 1 == $disabled ) { 281 $message = __( 'Theme disabled.' ); 282 } else { 283 $message = _n( '%s theme disabled.', '%s themes disabled.', $disabled ); 284 } 285 echo '<div id="message" class="updated"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>'; 262 286 } elseif ( isset( $_GET['deleted'] ) ) { 263 $_GET['deleted'] = absint( $_GET['deleted'] ); 264 echo '<div id="message" class="updated"><p>' . sprintf( _nx( 'Theme deleted.', '%s themes deleted.', $_GET['deleted'], 'network' ), number_format_i18n( $_GET['deleted'] ) ) . '</p></div>'; 287 $deleted = absint( $_GET['deleted'] ); 288 if ( 1 == $deleted ) { 289 $message = __( 'Theme deleted.' ); 290 } else { 291 $message = _n( '%s theme deleted.', '%s themes deleted.', $deleted ); 292 } 293 echo '<div id="message" class="updated"><p>' . sprintf( $message, number_format_i18n( $deleted ) ) . '</p></div>'; 265 294 } elseif ( isset( $_GET['error'] ) && 'none' == $_GET['error'] ) { 266 295 echo '<div id="message" class="error"><p>' . __( 'No theme selected.' ) . '</p></div>'; -
trunk/src/wp-admin/network/users.php
r31696 r31941 25 25 <h2><?php esc_html_e( 'Users' ); ?></h2> 26 26 27 <?php if ( count( $users ) > 1 ) : ?> 27 <?php if ( 1 == count( $users ) ) : ?> 28 <p><?php _e( 'You have chosen to delete the user from all networks and sites.' ); ?></p> 29 <?php else : ?> 28 30 <p><?php _e( 'You have chosen to delete the following users from all networks and sites.' ); ?></p> 29 <?php else : ?>30 <p><?php _e( 'You have chosen to delete the user from all networks and sites.' ); ?></p>31 31 <?php endif; ?> 32 32 … … 104 104 do_action( 'delete_user_form', $current_user ); 105 105 106 if ( count( $users ) > 1 ) : ?> 106 if ( 1 == count( $users ) ) : ?> 107 <p><?php _e( 'Once you hit “Confirm Deletion”, the user will be permanently removed.' ); ?></p> 108 <?php else : ?> 107 109 <p><?php _e( 'Once you hit “Confirm Deletion”, these users will be permanently removed.' ); ?></p> 108 <?php else : ?>109 <p><?php _e( 'Once you hit “Confirm Deletion”, the user will be permanently removed.' ); ?></p>110 110 <?php endif; 111 111 -
trunk/src/wp-admin/plugins.php
r31811 r31941 284 284 } 285 285 $plugins_to_delete = count( $plugin_info ); 286 echo '<h2>' . _n( 'Delete Plugin', 'Delete Plugins', $plugins_to_delete ) . '</h2>';287 286 ?> 288 <?php if ( $have_non_network_plugins && is_network_admin() ) : ?> 289 <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo _n( 'This plugin may be active on other sites in the network.', 'These plugins may be active on other sites in the network.', $plugins_to_delete ); ?></p></div> 287 <?php if ( 1 == $plugins_to_delete ) : ?> 288 <h2><?php _e( 'Delete Plugin' ); ?></h2> 289 <?php if ( $have_non_network_plugins && is_network_admin() ) : ?> 290 <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'This plugin may be active on other sites in the network.' ); ?></p></div> 291 <?php endif; ?> 292 <p><?php _e( 'You are about to remove the following plugin:' ); ?></p> 293 <?php else: ?> 294 <h2><?php _e( 'Delete Plugins' ); ?></h2> 295 <?php if ( $have_non_network_plugins && is_network_admin() ) : ?> 296 <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'These plugins may be active on other sites in the network.' ); ?></p></div> 297 <?php endif; ?> 298 <p><?php _e( 'You are about to remove the following plugins:' ); ?></p> 290 299 <?php endif; ?> 291 <p><?php echo _n( 'You are about to remove the following plugin:', 'You are about to remove the following plugins:', $plugins_to_delete ); ?></p>292 300 <ul class="ul-disc"> 293 301 <?php -
trunk/src/wp-admin/upload.php
r31696 r31941 220 220 $message = ''; 221 221 if ( ! empty( $_GET['posted'] ) ) { 222 $message = __( 'Media attachment updated.');222 $message = __( 'Media attachment updated.' ); 223 223 $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']); 224 224 } 225 225 226 226 if ( ! empty( $_GET['attached'] ) && $attached = absint( $_GET['attached'] ) ) { 227 $message = sprintf( _n( 'Reattached %d attachment.', 'Reattached %d attachments.', $attached), $attached );227 $message = sprintf( _n( 'Reattached %d attachment.', 'Reattached %d attachments.', $attached ), $attached ); 228 228 $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detach', 'attached' ), $_SERVER['REQUEST_URI'] ); 229 229 } … … 235 235 236 236 if ( ! empty( $_GET['deleted'] ) && $deleted = absint( $_GET['deleted'] ) ) { 237 $message = sprintf( _n( 'Media attachment permanently deleted.', '%d media attachments permanently deleted.', $deleted ), number_format_i18n( $_GET['deleted'] ) ); 237 if ( 1 == $deleted ) { 238 $message = __( 'Media attachment permanently deleted.' ); 239 } else { 240 $message = _n( '%d media attachment permanently deleted.', '%d media attachments permanently deleted.', $deleted ); 241 } 242 $message = sprintf( $message, number_format_i18n( $deleted ) ); 238 243 $_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']); 239 244 } 240 245 241 246 if ( ! empty( $_GET['trashed'] ) && $trashed = absint( $_GET['trashed'] ) ) { 242 $message = sprintf( _n( 'Media attachment moved to the trash.', '%d media attachments moved to the trash.', $trashed ), number_format_i18n( $_GET['trashed'] ) ); 247 if ( 1 == $trashed ) { 248 $message = __( 'Media attachment moved to the trash.' ); 249 } else { 250 $message = _n( '%d media attachment moved to the trash.', '%d media attachments moved to the trash.', $trashed ); 251 } 252 $message = sprintf( $message, number_format_i18n( $trashed ) ); 243 253 $message .= ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) ) . '">' . __('Undo') . '</a>'; 244 254 $_SERVER['REQUEST_URI'] = remove_query_arg(array('trashed'), $_SERVER['REQUEST_URI']); … … 246 256 247 257 if ( ! empty( $_GET['untrashed'] ) && $untrashed = absint( $_GET['untrashed'] ) ) { 248 $message = sprintf( _n( 'Media attachment restored from the trash.', '%d media attachments restored from the trash.', $untrashed ), number_format_i18n( $_GET['untrashed'] ) ); 258 if ( 1 == $untrashed ) { 259 $message = __( 'Media attachment restored from the trash.' ); 260 } else { 261 $message = _n( '%d media attachment restored from the trash.', '%d media attachments restored from the trash.', $untrashed ); 262 } 263 $message = sprintf( $message, number_format_i18n( $untrashed ) ); 249 264 $_SERVER['REQUEST_URI'] = remove_query_arg(array('untrashed'), $_SERVER['REQUEST_URI']); 250 265 } -
trunk/src/wp-admin/users.php
r31696 r31941 217 217 <h2><?php _e('Delete Users'); ?></h2> 218 218 <?php if ( isset( $_REQUEST['error'] ) ) : ?> 219 <div class="error">220 <p><strong><?php _e( 'ERROR:' ); ?></strong> <?php _e( 'Please select an option.' ); ?></p>221 </div>219 <div class="error"> 220 <p><strong><?php _e( 'ERROR:' ); ?></strong> <?php _e( 'Please select an option.' ); ?></p> 221 </div> 222 222 <?php endif; ?> 223 <p><?php echo _n( 'You have specified this user for deletion:', 'You have specified these users for deletion:', count( $userids ) ); ?></p> 223 224 <?php if ( 1 == count( $userids ) ) : ?> 225 <p><?php _e( 'You have specified this user for deletion:' ); ?></p> 226 <?php else : ?> 227 <p><?php _e( 'You have specified these users for deletion:' ); ?></p> 228 <?php endif; ?> 229 224 230 <ul> 225 231 <?php … … 237 243 </ul> 238 244 <?php if ( $go_delete ) : ?> 239 <fieldset><p><legend><?php echo _n( 'What should be done with content owned by this user?', 'What should be done with content owned by these users?', $go_delete ); ?></legend></p> 245 <?php if ( 1 == $go_delete ) : ?> 246 <fieldset><p><legend><?php _e( 'What should be done with content owned by this user?' ); ?></legend></p> 247 <?php else : ?> 248 <fieldset><p><legend><?php _e( 'What should be done with content owned by these users?' ); ?></legend></p> 249 <?php endif; ?> 240 250 <ul style="list-style:none;"> 241 251 <li><label><input type="radio" id="delete_option0" name="delete_option" value="delete" /> … … 380 390 case 'del_many': 381 391 $delete_count = isset($_GET['delete_count']) ? (int) $_GET['delete_count'] : 0; 382 $messages[] = '<div id="message" class="updated"><p>' . sprintf( _n( 'User deleted.', '%s users deleted.', $delete_count ), number_format_i18n( $delete_count ) ) . '</p></div>'; 392 if ( 1 == $delete_count ) { 393 $message = __( 'User deleted.' ); 394 } else { 395 $message = _n( '%s user deleted.', '%s users deleted.', $delete_count ); 396 } 397 $messages[] = '<div id="message" class="updated"><p>' . sprintf( $message, number_format_i18n( $delete_count ) ) . '</p></div>'; 383 398 break; 384 399 case 'add': -
trunk/src/wp-includes/class-wp-customize-manager.php
r31698 r31941 1352 1352 $num_locations = count( array_keys( $locations ) ); 1353 1353 1354 if ( 1 == $num_locations ) { 1355 $description = __( 'Your theme supports one menu. Select which menu you would like to use.' ); 1356 } else { 1357 $description = sprintf( _n( 'Your theme supports %s menu. Select which menu appears in each location.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ); 1358 } 1359 1354 1360 $this->add_section( 'nav', array( 1355 1361 'title' => __( 'Navigation' ), 1356 1362 'theme_supports' => 'menus', 1357 1363 'priority' => 100, 1358 'description' => sprintf( _n('Your theme supports %s menu. Select which menu you would like to use.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . "\n\n" . __('You can edit your menu content on the Menus screen in the Appearance section.'),1364 'description' => $description . "\n\n" . __( 'You can edit your menu content on the Menus screen in the Appearance section.' ), 1359 1365 ) ); 1360 1366 -
trunk/src/wp-includes/theme-compat/comments.php
r30754 r31941 24 24 25 25 <?php if ( have_comments() ) : ?> 26 <h3 id="comments"><?php printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number() ), 27 number_format_i18n( get_comments_number() ), '“' . get_the_title() . '”' ); ?></h3> 26 <h3 id="comments"> 27 <?php 28 if ( 1 == get_comments_number() ) { 29 printf( 'One Response to %2$s', '“' . get_the_title() . '”' ); 30 } else { 31 printf( _n( '%1$s Response to %2$s', '%1$s Responses to %2$s', get_comments_number() ), 32 number_format_i18n( get_comments_number() ), '“' . get_the_title() . '”' ); 33 } 34 ?> 35 </h3> 28 36 29 37 <div class="navigation">
Note: See TracChangeset
for help on using the changeset viewer.