From ebbcf250d5134405a1da651b94b2afd7b944b551 Mon Sep 17 00:00:00 2001
From: ryan
Date: Tue, 5 Sep 2006 18:52:24 +0000
Subject: [PATCH] i18n fixes from nbachiyski. fixes #3109
git-svn-id: http://svn.automattic.com/wordpress/trunk@4165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
---
wp-admin/edit.php | 2 +-
wp-admin/import/blogger.php | 10 ++---
wp-admin/import/blogware.php | 2 +-
wp-admin/import/dotclear.php | 8 ++--
wp-admin/import/greymatter.php | 75 ++++++++++++++++---------------
wp-admin/import/livejournal.php | 2 +-
wp-admin/import/mt.php | 14 +++---
wp-admin/import/rss.php | 2 +-
wp-admin/import/textpattern.php | 6 +--
wp-admin/import/wordpress.php | 8 ++--
wp-admin/options-privacy.php | 4 +-
wp-admin/page.php | 2 +-
wp-admin/post.php | 2 +-
wp-includes/bookmark-template.php | 9 ++--
wp-includes/classes.php | 8 ++--
wp-includes/functions.php | 4 +-
wp-includes/post-template.php | 2 +-
17 files changed, 82 insertions(+), 78 deletions(-)
diff --git a/wp-admin/edit.php b/wp-admin/edit.php
index c473e46530..008b57000d 100644
--- a/wp-admin/edit.php
+++ b/wp-admin/edit.php
@@ -115,7 +115,7 @@ if ( count($arc_result) ) { ?>
diff --git a/wp-admin/import/blogger.php b/wp-admin/import/blogger.php
index d3115d87cd..f6595ebb3f 100644
--- a/wp-admin/import/blogger.php
+++ b/wp-admin/import/blogger.php
@@ -341,7 +341,7 @@ class Blogger_Import {
$form = "";
$form.= $body;
$form.= "
";
- $output.= ''.sprintf('%s in progress, please wait...', $blog_opt)."
\n";
+ $output.= ''.sprintf(__('%s in progress, please wait...'), $blog_opt)."
\n";
} else {
$output.= "$blog_opt
\n";
}
@@ -420,7 +420,7 @@ class Blogger_Import {
$user_email = $wpdb->escape($post_author_email);
$user_password = substr(md5(uniqid(microtime())), 0, 6);
$result = wp_create_user( $user_login, $user_password, $user_email );
- $status.= sprintf('Registered user %s .', $user_login);
+ $status.= sprintf(__('Registered user %s .'), $user_login);
$this->import['blogs'][$_GET['blog']]['newusers'][] = $user_login;
}
$userdata = get_userdatabylogin( $post_author_name );
@@ -509,7 +509,7 @@ class Blogger_Import {
}
}
$status = sprintf(__('%s post(s) parsed, %s skipped...'), $postcount, $skippedpostcount).' '.
- sprintf(__('%s comment(s) parsed, %s skipped...'), $commentcoun, $skippedcommentcount).' '.
+ sprintf(__('%s comment(s) parsed, %s skipped...'), $commentcount, $skippedcommentcount).' '.
' '.__('Done').' ';
$import = $this->import;
$import['blogs'][$_GET['blog']]['archives']["$url"] = $status;
@@ -546,7 +546,7 @@ class Blogger_Import {
$response = $this->get_blogger("http://www.blogger.com/blog-publishing.g?blogID={$_GET['blog']}&publishMode={$optary['backup']['publishMode']}", $headers);
sleep(2);
if ( $response['code'] >= 400 )
- wp_die('Error restoring publishMode. Please tell the devs.
' . addslashes(print_r($response, 1)) );
+ wp_die(''.__('Error restoring publishMode').' '.__('Please tell the devs.').'
' . addslashes(print_r($response, 1)) );
}
}
if ( $optary['backup'] != $optary['modify'] ) {
@@ -662,6 +662,6 @@ class Blogger_Import {
$blogger_import = new Blogger_Import();
-register_importer('blogger', 'Blogger and Blogspot', __('Import posts and comments from your Blogger account'), array ($blogger_import, 'start'));
+register_importer('blogger', __('Blogger and Blogspot'), __('Import posts and comments from your Blogger account'), array ($blogger_import, 'start'));
?>
diff --git a/wp-admin/import/blogware.php b/wp-admin/import/blogware.php
index 35ab61084e..abb43d50e3 100644
--- a/wp-admin/import/blogware.php
+++ b/wp-admin/import/blogware.php
@@ -188,5 +188,5 @@ class BW_Import {
$blogware_import = new BW_Import();
-register_importer('blogware', 'Blogware', __('Import posts from Blogware'), array ($blogware_import, 'dispatch'));
+register_importer('blogware', __('Blogware'), __('Import posts from Blogware'), array ($blogware_import, 'dispatch'));
?>
diff --git a/wp-admin/import/dotclear.php b/wp-admin/import/dotclear.php
index 27ce6e6bf2..ba988f6fa4 100644
--- a/wp-admin/import/dotclear.php
+++ b/wp-admin/import/dotclear.php
@@ -632,15 +632,15 @@ class Dotclear_Import {
echo ''.__('Preserving Authors').' ';
echo ''.__('Secondly, we have attempted to preserve post authors. If you are the only author or contributor to your blog, then you are safe. In most cases, we are successful in this preservation endeavor. However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').'
';
echo ''.__('Textile').' ';
- echo ''.__('Also, since you\'re coming from Dotclear, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing Textile for WordPress . Trust me... You\'ll want it.').'
';
+ echo ''.__('Also, since you\'re coming from Dotclear, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing Textile for WordPress . Trust me... You\'ll want it.').'
';
echo ''.__('WordPress Resources').' ';
echo ''.__('Finally, there are numerous WordPress resources around the internet. Some of them are:').'
';
echo '';
- echo ''.sprintf(__('That\'s it! What are you waiting for? Go login !'), '/wp-login.php').'
';
+ echo ''.sprintf(__('That\'s it! What are you waiting for? Go login !'), '../wp-login.php').'
';
}
function db_form()
@@ -743,5 +743,5 @@ class Dotclear_Import {
}
$dc_import = new Dotclear_Import();
-register_importer('dotclear', 'Dotclear', __('Import posts from a Dotclear Blog'), array ($dc_import, 'dispatch'));
+register_importer('dotclear', __('Dotclear'), __('Import posts from a Dotclear Blog'), array ($dc_import, 'dispatch'));
?>
diff --git a/wp-admin/import/greymatter.php b/wp-admin/import/greymatter.php
index 8f7b34a4fb..5494197f14 100644
--- a/wp-admin/import/greymatter.php
+++ b/wp-admin/import/greymatter.php
@@ -16,44 +16,44 @@ class GM_Import {
function greet() {
$this->header();
?>
-This is a basic GreyMatter to WordPress import script.
-What it does:
+
+
-Parses gm-authors.cgi to import (new) authors. Everyone is imported at level 1.
-Parses the entries cgi files to import posts, comments, and karma on posts (although karma is not used on WordPress yet). If authors are found not to be in gm-authors.cgi, imports them at level 0.
-Detects duplicate entries or comments. If you don't import everything the first time, or this import should fail in the middle, duplicate entries will not be made when you try again.
+
+If authors are found not to be in gm-authors.cgi, imports them at level 0.') ?>
+
-What it does not:
+
-Parse gm-counter.cgi, gm-banlist.cgi, gm-cplog.cgi (you can make a CP log hack if you really feel like it, but I question the need of a CP log).
-Import gm-templates.
-Doesn't keep entries on top.
+
+
+
-When you're ready, click OK to start importing:
+
 
header();
?>
-The importer is running...
+
-importing users... user $user_login ... Already exists ";
+ printf(''.__('user %s').''.__('Already exists').' ', "$user_login ");
$this->gmnames[$userdata[0]] = $user_id;
continue;
}
@@ -129,12 +129,11 @@ class GM_Import {
$user_id = wp_insert_user($user_info);
$this->gmnames[$userdata[0]] = $user_id;
- echo "user $user_login ... Done ";
-
+ printf(''.__('user %s...').' '.__('Done').' ', "$user_login ");
}
-?> Done
-importing posts, comments, and karma...
+entry # $entryfile ";
$postinfo=explode("|",$entry[0]);
$postmaincontent=$this->gm2autobr($entry[2]);
$postmorecontent=$this->gm2autobr($entry[3]);
@@ -171,7 +169,7 @@ class GM_Import {
$post_author=trim($wpdb->escape($postinfo[1]));
$post_title=$this->gm2autobr($postinfo[2]);
- echo " : $post_title : by $postinfo[1]";
+ printf(''.__('entry # %s : %s : by %s'), $entryfile, $post_title, $postinfo[1]);
$post_title=$wpdb->escape($post_title);
$postyear=$postinfo[6];
@@ -198,7 +196,8 @@ class GM_Import {
$ping_status = 'closed';
if ($post_ID = post_exists($post_title, '', $post_date)) {
- echo ' (already exists)';
+ echo ' ';
+ _e('(already exists)');
} else {
//just so that if a post already exists, new users are not created by checkauthor
// we'll check the author is registered, or if it's a deleted author
@@ -219,7 +218,8 @@ class GM_Import {
$user_id = wp_insert_user($user_info);
$this->gmnames[$postinfo[1]] = $user_id;
- echo ": registered deleted user $user_login at level 0 ";
+ echo ': ';
+ printf(__('registered deleted user %s at level 0 '), "$user_login ");
}
if (array_key_exists($postinfo[1], $this->gmnames)) {
@@ -266,21 +266,22 @@ class GM_Import {
$numComments++;
}
if ($numAddedComments > 0) {
- echo ": imported $numAddedComments comment";
- if ($numAddedComments != 1)
- echo "s";
+ echo ': ';
+ printf(__('imported %d comment(s)'), $numAddedComments);
}
$preExisting = $numComments - numAddedComments;
- if ($preExisting > 0)
- echo " (ignored $preExisting pre-existing comments)";
+ if ($preExisting > 0) {
+ echo ' ';
+ printf(__('ignored %d pre-existing comments'), $preExisting);
+ }
}
- echo "... Done ";
+ echo '... '.__('Done').' ';
}
}
?>
-Done
+
-Completed Greymatter import !
+
footer();
}
@@ -308,5 +309,5 @@ class GM_Import {
$gm_import = new GM_Import();
-register_importer('greymatter', 'Greymatter', __('Import posts and comments from your Greymatter blog'), array ($gm_import, 'dispatch'));
+register_importer('greymatter', __('Greymatter'), __('Import posts and comments from your Greymatter blog'), array ($gm_import, 'dispatch'));
?>
diff --git a/wp-admin/import/livejournal.php b/wp-admin/import/livejournal.php
index 44b92a56b5..d0c6102bec 100644
--- a/wp-admin/import/livejournal.php
+++ b/wp-admin/import/livejournal.php
@@ -164,5 +164,5 @@ class LJ_Import {
$livejournal_import = new LJ_Import();
-register_importer('livejournal', 'LiveJournal', __('Import posts from LiveJournal'), array ($livejournal_import, 'dispatch'));
+register_importer('livejournal', __('LiveJournal'), __('Import posts from LiveJournal'), array ($livejournal_import, 'dispatch'));
?>
diff --git a/wp-admin/import/mt.php b/wp-admin/import/mt.php
index 8c2be5da57..4d608f7f3c 100644
--- a/wp-admin/import/mt.php
+++ b/wp-admin/import/mt.php
@@ -32,7 +32,7 @@ class MT_Import {
global $wpdb, $testing;
$users = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY ID");
?>
- - Select -
+
Current author: '.$author.' '.'Create user or map to existing ';
+ echo ''.__('Current author:').' '.$author.' '.sprintf(__('Create user %1$s or map to existing'), ' ');
$this->users_form($j);
echo ' ';
}
- echo ' '.' ';
+ echo ' '.' ';
echo '';
echo '';
@@ -163,7 +163,7 @@ class MT_Import {
$file = wp_import_handle_upload();
if ( isset($file['error']) ) {
$this->header();
- echo 'Sorry, there has been an error.
';
+ echo ''.__('Sorry, there has been an error').'.
';
echo '' . $file['error'] . '
';
$this->footer();
return;
@@ -334,7 +334,7 @@ class MT_Import {
}
}
if ( $num_comments )
- printf(__(' (%s comments)'), $num_comments);
+ printf(' '.__('(%s comments)'), $num_comments);
// Finally the pings
// fix the double newline on the first one
@@ -382,7 +382,7 @@ class MT_Import {
}
}
if ( $num_pings )
- printf(__(' (%s pings)'), $num_pings);
+ printf(' '.__('(%s pings)'), $num_pings);
echo "";
}
@@ -430,5 +430,5 @@ class MT_Import {
$mt_import = new MT_Import();
-register_importer('mt', 'Movable Type and Typepad', __('Imports posts and comments from your Movable Type or Typepad blog'), array ($mt_import, 'dispatch'));
+register_importer('mt', __('Movable Type and Typepad'), __('Imports posts and comments from your Movable Type or Typepad blog'), array ($mt_import, 'dispatch'));
?>
diff --git a/wp-admin/import/rss.php b/wp-admin/import/rss.php
index ba31c26702..aabfe4e668 100644
--- a/wp-admin/import/rss.php
+++ b/wp-admin/import/rss.php
@@ -168,5 +168,5 @@ class RSS_Import {
$rss_import = new RSS_Import();
-register_importer('rss', 'RSS', __('Import posts from an RSS feed'), array ($rss_import, 'dispatch'));
+register_importer('rss', __('RSS'), __('Import posts from an RSS feed'), array ($rss_import, 'dispatch'));
?>
diff --git a/wp-admin/import/textpattern.php b/wp-admin/import/textpattern.php
index 4a123de5f5..6af31aae29 100644
--- a/wp-admin/import/textpattern.php
+++ b/wp-admin/import/textpattern.php
@@ -555,12 +555,12 @@ class Textpattern_Import {
echo ''.__('Preserving Authors').' ';
echo ''.__('Secondly, we have attempted to preserve post authors. If you are the only author or contributor to your blog, then you are safe. In most cases, we are successful in this preservation endeavor. However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').'
';
echo ''.__('Textile').' ';
- echo ''.__('Also, since you\'re coming from Textpattern, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing Textile for WordPress . Trust me... You\'ll want it.').'
';
+ echo ''.__('Also, since you\'re coming from Textpattern, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing Textile for WordPress . Trust me... You\'ll want it.').'
';
echo ''.__('WordPress Resources').' ';
echo ''.__('Finally, there are numerous WordPress resources around the internet. Some of them are:').'
';
echo '';
echo ''.sprintf(__('That\'s it! What are you waiting for? Go login !'), '/wp-login.php').'
';
@@ -659,5 +659,5 @@ class Textpattern_Import {
}
$txp_import = new Textpattern_Import();
-register_importer('textpattern', 'Textpattern', __('Import posts from a Textpattern Blog'), array ($txp_import, 'dispatch'));
+register_importer('textpattern', __('Textpattern'), __('Import posts from a Textpattern Blog'), array ($txp_import, 'dispatch'));
?>
diff --git a/wp-admin/import/wordpress.php b/wp-admin/import/wordpress.php
index 11c9f3efec..0740ddfa8d 100644
--- a/wp-admin/import/wordpress.php
+++ b/wp-admin/import/wordpress.php
@@ -148,7 +148,7 @@ class WP_Import {
$j = -1;
foreach ($authors as $author) {
++ $j;
- echo 'Current author: '.$author.' '.'Create user or map to existing ';
+ echo ' '.__('Current author:').' '.$author.' '.sprintf(__('Create user %1$s or map to existing'), ' ');
$this->users_form($j);
echo ' ';
}
@@ -163,7 +163,7 @@ class WP_Import {
$file = wp_import_handle_upload();
if ( isset($file['error']) ) {
$this->header();
- echo 'Sorry, there has been an error.
';
+ echo ''.__('Sorry, there has been an error.').'
';
echo '' . $file['error'] . '
';
$this->footer();
return;
@@ -248,7 +248,7 @@ class WP_Import {
}
} }
if ( $num_comments )
- printf(__(' (%s comments)'), $num_comments);
+ printf(' '.__('(%s comments)'), $num_comments);
// Now for post meta
preg_match_all('|(.*?) |is', $post, $postmeta);
@@ -266,7 +266,7 @@ class WP_Import {
wp_import_cleanup($this->id);
- echo ''.sprintf(__('All done. Have fun! '), get_option('home')).' ';
+ echo ''.sprintf(__('All done.').' '.__('Have fun!').' ', get_option('home')).' ';
}
function import() {
diff --git a/wp-admin/options-privacy.php b/wp-admin/options-privacy.php
index eb974a4830..d91ea1d4d0 100644
--- a/wp-admin/options-privacy.php
+++ b/wp-admin/options-privacy.php
@@ -16,10 +16,10 @@ include('./admin-header.php');
/>
-I would like my blog to be visible to anyone who visits, including search engines and archivers
+
/>
-I would like to block search engines, but allow normal folks
+
diff --git a/wp-admin/page.php b/wp-admin/page.php
index 76164d218f..554475da8b 100644
--- a/wp-admin/page.php
+++ b/wp-admin/page.php
@@ -57,7 +57,7 @@ case 'edit':
?>
link_updated_f, 0, 2) )
- $title .= ' (Last updated ' . date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * 3600)) . ')';
+ if ( '00' != substr($bookmark->link_updated_f, 0, 2) ) {
+ $title .= ' ';
+ $title .= sprintf(__('Last updated: %s'), date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * 3600)));
+ $title .= ')';
+ }
if ( '' != $title )
$title = ' title="' . $title . '"';
@@ -348,4 +351,4 @@ function wp_list_bookmarks($args = '') {
echo $output;
}
-?>
\ No newline at end of file
+?>
diff --git a/wp-includes/classes.php b/wp-includes/classes.php
index 1e98db1c20..3c1db019b4 100644
--- a/wp-includes/classes.php
+++ b/wp-includes/classes.php
@@ -25,9 +25,9 @@ class retrospam_mgr {
$cnt++;
}
}
- echo "$cnt comment";
- if ($cnt != 1 ) echo "s";
- echo " moved to the moderation queue.
\n";
+ echo " ";
+ printf(__('%d comment(s) moved to the moderation queue.'), $cnt);
+ echo "
\n";
} // End function move_spam
function find_spam() {
@@ -56,7 +56,7 @@ class retrospam_mgr {
$numfound = count($counters[found]);
$numqueue = $counters[in_queue];
- $body = '' . sprintf(__('Suspected spam comments: %s '), $numfound) . '
';
+ $body = '' . sprintf(__('Suspected spam comments: %s'), "$numfound ") . '
';
if ( count($counters[found]) > 0 ) {
$id_list = implode( ',', $counters[found] );
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 8d4b2a760e..cfeccfdd46 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -947,7 +947,7 @@ function wp_upload_bits($name, $type, $bits) {
$ifp = @ fopen($new_file, 'wb');
if ( ! $ifp )
- return array('error' => "Could not write file $new_file.");
+ return array('error' => sprintf(__('Could not write file %s'), $new_file));
$success = @ fwrite($ifp, $bits);
fclose($ifp);
@@ -1091,7 +1091,7 @@ function wp_explain_nonce($action) {
}
}
- return __('Are you sure you want to do this');
+ return __('Are you sure you want to do this?');
}
function wp_nonce_ays($action) {
diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php
index d339c7f3f2..7acd6556bb 100644
--- a/wp-includes/post-template.php
+++ b/wp-includes/post-template.php
@@ -330,7 +330,7 @@ function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false)
return "guid}\" title=\"{$_post->post_title}\" >{$innerHTML} ";
} else {
- $p .= __('Missing attachment');
+ $p .= __('Missing Attachment');
}
return $p;
}