WordPress.org

Make WordPress Core

Changeset 47043


Ignore:
Timestamp:
01/06/2020 04:14:30 PM (18 months ago)
Author:
SergeyBiryukov
Message:

I18N: Replace php.ini, post_max_size, and upload_max_filesize with placeholders in "File is empty" error message.

Props ramiy.
Fixes #48868.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/file.php

    r46696 r47043  
    805805            $error_msg = __( 'File is empty. Please upload something more substantial.' );
    806806        } else {
    807             $error_msg = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' );
     807            $error_msg = sprintf(
     808                /* translators: 1: php.ini, 2: post_max_size, 3: upload_max_filesize */
     809                __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your %1$s file or by %2$s being defined as smaller than %3$s in %1$s.' ),
     810                'php.ini',
     811                'post_max_size',
     812                'upload_max_filesize'
     813            );
    808814        }
    809815        return call_user_func_array( $upload_error_handler, array( &$file, $error_msg ) );
  • trunk/src/wp-admin/includes/import.php

    r44785 r47043  
    8383    if ( ! isset( $_FILES['import'] ) ) {
    8484        return array(
    85             'error' => __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' ),
     85            'error' => sprintf(
     86                /* translators: 1: php.ini, 2: post_max_size, 3: upload_max_filesize */
     87                __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your %1$s file or by %2$s being defined as smaller than %3$s in %1$s.' ),
     88                'php.ini',
     89                'post_max_size',
     90                'upload_max_filesize'
     91            ),
    8692        );
    8793    }
Note: See TracChangeset for help on using the changeset viewer.