summaryrefslogtreecommitdiffstats
path: root/wp-content
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-05-22 21:06:32 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-05-22 21:06:32 +0000
commitd1e5a30f84677d1361137277164fe783dc3e54c3 (patch)
tree37d4f6f64edf221679164979140dca7f7a3f299f /wp-content
parentc157da89600094acea15631cd1d49cfd8443abe0 (diff)
downloadwordpress-mu-d1e5a30f84677d1361137277164fe783dc3e54c3.tar.gz
wordpress-mu-d1e5a30f84677d1361137277164fe783dc3e54c3.tar.xz
wordpress-mu-d1e5a30f84677d1361137277164fe783dc3e54c3.zip
Improved gettext support, fixes #314
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@980 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-content')
-rw-r--r--wp-content/mu-plugins/delete-blog.php13
-rw-r--r--wp-content/mu-plugins/misc.php12
2 files changed, 14 insertions, 11 deletions
diff --git a/wp-content/mu-plugins/delete-blog.php b/wp-content/mu-plugins/delete-blog.php
index 710c0c6..e0c775f 100644
--- a/wp-content/mu-plugins/delete-blog.php
+++ b/wp-content/mu-plugins/delete-blog.php
@@ -27,12 +27,13 @@ class delete_blog {
if( $_POST[ 'action' ] == "deleteblog" && $_POST[ 'confirmdelete' ] == '1' ) {
$hash = substr( md5( $_SERVER[ 'REQUEST_URI' ] . time() ), 0, 6 );
update_option( "delete_blog_hash", $hash );
- $msg = "Dear User,
+ $url_delete = get_option( "siteurl" ) . "/wp-admin/options-general.php?page=delete-blog&h=" . $hash;
+ $msg = __("Dear User,
You recently clicked the 'Delete Blog' link on your blog and filled in a
form on that page.
If you really want to delete your blog, click the link below. You will not
be asked to confirm again so only click this link if you are 100% certain:
-" . get_option( "siteurl" ) . "/wp-admin/options-general.php?page=delete-blog&h=" . $hash . "
+URL_DELETE
If you delete your blog, please consider opening a new blog here
some time in the future! (But remember your current blog and username
@@ -40,9 +41,11 @@ are gone forever.)
Thanks for using the site,
Webmaster
-{$current_site->site_name}
-";
- wp_mail( get_option( "admin_email" ), "[ " . get_option( "blogname" ) . " ] Delete My Blog", $msg );
+SITE_NAME
+");
+ $msg = str_replace( "URL_DELETE", $url_delete, $msg );
+ $msg = str_replace( "SITE_NAME", $current_site->site_name, $msg );
+ wp_mail( get_option( "admin_email" ), "[ " . get_option( "blogname" ) . " ] ".__("Delete My Blog"), $msg );
?>
<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>
<?php
diff --git a/wp-content/mu-plugins/misc.php b/wp-content/mu-plugins/misc.php
index e4c2f24..46a8618 100644
--- a/wp-content/mu-plugins/misc.php
+++ b/wp-content/mu-plugins/misc.php
@@ -31,7 +31,6 @@ text-align: center;
endif;
function fix_upload_details( $uploads ) {
-
$uploads[ 'url' ] = str_replace( UPLOADS, "files", $uploads[ 'url' ] );
return $uploads;
}
@@ -73,7 +72,7 @@ function upload_is_user_over_quota( $ret ) {
$size = get_dirsize($dirName) / 1024 / 1024;
if( ($spaceAllowed-$size) < 0 ) {
- return "Sorry, you have used your space allocation. Please delete some files to upload more files."; //No space left
+ return __("Sorry, you have used your space allocation. Please delete some files to upload more files."); //No space left
} else {
return false;
}
@@ -83,7 +82,7 @@ add_filter( "pre_upload_error", "upload_is_user_over_quota" );
// Use wporg wp_upload_dir() filter
function filter_upload_dir_size( $uploads ) {
if( upload_is_user_over_quota( 1 ) ) {
- $uploads[ 'error' ] = 'Sorry, you have used your upload quota.';
+ $uploads[ 'error' ] = __('Sorry, you have used your upload quota.');
}
return $uploads;
@@ -91,9 +90,10 @@ function filter_upload_dir_size( $uploads ) {
add_filter( 'upload_dir', 'filter_upload_dir_size' );
function upload_is_file_too_big( $ret ) {
- if( $_FILES[ 'image' ][ 'size' ] > ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) )
- $ret = "This file is too big. Files must be less than " . get_site_option( 'fileupload_maxk', 1500 ) . "Kb in size.<br />";
-
+ if( $_FILES[ 'image' ][ 'size' ] > ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) ) {
+ $file_maxk = get_site_option( 'fileupload_maxk', 1500 );
+ $ret = sprintf(__('This file is too big. Files must be less than %1$s Kb in size.<br />'), $file_maxk);
+ }
return $ret;
}
add_filter( "check_uploaded_file", "upload_is_file_too_big" );