Decouple strings where the singular and plural form are not just the same string with different numbers, but essentially two different strings.
This allows for using proper plural forms in languages with more than two forms, and also resolves string conflicts when the same string is present in both singular and plural form. fixes #28502. Built from https://develop.svn.wordpress.org/trunk@31941 git-svn-id: http://core.svn.wordpress.org/trunk@31920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -219,12 +219,12 @@ if ( ! empty( $_REQUEST['s'] ) )
|
||||
<?php
|
||||
$message = '';
|
||||
if ( ! empty( $_GET['posted'] ) ) {
|
||||
$message = __('Media attachment updated.');
|
||||
$message = __( 'Media attachment updated.' );
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
|
||||
if ( ! empty( $_GET['attached'] ) && $attached = absint( $_GET['attached'] ) ) {
|
||||
$message = sprintf( _n('Reattached %d attachment.', 'Reattached %d attachments.', $attached), $attached );
|
||||
$message = sprintf( _n( 'Reattached %d attachment.', 'Reattached %d attachments.', $attached ), $attached );
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detach', 'attached' ), $_SERVER['REQUEST_URI'] );
|
||||
}
|
||||
|
||||
@@ -234,18 +234,33 @@ if ( ! empty( $_GET['detach'] ) && $detached = absint( $_GET['detach'] ) ) {
|
||||
}
|
||||
|
||||
if ( ! empty( $_GET['deleted'] ) && $deleted = absint( $_GET['deleted'] ) ) {
|
||||
$message = sprintf( _n( 'Media attachment permanently deleted.', '%d media attachments permanently deleted.', $deleted ), number_format_i18n( $_GET['deleted'] ) );
|
||||
if ( 1 == $deleted ) {
|
||||
$message = __( 'Media attachment permanently deleted.' );
|
||||
} else {
|
||||
$message = _n( '%d media attachment permanently deleted.', '%d media attachments permanently deleted.', $deleted );
|
||||
}
|
||||
$message = sprintf( $message, number_format_i18n( $deleted ) );
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
|
||||
if ( ! empty( $_GET['trashed'] ) && $trashed = absint( $_GET['trashed'] ) ) {
|
||||
$message = sprintf( _n( 'Media attachment moved to the trash.', '%d media attachments moved to the trash.', $trashed ), number_format_i18n( $_GET['trashed'] ) );
|
||||
if ( 1 == $trashed ) {
|
||||
$message = __( 'Media attachment moved to the trash.' );
|
||||
} else {
|
||||
$message = _n( '%d media attachment moved to the trash.', '%d media attachments moved to the trash.', $trashed );
|
||||
}
|
||||
$message = sprintf( $message, number_format_i18n( $trashed ) );
|
||||
$message .= ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) ) . '">' . __('Undo') . '</a>';
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg(array('trashed'), $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
|
||||
if ( ! empty( $_GET['untrashed'] ) && $untrashed = absint( $_GET['untrashed'] ) ) {
|
||||
$message = sprintf( _n( 'Media attachment restored from the trash.', '%d media attachments restored from the trash.', $untrashed ), number_format_i18n( $_GET['untrashed'] ) );
|
||||
if ( 1 == $untrashed ) {
|
||||
$message = __( 'Media attachment restored from the trash.' );
|
||||
} else {
|
||||
$message = _n( '%d media attachment restored from the trash.', '%d media attachments restored from the trash.', $untrashed );
|
||||
}
|
||||
$message = sprintf( $message, number_format_i18n( $untrashed ) );
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg(array('untrashed'), $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user