I18N: Merge similar strings about allowed space allocation in Multisite.

Props ramiy, Jonathandejong, pento.
Fixes #42223.
Built from https://develop.svn.wordpress.org/trunk@45082


git-svn-id: http://core.svn.wordpress.org/trunk@44891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-04-01 12:24:51 +00:00
parent 76e6cc67c2
commit 2f5b5baa07
5 changed files with 33 additions and 13 deletions

View File

@ -2898,7 +2898,11 @@ function media_upload_max_image_resize() {
* @since 3.5.0
*/
function multisite_over_quota_message() {
echo '<p>' . sprintf( __( 'Sorry, you have used all of your storage quota of %s MB.' ), get_space_allowed() ) . '</p>';
echo '<p>' . sprintf(
/* translators: %s: allowed space allocation */
__( 'Sorry, you have used your space allocation of %s. Please delete some files to upload more files.' ),
size_format( get_space_allowed() * MB_IN_BYTES )
) . '</p>';
}
/**

View File

@ -16,7 +16,7 @@
* @deprecated 3.0.0
*/
function wpmu_menu() {
_deprecated_function(__FUNCTION__, '3.0.0' );
_deprecated_function( __FUNCTION__, '3.0.0' );
// Deprecated. See #11763.
}
@ -27,10 +27,15 @@ function wpmu_menu() {
* @see is_upload_space_available()
*/
function wpmu_checkAvailableSpace() {
_deprecated_function(__FUNCTION__, '3.0.0', 'is_upload_space_available()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'is_upload_space_available()' );
if ( !is_upload_space_available() )
wp_die( __('Sorry, you must delete files before you can upload any more.') );
if ( ! is_upload_space_available() ) {
wp_die( sprintf(
/* translators: %s: allowed space allocation */
__( 'Sorry, you have used your space allocation of %s. Please delete some files to upload more files.' ),
size_format( get_space_allowed() * MB_IN_BYTES )
) );
}
}
/**
@ -39,7 +44,7 @@ function wpmu_checkAvailableSpace() {
* @deprecated 3.0.0
*/
function mu_options( $options ) {
_deprecated_function(__FUNCTION__, '3.0.0' );
_deprecated_function( __FUNCTION__, '3.0.0' );
return $options;
}
@ -50,7 +55,7 @@ function mu_options( $options ) {
* @see activate_plugin()
*/
function activate_sitewide_plugin() {
_deprecated_function(__FUNCTION__, '3.0.0', 'activate_plugin()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'activate_plugin()' );
return false;
}
@ -61,7 +66,7 @@ function activate_sitewide_plugin() {
* @see deactivate_plugin()
*/
function deactivate_sitewide_plugin( $plugin = false ) {
_deprecated_function(__FUNCTION__, '3.0.0', 'deactivate_plugin()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'deactivate_plugin()' );
}
/**
@ -71,7 +76,7 @@ function deactivate_sitewide_plugin( $plugin = false ) {
* @see is_network_only_plugin()
*/
function is_wpmu_sitewide_plugin( $file ) {
_deprecated_function(__FUNCTION__, '3.0.0', 'is_network_only_plugin()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'is_network_only_plugin()' );
return is_network_only_plugin( $file );
}

View File

@ -226,7 +226,11 @@ function upload_is_user_over_quota( $echo = true ) {
if ( ( $space_allowed - $space_used ) < 0 ) {
if ( $echo ) {
_e( 'Sorry, you have used your space allocation. Please delete some files to upload more files.' );
printf(
/* translators: %s: allowed space allocation */
__( 'Sorry, you have used your space allocation of %s. Please delete some files to upload more files.' ),
size_format( $space_allowed * MB_IN_BYTES )
);
}
return true;
} else {
@ -1002,7 +1006,7 @@ function confirm_delete_users( $users ) {
endif;
submit_button( __( 'Confirm Deletion' ), 'primary' );
?>
?>
</form>
<?php
return true;

View File

@ -6234,7 +6234,14 @@ class wp_xmlrpc_server extends IXR_Server {
}
if ( is_multisite() && upload_is_user_over_quota( false ) ) {
$this->error = new IXR_Error( 401, __( 'Sorry, you have used your space allocation.' ) );
$this->error = new IXR_Error(
401,
sprintf(
/* translators: %s: allowed space allocation */
__( 'Sorry, you have used your space allocation of %s. Please delete some files to upload more files.' ),
size_format( get_space_allowed() * MB_IN_BYTES )
)
);
return $this->error;
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-beta1-45081';
$wp_version = '5.2-beta1-45082';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.