Make WordPress Core


Ignore:
Timestamp:
01/21/2010 09:37:43 PM (16 years ago)
Author:
ryan
Message:

i18n fixes. Props nbachiyski. fixes #11954

File:
1 edited

Legend:

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

    r12752 r12789  
    453453    //WARNING: The file is not automatically deleted, The script must unlink() the file.
    454454    if ( ! $url )
    455         return new WP_Error('http_no_url', __('Invalid URL Provided'));
     455        return new WP_Error('http_no_url', __('Invalid URL Provided.'));
    456456
    457457    $tmpfname = wp_tempnam($url);
    458458    if ( ! $tmpfname )
    459         return new WP_Error('http_no_file', __('Could not create Temporary file'));
     459        return new WP_Error('http_no_file', __('Could not create Temporary file.'));
    460460
    461461    $handle = @fopen($tmpfname, 'wb');
    462462    if ( ! $handle )
    463         return new WP_Error('http_no_file', __('Could not create Temporary file'));
     463        return new WP_Error('http_no_file', __('Could not create Temporary file.'));
    464464
    465465    $response = wp_remote_get($url, array('timeout' => 300));
     
    513513    // Is the archive valid?
    514514    if ( false == ($archive_files = $archive->extract(PCLZIP_OPT_EXTRACT_AS_STRING)) )
    515         return new WP_Error('incompatible_archive', __('Incompatible archive'), $archive->errorInfo(true));
     515        return new WP_Error('incompatible_archive', __('Incompatible Archive.'), $archive->errorInfo(true));
    516516
    517517    if ( 0 == count($archive_files) )
    518         return new WP_Error('empty_archive', __('Empty archive'));
     518        return new WP_Error('empty_archive', __('Empty archive.'));
    519519
    520520    $path = explode('/', untrailingslashit($to));
     
    525525                $tmppath = implode('/', array_slice($path, 0, $i) );
    526526                if ( ! $fs->mkdir($tmppath, FS_CHMOD_DIR) )
    527                     return new WP_Error('mkdir_failed', __('Could not create directory'), $tmppath);
     527                    return new WP_Error('mkdir_failed', __('Could not create directory.'), $tmppath);
    528528            }
    529529            break; //Exit main for loop
     
    543543                    $tmppath = $to . implode('/', array_slice($path, 0, $i) );
    544544                    if ( ! $fs->is_dir($tmppath) && ! $fs->mkdir($tmppath, FS_CHMOD_DIR) )
    545                         return new WP_Error('mkdir_failed', __('Could not create directory'), $tmppath);
     545                        return new WP_Error('mkdir_failed', __('Could not create directory.'), $tmppath);
    546546                }
    547547                break; //Exit main for loop
     
    552552        if ( ! $file['folder'] ) {
    553553            if ( !$fs->put_contents( $to . $file['filename'], $file['content'], FS_CHMOD_FILE) )
    554                 return new WP_Error('copy_failed', __('Could not copy file'), $to . $file['filename']);
     554                return new WP_Error('copy_failed', __('Could not copy file.'), $to . $file['filename']);
    555555        }
    556556    }
     
    582582                $wp_filesystem->chmod($to . $filename, 0644);
    583583                if ( ! $wp_filesystem->copy($from . $filename, $to . $filename, true) )
    584                     return new WP_Error('copy_failed', __('Could not copy file'), $to . $filename);
     584                    return new WP_Error('copy_failed', __('Could not copy file.'), $to . $filename);
    585585            }
    586586            $wp_filesystem->chmod($to . $filename, FS_CHMOD_FILE);
     
    588588            if ( !$wp_filesystem->is_dir($to . $filename) ) {
    589589                if ( !$wp_filesystem->mkdir($to . $filename, FS_CHMOD_DIR) )
    590                     return new WP_Error('mkdir_failed', __('Could not create directory'), $to . $filename);
     590                    return new WP_Error('mkdir_failed', __('Could not create directory.'), $to . $filename);
    591591            }
    592592            $result = copy_dir($from . $filename, $to . $filename);
Note: See TracChangeset for help on using the changeset viewer.