From 08015f1bf131397761074c7835c628eb303c7d56 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 6 Oct 2005 00:44:04 +0000 Subject: [PATCH] Start marking strings for translation. git-svn-id: http://svn.automattic.com/wordpress/trunk@2936 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/image-uploading.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/wp-admin/image-uploading.php b/wp-admin/image-uploading.php index 4c8e30dee5..ad8f3638fa 100644 --- a/wp-admin/image-uploading.php +++ b/wp-admin/image-uploading.php @@ -3,7 +3,7 @@ require_once('admin.php'); if (!current_user_can('edit_posts')) - die('You do not have permission to edit posts.'); + die(__('You do not have permission to edit posts.')); $wpvarstoreset = array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'object'); @@ -49,12 +49,12 @@ $exts = array('gif' => IMAGETYPE_GIF, 'jpg' => IMAGETYPE_JPEG, 'png' => IMAGETYP // Define the error messages for bad uploads. $upload_err = array(false, - "The uploaded file exceeds the upload_max_filesize directive in php.ini.", - "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.", - "The uploaded file was only partially uploaded.", - "No file was uploaded.", - "Missing a temporary folder.", - "Failed to write file to disk."); + __("The uploaded file exceeds the upload_max_filesize directive in php.ini."), + __("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form."), + __("The uploaded file was only partially uploaded."), + __("No file was uploaded."), + __("Missing a temporary folder."), + __("Failed to write file to disk.")); $iuerror = false; @@ -62,7 +62,7 @@ $iuerror = false; // A correct form post will pass this test. if ( !isset($_POST['action']) || $_POST['action'] != 'save' || count($_FILES) != 1 || ! isset($_FILES['image']) || is_array($_FILES['image']['name']) ) - $error = 'Invalid form submission. Only submit approved forms.'; + $error = __('Invalid form submission. Only submit approved forms.'); // A successful upload will pass this test. elseif ( $_FILES['image']['error'] > 0 ) @@ -70,27 +70,27 @@ elseif ( $_FILES['image']['error'] > 0 ) // A non-empty file will pass this test. elseif ( 0 == $_FILES['image']['size'] ) - $error = 'File is empty. Please upload something more substantial.'; + $error = __('File is empty. Please upload something more substantial.'); // A correct MIME category will pass this test. Full types are not consistent across browsers. elseif ( ! 'image/' == substr($_FILES['image']['type'], 0, 6) ) - $error = 'Bad MIME type submitted by your browser.'; + $error = __('Bad MIME type submitted by your browser.'); // An acceptable file extension will pass this test. elseif ( ! ( ( 0 !== preg_match('#\.?([^\.]*)$#', $_FILES['image']['name'], $matches) ) && ( $ext = strtolower($matches[1]) ) && array_key_exists($ext, $exts) ) ) - $error = 'Bad file extension.'; + $error = __('Bad file extension.'); // A valid uploaded file will pass this test. elseif ( ! is_uploaded_file($_FILES['image']['tmp_name']) ) - $error = 'Bad temp file. Try renaming the file and uploading again.'; + $error = __('Bad temp file. Try renaming the file and uploading again.'); // A valid image file will pass this test. elseif ( function_exists('exif_imagetype') && $exts[$ext] != $imagetype = exif_imagetype($_FILES['image']['tmp_name']) ) - $error = 'Bad image file. Try again, or try recreating it.'; + $error = __('Bad image file. Try again, or try recreating it.'); // An image with at least one pixel will pass this test. elseif ( ! ( ( $imagesize = getimagesize($_FILES['image']['tmp_name']) ) && $imagesize[0] > 1 && $imagesize[1] > 1 ) ) - $error = 'The image has no pixels. Isn\'t that odd?'; + $error = __('The image has no pixels. Isn\'t that odd?'); // A writable uploads dir will pass this test. elseif ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) )