Changeset 980

Show
Ignore:
Timestamp:
05/22/07 21:06:32 (2 years ago)
Author:
donncha
Message:

Improved gettext support, fixes #314

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-content/mu-plugins/delete-blog.php

    r833 r980  
    2828                        $hash = substr( md5( $_SERVER[ 'REQUEST_URI' ] . time() ), 0, 6 ); 
    2929                        update_option( "delete_blog_hash", $hash ); 
    30                         $msg = "Dear User, 
     30                        $url_delete = get_option( "siteurl" ) . "/wp-admin/options-general.php?page=delete-blog&h=" . $hash; 
     31                        $msg = __("Dear User, 
    3132You recently clicked the 'Delete Blog' link on your blog and filled in a  
    3233form on that page. 
    3334If you really want to delete your blog, click the link below. You will not 
    3435be asked to confirm again so only click this link if you are 100% certain: 
    35 " . get_option( "siteurl" ) . "/wp-admin/options-general.php?page=delete-blog&h=" . $hash . " 
     36URL_DELETE 
    3637 
    3738If you delete your blog, please consider opening a new blog here 
     
    4142Thanks for using the site, 
    4243Webmaster 
    43 {$current_site->site_name} 
    44 "; 
    45                         wp_mail( get_option( "admin_email" ), "[ " . get_option( "blogname" ) . " ] Delete My Blog", $msg ); 
     44SITE_NAME 
     45"); 
     46                        $msg = str_replace( "URL_DELETE", $url_delete, $msg ); 
     47                        $msg = str_replace( "SITE_NAME", $current_site->site_name, $msg ); 
     48                        wp_mail( get_option( "admin_email" ), "[ " . get_option( "blogname" ) . " ] ".__("Delete My Blog"), $msg ); 
    4649                        ?> 
    4750                        <p><?php _e('Thank you. Please check your email for a link to confirm your action. Your blog will not be deleted until this link is clicked.') ?></p> 
  • trunk/wp-content/mu-plugins/misc.php

    r858 r980  
    3232 
    3333function fix_upload_details( $uploads ) { 
    34  
    3534        $uploads[ 'url' ] = str_replace( UPLOADS, "files", $uploads[ 'url' ] ); 
    3635        return $uploads; 
     
    7473         
    7574        if( ($spaceAllowed-$size) < 0 ) {  
    76                 return "Sorry, you have used your space allocation. Please delete some files to upload more files."; //No space left 
     75                return __("Sorry, you have used your space allocation. Please delete some files to upload more files."); //No space left 
    7776        } else { 
    7877                return false; 
     
    8483function filter_upload_dir_size( $uploads ) {  
    8584        if( upload_is_user_over_quota( 1 ) ) { 
    86                 $uploads[ 'error' ] = 'Sorry, you have used your upload quota.'
     85                $uploads[ 'error' ] = __('Sorry, you have used your upload quota.')
    8786        } 
    8887 
     
    9291 
    9392function upload_is_file_too_big( $ret ) { 
    94         if( $_FILES[ 'image' ][ 'size' ] > ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) ) 
    95                 $ret = "This file is too big. Files must be less than " . get_site_option( 'fileupload_maxk', 1500 ) . "Kb in size.<br />"; 
    96  
     93        if( $_FILES[ 'image' ][ 'size' ] > ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) ) { 
     94                $file_maxk = get_site_option( 'fileupload_maxk', 1500 ); 
     95                $ret = sprintf(__('This file is too big. Files must be less than %1$s Kb in size.<br />'), $file_maxk); 
     96        } 
    9797        return $ret; 
    9898}