From ece625403cfe31b275bc1fd6c5a0f2779b5b7c6e Mon Sep 17 00:00:00 2001
From: ryan
Date: Mon, 12 Dec 2005 22:48:30 +0000
Subject: [PATCH] i18n updates from nbachiyski. fixes #2069
git-svn-id: http://svn.automattic.com/wordpress/trunk@3295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
---
wp-admin/admin-functions.php | 2 +-
wp-admin/admin-header.php | 14 +++++++-------
wp-admin/execute-pings.php | 2 +-
wp-admin/index.php | 4 ++--
wp-admin/inline-uploading.php | 2 +-
wp-admin/link-categories.php | 2 +-
wp-admin/link-import.php | 2 +-
wp-admin/link-manager.php | 2 +-
wp-admin/link-parse-opml.php | 4 ++--
wp-admin/moderation.php | 18 +++++++++---------
wp-admin/plugin-editor.php | 4 ++--
wp-admin/plugins.php | 6 ++++--
wp-admin/templates.php | 8 ++++----
wp-admin/theme-editor.php | 4 ++--
wp-admin/update-links.php | 4 ++--
wp-admin/users.php | 4 ++--
16 files changed, 42 insertions(+), 40 deletions(-)
diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php
index 8bfef6bc36..d04709265a 100644
--- a/wp-admin/admin-functions.php
+++ b/wp-admin/admin-functions.php
@@ -1754,7 +1754,7 @@ function wp_handle_upload(&$file, $overrides = false) {
// Move the file to the uploads dir
$new_file = $uploads['path'] . "/$filename";
if ( false === move_uploaded_file($file['tmp_name'], $new_file) )
- die('The uploaded file could not be moved to $file.');
+ die(__('The uploaded file could not be moved to $file.'));
// Set correct file permissions
$stat = stat(dirname($new_file));
diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php
index c4bd95c8ce..c03d3a886e 100644
--- a/wp-admin/admin-header.php
+++ b/wp-admin/admin-header.php
@@ -133,7 +133,7 @@ function newCatAddIn() {
newcatSub.type = 'button';
newcatSub.name = 'Button';
newcatSub.id = 'catadd';
- newcatSub.value = '';
+ newcatSub.value = '';
newcatSub.onclick = ajaxNewCat;
ajaxcat.appendChild(newcat);
@@ -141,7 +141,7 @@ function newCatAddIn() {
document.getElementById('jaxcat').appendChild(ajaxcat);
howto = document.createElement('span');
- howto.innerHTML = '';
+ howto.innerHTML = '';
howto.id = 'howto';
ajaxcat.appendChild(howto);
}
@@ -160,17 +160,17 @@ function getResponseElement() {
function newCatLoading() {
var p = getResponseElement();
- p.innerHTML = 'Sending Data...';
+ p.innerHTML = '';
}
function newCatLoaded() {
var p = getResponseElement();
- p.innerHTML = 'Data Sent...';
+ p.innerHTML = '';
}
function newCatInteractive() {
var p = getResponseElement();
- p.innerHTML = 'Processing Request...';
+ p.innerHTML = '';
}
function newCatCompletion() {
@@ -186,11 +186,11 @@ function newCatCompletion() {
id = ids[i];
// alert(id);
if ( id == '-1' ) {
- p.innerHTML = "You don't have permission to do that.";
+ p.innerHTML = "";
return;
}
if ( id == '0' ) {
- p.innerHTML = "That category name is invalid. Try something else.";
+ p.innerHTML = "";
return;
}
diff --git a/wp-admin/execute-pings.php b/wp-admin/execute-pings.php
index 6dc575f152..69811f7444 100644
--- a/wp-admin/execute-pings.php
+++ b/wp-admin/execute-pings.php
@@ -2,7 +2,7 @@
require_once('admin.php');
if ( ! current_user_can('edit_posts') )
- die ("Cheatin' uh?");
+ die (__("Cheatin' uh?"));
echo '/* No Styles Here */';
register_shutdown_function('execute_all_pings');
diff --git a/wp-admin/index.php b/wp-admin/index.php
index 8f9f8ac828..d6d407edc2 100644
--- a/wp-admin/index.php
+++ b/wp-admin/index.php
@@ -129,7 +129,7 @@ if (0 < $numcats) $numcats = number_format($numcats);
$rss = @fetch_rss('http://wordpress.org/development/feed/');
if ( isset($rss->items) && 0 != count($rss->items) ) {
?>
-WordPress Development Blog
+
items = array_slice($rss->items, 0, 3);
foreach ($rss->items as $item ) {
@@ -169,4 +169,4 @@ foreach ($rss->items as $item ) {
\ No newline at end of file
+?>
diff --git a/wp-admin/inline-uploading.php b/wp-admin/inline-uploading.php
index 6262fa6319..9d7e5c5a4e 100644
--- a/wp-admin/inline-uploading.php
+++ b/wp-admin/inline-uploading.php
@@ -244,7 +244,7 @@ ab[{$ID}] = '
";
$popups .= "
diff --git a/wp-admin/link-categories.php b/wp-admin/link-categories.php
index 081f846996..bbbe65e1ad 100644
--- a/wp-admin/link-categories.php
+++ b/wp-admin/link-categories.php
@@ -444,7 +444,7 @@ foreach ($results as $row) {
- Deleting a link category does not delete links from that category.
It will just set them back to the default category
%s .'), get_linkcatname(1)) ?>
+
It will just set them back to the default category %s .'), get_linkcatname(1)) ?>
links (link_url, link_name, link_target, link_category, link_description, link_owner, link_rss)
VALUES('{$urls[$i]}', '".$wpdb->escape($names[$i])."', '', $cat_id, '".$wpdb->escape($descriptions[$i])."', $user_ID, '{$feeds[$i]}')\n";
$result = $wpdb->query($query);
- echo sprintf(__("Inserted %s
"), $names[$i]);
+ echo sprintf(''.__('Inserted %s ').'
', $names[$i]);
}
?>
manage those links
.'), $link_count, $cat_id, 'link-manager.php') ?>
diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php
index ab2014d517..4c1a2f8787 100644
--- a/wp-admin/link-manager.php
+++ b/wp-admin/link-manager.php
@@ -291,7 +291,7 @@ function checkAll(form)
echo " selected='selected'";
echo ">".$row->cat_id.": ".wp_specialchars($row->cat_name);
if ($row->auto_toggle == 'Y')
- echo ' (auto toggle)';
+ echo ' '.__('(auto toggle)');
echo "\n";
}
echo " \n";
diff --git a/wp-admin/link-parse-opml.php b/wp-admin/link-parse-opml.php
index 8ec0465847..196f3cb0d5 100644
--- a/wp-admin/link-parse-opml.php
+++ b/wp-admin/link-parse-opml.php
@@ -55,11 +55,11 @@ $xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, "startElement", "endElement");
if (!xml_parse($xml_parser, $opml, true)) {
- echo(sprintf("XML error: %s at line %d",
+ echo(sprintf(__('XML error: %1$s at line %2$s'),
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
// Free up memory used by the XML parser
xml_parser_free($xml_parser);
-?>
\ No newline at end of file
+?>
diff --git a/wp-admin/moderation.php b/wp-admin/moderation.php
index 2d443ad87e..a3c3d7f499 100644
--- a/wp-admin/moderation.php
+++ b/wp-admin/moderation.php
@@ -32,7 +32,7 @@ switch($action) {
case 'update':
if ( ! current_user_can('moderate_comments') )
- die(__('Your level is not high enough to moderate comments.
'));
+ die(''.__('Your level is not high enough to moderate comments.').'
');
$item_ignored = 0;
$item_deleted = 0;
@@ -84,30 +84,30 @@ if ( isset($_GET['deleted']) || isset($_GET['approved']) || isset($_GET['ignored
$spam = (int) $_GET['spam'];
if ($approved) {
if ('1' == $approved) {
- echo __("1 comment approved ") . "\n";
+ echo __("1 comment approved") . " \n";
} else {
echo sprintf(__("%s comments approved "), $approved) . "\n";
}
}
if ($deleted) {
if ('1' == $deleted) {
- echo __("1 comment deleted ") . "\n";
+ echo __("1 comment deleted") . " \n";
} else {
- echo sprintf(__("%s comments deleted "), $deleted) . "\n";
+ echo sprintf(__("%s comments deleted"), $deleted) . " \n";
}
}
if ($spam) {
if ('1' == $spam) {
- echo __("1 comment marked as spam ") . "\n";
+ echo __("1 comment marked as spam") . " \n";
} else {
- echo sprintf(__("%s comments marked as spam "), $spam) . "\n";
+ echo sprintf(__("%s comments marked as spam"), $spam) . " \n";
}
}
if ($ignored) {
if ('1' == $ignored) {
- echo __("1 comment unchanged ") . "\n";
+ echo __("1 comment unchanged") . " \n";
} else {
- echo sprintf(__("%s comments unchanged "), $ignored) . "\n";
+ echo sprintf(__("%s comments unchanged"), $ignored) . " \n";
}
}
echo "\n";
@@ -206,7 +206,7 @@ document.write('Currently there are no comments for you to moderate.") . "\n";
+ echo ''.__("Currently there are no comments for you to moderate.") . "
\n";
}
?>
diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php
index a429d37cd4..37aed6b0c1 100644
--- a/wp-admin/plugin-editor.php
+++ b/wp-admin/plugin-editor.php
@@ -35,7 +35,7 @@ switch($action) {
case 'update':
if ( !current_user_can('edit_plugins') )
- die(__('You have do not have sufficient permissions to edit templates for this blog.
'));
+ die(''.__('You have do not have sufficient permissions to edit templates for this blog.').'
');
$newcontent = stripslashes($_POST['newcontent']);
if (is_writeable($real_file)) {
@@ -55,7 +55,7 @@ default:
require_once('admin-header.php');
if ( !current_user_can('edit_plugins') )
- die(__('You have do not have sufficient permissions to edit plugins for this blog.
'));
+ die(''.__('You have do not have sufficient permissions to edit plugins for this blog.').'
');
update_recently_edited("wp-content/plugins/$file");
diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php
index 1e414b4a9d..d06a22c1ae 100644
--- a/wp-admin/plugins.php
+++ b/wp-admin/plugins.php
@@ -72,7 +72,9 @@ if ( get_settings('active_plugins') )
$plugins = get_plugins();
if (empty($plugins)) {
- _e("Couldn't open plugins directory or there are no plugins available.
"); // TODO: make more helpful
+ echo '';
+ _e("Couldn't open plugins directory or there are no plugins available."); // TODO: make more helpful
+ echo '
';
} else {
?>
@@ -100,7 +102,7 @@ if (empty($plugins)) {
{$plugin_data['Title']}
{$plugin_data['Version']}
- {$plugin_data['Description']} By {$plugin_data['Author']}.
+ {$plugin_data['Description']} ".sprintf(__('By %s'), $plugin_data['Author']).".
$action
";
}
diff --git a/wp-admin/templates.php b/wp-admin/templates.php
index 80b18dba51..ee0e1d07f2 100644
--- a/wp-admin/templates.php
+++ b/wp-admin/templates.php
@@ -37,7 +37,7 @@ switch($action) {
case 'update':
if ( ! current_user_can('edit_files') )
- die(__('You have do not have sufficient permissions to edit templates for this blog.
'));
+ die(''.__('You have do not have sufficient permissions to edit templates for this blog.').'
');
$newcontent = stripslashes($_POST['newcontent']);
if (is_writeable($real_file)) {
@@ -58,10 +58,10 @@ default:
require_once('./admin-header.php');
if ( ! current_user_can('edit_files') )
- die(__('You have do not have sufficient permissions to edit templates for this blog.
'));
+ die(''.__('You have do not have sufficient permissions to edit templates for this blog.').'
');
if ( strstr( $file, 'wp-config.php' ) )
- die( __('The config file cannot be edited or viewed through the web interface. Sorry!
') );
+ die(''.__('The config file cannot be edited or viewed through the web interface. Sorry!').'
');
update_recently_edited($file);
@@ -152,4 +152,4 @@ break;
}
include("admin-footer.php");
-?>
\ No newline at end of file
+?>
diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php
index ee0524c7cd..8ed51079bb 100644
--- a/wp-admin/theme-editor.php
+++ b/wp-admin/theme-editor.php
@@ -48,7 +48,7 @@ switch($action) {
case 'update':
if ( !current_user_can('edit_themes') )
- die(__('You have do not have sufficient permissions to edit templates for this blog.
'));
+ die(''.__('You have do not have sufficient permissions to edit templates for this blog.').'
');
$newcontent = stripslashes($_POST['newcontent']);
$theme = urlencode($theme);
@@ -69,7 +69,7 @@ default:
require_once('admin-header.php');
if ( !current_user_can('edit_themes') )
- die(__('You have do not have sufficient permissions to edit themes for this blog.
'));
+ die(''.__('You have do not have sufficient permissions to edit themes for this blog.').'
');
update_recently_edited($file);
diff --git a/wp-admin/update-links.php b/wp-admin/update-links.php
index a02474ea90..46a7f5a831 100644
--- a/wp-admin/update-links.php
+++ b/wp-admin/update-links.php
@@ -3,7 +3,7 @@ require_once( dirname( dirname(__FILE__) ) . '/wp-config.php');
require_once( ABSPATH . 'wp-includes/class-snoopy.php');
if ( !get_option('use_linksupdate') )
- die('Feature disabled.');
+ die(__('Feature disabled.'));
$link_uris = $wpdb->get_col("SELECT link_url FROM $wpdb->links");
@@ -41,4 +41,4 @@ if( false !== ( $fs = fsockopen('api.pingomatic.com', 80, $errno, $errstr, 5) )
$wpdb->query("UPDATE $wpdb->links SET link_updated = '$time' WHERE link_url = '$uri'");
endforeach;
}
-?>
\ No newline at end of file
+?>
diff --git a/wp-admin/users.php b/wp-admin/users.php
index d296b5f525..bca3120cd8 100644
--- a/wp-admin/users.php
+++ b/wp-admin/users.php
@@ -95,9 +95,9 @@ case 'delete':
foreach ($userids as $id) {
$user = new WP_User($id);
if ($id == $current_user->id) {
- echo "" . sprintf('ID #%1s: %2s The current user will not be deleted. ', $id, $user->user_login) . " \n";
+ echo "" . sprintf(__('ID #%1s: %2s The current user will not be deleted. '), $id, $user->user_login) . " \n";
} else {
- echo " " . sprintf('ID #%1s: %2s', $id, $user->user_login) . " \n";
+ echo " " . sprintf(__('ID #%1s: %2s'), $id, $user->user_login) . " \n";
$go_delete = true;
}
}