From 139adf7c5c72f9137d3baeeeedc549a4b4077fcf Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 27 Feb 2005 23:09:58 +0000 Subject: [PATCH] gettext install and upgrade. http://mosquito.wordpress.org/view.php?id=994 From nbachiyski git-svn-id: http://svn.automattic.com/wordpress/trunk@2391 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/install.php | 52 ++++++++++++++++++------------------- wp-admin/upgrade-schema.php | 10 +++---- wp-admin/upgrade.php | 12 ++++----- wp-settings.php | 4 +-- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/wp-admin/install.php b/wp-admin/install.php index 81ef91863..a2bbd27b1 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -77,37 +77,37 @@ else // Let's check to make sure WP isn't already installed. $wpdb->hide_errors(); $installed = $wpdb->get_results("SELECT * FROM $wpdb->users"); -if ($installed) die(__('

Already Installed

You appear to have already installed WordPress. To reinstall please clear your old database tables first.

')); +if ($installed) die(__('

Already Installed

You appear to have already installed WordPress. To reinstall please clear your old database tables first.

') . ''); $wpdb->show_errors(); switch($step) { case 0: ?> -

Welcome to WordPress installation. We’re now going to go through a few steps to get you up and running with the latest in personal publishing platforms. You may want to peruse the ReadMe documentation at your leisure.

-

First Step »

+

ReadMe documentation at your leisure.'), '../readme.html'); ?>

+

-

First Step

-

Before we begin we need a little bit of information. Don't worry, you can always change these later.

+

+

- + - +
Weblog title:
Your e-mail:
-

Double-check that email address before continuing.

+

- +

@@ -115,8 +115,8 @@ switch($step) { break; case 2: ?> -

Second Step

-

Now we’re going to create the database tables and fill them with some default data.

+

+

query("INSERT INTO $wpdb->users (ID, user_login, user_pass, user_nickname $from = 'From: '.$_POST['weblog_title'].' '; $message_headers = "$from"; -$message = "Your new WordPress blog has been successfully set up at: +$message = sprintf(__("Your new WordPress blog has been successfully set up at: -$guessurl +%1\$s You can log in to the administrator account with the following information: Username: admin -Password: $random_password +Password: %2\$s We hope you enjoy your new weblog. Thanks! --The WordPress Team http://wordpress.org/ -"; +"), $guessurl, $random_password); -@mail($admin_email, 'New WordPress Blog', $message, $message_headers); +@mail($admin_email, __('New WordPress Blog'), $message, $message_headers); upgrade_all(); ?> -

Finished!

+

-

Now you can log in with the login - "admin" and password "".

-

Note that password carefully! It is a random +

log in with the login +"admin" and password "%2$s".'), '../wp-login.php', $random_password); ?>

+

Note that password carefully! It is a random password that was generated just for you. If you lose it, you - will have to delete the tables from the database yourself, and re-install WordPress. So to review: + will have to delete the tables from the database yourself, and re-install WordPress. So to review:'); ?>

-
Login
+
admin
-
Password
+
-
Login address
+
wp-login.php
-

Were you expecting more steps? Sorry to disappoint. All done! :)

+

- + diff --git a/wp-admin/upgrade-schema.php b/wp-admin/upgrade-schema.php index b4c4892a4..5aadf62b3 100644 --- a/wp-admin/upgrade-schema.php +++ b/wp-admin/upgrade-schema.php @@ -152,9 +152,9 @@ function populate_options() { global $wpdb; $guessurl = preg_replace('|/wp-admin/.*|i', '', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); - add_option('siteurl', $guessurl, 'WordPress web address'); - add_option('blogname', 'My Weblog', 'Blog title'); - add_option('blogdescription', 'Just another WordPress weblog', 'Short tagline'); + add_option('siteurl', $guessurl, __('WordPress web address')); + add_option('blogname', __('My Weblog'), __('Blog title')); + add_option('blogdescription', __('Just another WordPress weblog'), __('Short tagline')); add_option('new_users_can_blog', 0); add_option('users_can_register', 0); add_option('admin_email', 'you@example.com'); @@ -203,7 +203,7 @@ function populate_options() { add_option('advanced_edit', 0); add_option('comment_max_links', 2); // 1.5 - add_option('default_email_category', 1, 'Posts by email go to this category'); + add_option('default_email_category', 1, __('Posts by email go to this category')); add_option('recently_edited'); add_option('use_linksupdate', 0); add_option('template', 'default'); @@ -229,4 +229,4 @@ function populate_options() { endforeach; } -?> \ No newline at end of file +?> diff --git a/wp-admin/upgrade.php b/wp-admin/upgrade.php index c73fed376..27eef908e 100644 --- a/wp-admin/upgrade.php +++ b/wp-admin/upgrade.php @@ -67,8 +67,8 @@ switch($step) { case 0: ?> -

This file upgrades you from any previous version of WordPress to the latest. It may take a while though, so be patient.

-

Upgrade WordPress »

+

+

-

Step 1

-

There's actually only one step. So if you see this, you're done. Have fun!

+

+

Have fun!"), '../'); ?>

diff --git a/wp-settings.php b/wp-settings.php index ed34f269d..d98e8a14e 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -74,7 +74,7 @@ if ( !update_user_cache() && !strstr($_SERVER['PHP_SELF'], 'install.php') ) { $link = 'install.php'; else $link = 'wp-admin/install.php'; - die("It doesn't look like you've installed WP yet. Try running install.php."); + die(sprintf(__("It doesn't look like you've installed WP yet. Try running install.php."), $link)); } $wpdb->show_errors(); @@ -143,4 +143,4 @@ register_shutdown_function('shutdown_action_hook'); // Everything is loaded. do_action('init'); -?> \ No newline at end of file +?>