Make WordPress Core

Changeset 4239


Ignore:
Timestamp:
09/25/2006 02:38:55 AM (20 years ago)
Author:
ryan
Message:

i18n fixes from nbachiyski. fixes #3109

Location:
branches/2.0
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-admin/import/blogger.php

    r3937 r4239  
    136136                if ($header) curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
    137137                $response = curl_exec ($ch);
    138        
     138
    139139                if ($parse) {
    140140                        $response = $this->parse_response($response);
     
    142142                        return $response;
    143143                }
    144        
     144
    145145                return $response;
    146146        }
     
    211211                update_option('import-blogger', $this->import);
    212212        }
    213        
     213
    214214        // Redirects to next step
    215215        function do_next_step() {
     
    225225                                $this->login_form(__('The script will log into your Blogger account, change some settings so it can read your blog, and restore the original settings when it\'s done. Here\'s what you do:').'</p><ol><li>'.__('Back up your Blogger template.').'</li><li>'.__('Back up any other Blogger settings you might need later.').'</li><li>'.__('Log out of Blogger').'</li><li>'.__('Log in <em>here</em> with your Blogger username and password.').'</li><li>'.__('On the next screen, click one of your Blogger blogs.').'</li><li>'.__('Do not close this window or navigate away until the process is complete.').'</li></ol>');
    226226                        }
    227                
    228                         // Try logging in. If we get an array of cookies back, we at least connected.           
     227
     228                        // Try logging in. If we get an array of cookies back, we at least connected.
    229229                        $this->import['cookies'] = $this->login_blogger($_POST['user'], $_POST['pass']);
    230230                        if ( !is_array( $this->import['cookies'] ) ) {
    231231                                $this->login_form(__('Login failed. Please enter your credentials again.'));
    232232                        }
    233                        
     233
    234234                        // Save the password so we can log the browser in when it's time to publish.
    235235                        $this->import['pass'] = $_POST['pass'];
     
    342342                                $form.= $body;
    343343                                $form.= "</div><script type='text/javascript'>forms=document.getElementsByTagName('form');for(i=0;i<forms.length;i++){if(forms[i].action.search('{$blog_opt}')){forms[i].submit();break;}}</script>";
    344                                 $output.= '<p>'.sprintf('<strong>%s</strong> in progress, please wait...', $blog_opt)."</p>\n";
     344                                $output.= '<p>'.sprintf(__('<strong>%s</strong> in progress, please wait...'), $blog_opt)."</p>\n";
    345345                        } else {
    346346                                $output.= "<p>$blog_opt</p>\n";
     
    396396                                $archive = $this->get_blogger($url);
    397397                                if ( $archive['code'] > 200 )
    398                                         continue;       
     398                                        continue;
    399399                                $posts = explode('<wordpresspost>', $archive['body']);
    400400                                for ($i = 1; $i < count($posts); $i = $i + 1) {
     
    410410                                        $post_author_name = $wpdb->escape(trim($postinfo[1]));
    411411                                        $post_author_email = $postinfo[5] ? $postinfo[5] : 'user@wordpress.org';
    412        
     412
    413413                                        if ( $this->lump_authors ) {
    414414                                                // Ignore Blogger authors. Use the current user_ID for all posts imported.
     
    421421                                                        $user_password = substr(md5(uniqid(microtime())), 0, 6);
    422422                                                        $result = wp_create_user( $user_login, $user_password, $user_email );
    423                                                         $status.= sprintf('Registered user <strong>%s</strong>.', $user_login);
     423                                                        $status.= sprintf(__('Registered user <strong>%s</strong>.'), $user_login);
    424424                                                        $this->import['blogs'][$_GET['blog']]['newusers'][] = $user_login;
    425425                                                }
     
    436436                                        $postminute = zeroise($post_date_His[1], 2);
    437437                                        $postsecond = zeroise($post_date_His[2], 2);
    438        
     438
    439439                                        if (($post_date[2] == 'PM') && ($posthour != '12'))
    440440                                                $posthour = $posthour + 12;
    441441                                        else if (($post_date[2] == 'AM') && ($posthour == '12'))
    442442                                                $posthour = '00';
    443        
     443
    444444                                        $post_date = "$postyear-$postmonth-$postday $posthour:$postminute:$postsecond";
    445        
     445
    446446                                        $post_content = addslashes($post_content);
    447447                                        $post_content = str_replace(array('<br>','<BR>','<br/>','<BR/>','<br />','<BR />'), "\n", $post_content); // the XHTML touch... ;)
    448        
     448
    449449                                        $post_title = addslashes($post_title);
    450                        
     450
    451451                                        $post_status = 'publish';
    452        
     452
    453453                                        if ( $ID = post_exists($post_title, '', $post_date) ) {
    454454                                                $post_array[$i]['ID'] = $ID;
     
    510510                                }
    511511                                $status = sprintf(__('%s post(s) parsed, %s skipped...'), $postcount,  $skippedpostcount).' '.
    512                                         sprintf(__('%s comment(s) parsed, %s skipped...'), $commentcoun, $skippedcommentcount).' '.
     512                                        sprintf(__('%s comment(s) parsed, %s skipped...'), $commentcount, $skippedcommentcount).' '.
    513513                                        ' <strong>'.__('Done').'</strong>';
    514514                                $import = $this->import;
     
    547547                                                sleep(2);
    548548                                                if ( $response['code'] >= 400 )
    549                                                         die('<h1>Error restoring publishMode.</h1><p>Please tell the devs.</p>' . addslashes(print_r($response, 1)) );
     549                                                        die('<h1>'.__('Error restoring publishMode').'</h1><p>'.__('Please tell the devs.').'</p>' . addslashes(print_r($response, 1)) );
    550550                                        }
    551551                                }
     
    598598                        $this->restart();
    599599                }
    600                
     600
    601601                if ( isset($_GET['noheader']) ) {
    602602                        header('Content-Type: text/html; charset=utf-8');
    603603
    604                         $this->import = get_settings('import-blogger');
     604                        $this->import = get_option('import-blogger');
    605605
    606606                        if ( false === $this->import ) {
     
    650650                        }
    651651                        die;
    652                        
     652
    653653                } else {
    654654                        $this->greet();
     
    663663$blogger_import = new Blogger_Import();
    664664
    665 register_importer('blogger', 'Blogger', __('Import posts and comments from a Blogger account'), array ($blogger_import, 'start'));
     665register_importer('blogger', __('Blogger and Blogspot'), __('Import <strong>posts and comments</strong> from your Blogger account'), array ($blogger_import, 'start'));
    666666
    667667?>
  • branches/2.0/wp-admin/import/dotclear.php

    r3975 r4239  
    627627                echo '<p>'.__('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.').'</p>';
    628628                echo '<h3>'.__('Textile').'</h3>';
    629                 echo '<p>'.__('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 <a href="http://www.huddledmasses.org/2004/04/19/wordpress-plugin-textile-20/">Textile for WordPress</a>.  Trust me... You\'ll want it.').'</p>';
     629                echo '<p>'.__('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 <a href="http://www.huddledmasses.org/category/development/wordpress/textile/">Textile for WordPress</a>.  Trust me... You\'ll want it.').'</p>';
    630630                echo '<h3>'.__('WordPress Resources').'</h3>';
    631631                echo '<p>'.__('Finally, there are numerous WordPress resources around the internet.  Some of them are:').'</p>';
    632632                echo '<ul>';
    633633                echo '<li>'.__('<a href="http://www.wordpress.org">The official WordPress site</a>').'</li>';
    634                 echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums').'</li>';
     634                echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums</a>').'</li>';
    635635                echo '<li>'.__('<a href="http://codex.wordpress.org">The Codex (In other words, the WordPress Bible)</a>').'</li>';
    636636                echo '</ul>';
    637                 echo '<p>'.sprintf(__('That\'s it! What are you waiting for? Go <a href="%1$s">login</a>!'), '/wp-login.php').'</p>';
     637                echo '<p>'.sprintf(__('That\'s it! What are you waiting for? Go <a href="%1$s">login</a>!'), '../wp-login.php').'</p>';
    638638        }
    639639       
     
    738738
    739739$dc_import = new Dotclear_Import();
    740 register_importer('dotclear', 'Dotclear', __('Import posts from a Dotclear Blog'), array ($dc_import, 'dispatch'));
     740register_importer('dotclear', __('Dotclear'), __('Import posts from a Dotclear Blog'), array ($dc_import, 'dispatch'));
    741741?>
  • branches/2.0/wp-admin/import/greymatter.php

    r3096 r4239  
     1<?php
     2
     3class GM_Import {
     4
     5        var $gmnames = array ();
     6
     7        function header() {
     8                echo '<div class="wrap">';
     9                echo '<h2>'.__('Import Greymatter').'</h2>';
     10        }
     11
     12        function footer() {
     13                echo '</div>';
     14        }
     15
     16        function greet() {
     17                $this->header();
     18?>
     19<p><?php _e('This is a basic GreyMatter to WordPress import script.') ?></p>
     20<p><?php _e('What it does:') ?></p>
     21<ul>
     22<li><?php _e('Parses gm-authors.cgi to import (new) authors. Everyone is imported at level 1.') ?></li>
     23<li><?php _e('Parses the entries cgi files to import posts, comments, and karma on posts (although karma is not used on WordPress yet).<br />If authors are found not to be in gm-authors.cgi, imports them at level 0.') ?></li>
     24<li><?php _e("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.") ?></li>
     25</ul>
     26<p><?php _e('What it does not:') ?></p>
     27<ul>
     28<li><?php _e('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).') ?></li>
     29<li><?php _e('Import gm-templates.') ?></li>
     30<li><?php _e("Doesn't keep entries on top.")?></li>
     31</ul>
     32<p>&nbsp;</p>
     33
     34<form name="stepOne" method="get">
     35<input type="hidden" name="import" value="greymatter" />
     36<input type="hidden" name="step" value="1" />
     37<h3><?php _e('Second step: GreyMatter details:') ?></h3>
     38<p><table cellpadding="0">
     39<tr>
     40<td><?php _e('Path to GM files:') ?></td>
     41<td><input type="text" style="width:300px" name="gmpath" value="/home/my/site/cgi-bin/greymatter/" /></td>
     42</tr>
     43<tr>
     44<td><?php _e('Path to GM entries:') ?></td>
     45<td><input type="text" style="width:300px" name="archivespath" value="/home/my/site/cgi-bin/greymatter/archives/" /></td>
     46</tr>
     47<tr>
     48<td colspan="2"><br /><?php _e("This importer will search for files 00000001.cgi to 000-whatever.cgi,<br />so you need to enter the number of the last GM post here.<br />(if you don't know that number, just log into your FTP and look it out<br />in the entries' folder)") ?></td>
     49</tr>
     50<tr>
     51<td><?php _e("Last entry's number:") ?></td>
     52<td><input type="text" name="lastentry" value="00000001" /></td>
     53</tr>
     54</table>
     55</p>
     56<p><?php _e("When you're ready, click OK to start importing: ") ?><input type="submit" name="submit" value="<?php _e('OK') ?>" class="search" /></p>
     57</form>
     58<p>&nbsp</p>
     59<?php
     60                $this->footer();
     61        }
     62
     63
     64
     65        function gm2autobr($string) { // transforms GM's |*| into b2's <br />\n
     66                $string = str_replace("|*|","<br />\n",$string);
     67                return($string);
     68        }
     69       
     70        function import() {
     71                global $wpdb;
     72       
     73                $wpvarstoreset = array('gmpath', 'archivespath', 'lastentry');
     74                for ($i=0; $i<count($wpvarstoreset); $i += 1) {
     75                        $wpvar = $wpvarstoreset[$i];
     76                        if (!isset($$wpvar)) {
     77                                if (empty($_POST["$wpvar"])) {
     78                                        if (empty($_GET["$wpvar"])) {
     79                                                $$wpvar = '';
     80                                        } else {
     81                                                $$wpvar = $_GET["$wpvar"];
     82                                        }
     83                                } else {
     84                                        $$wpvar = $_POST["$wpvar"];
     85                                }
     86                        }
     87                }
     88
     89                if (!chdir($archivespath))
     90                        die(sprintf(__("Wrong path, %s\ndoesn't exist\non the server"), $archivespath));
     91
     92                if (!chdir($gmpath))
     93                        die(sprintf(__("Wrong path, %s\ndoesn't exist\non the server"), $gmpath));
     94                       
     95                $this->header();
     96?>
     97<p><?php _e('The importer is running...') ?></p>
     98<ul>
     99<li><?php _e('importing users...') ?><ul><?php
     100
     101        chdir($gmpath);
     102        $userbase = file("gm-authors.cgi");
     103
     104        foreach($userbase as $user) {
     105                $userdata=explode("|", $user);
     106
     107                $user_ip="127.0.0.1";
     108                $user_domain="localhost";
     109                $user_browser="server";
     110
     111                $s=$userdata[4];
     112                $user_joindate=substr($s,6,4)."-".substr($s,0,2)."-".substr($s,3,2)." 00:00:00";
     113
     114                $user_login=$wpdb->escape($userdata[0]);
     115                $pass1=$wpdb->escape($userdata[1]);
     116                $user_nickname=$wpdb->escape($userdata[0]);
     117                $user_email=$wpdb->escape($userdata[2]);
     118                $user_url=$wpdb->escape($userdata[3]);
     119                $user_joindate=$wpdb->escape($user_joindate);
     120
     121                $user_id = username_exists($user_login);
     122                if ($user_id) {
     123                        printf('<li>'.__('user %s').'<strong>'.__('Already exists').'</strong></li>', "<em>$user_login</em>");
     124                        $this->gmnames[$userdata[0]] = $user_id;
     125                        continue;
     126                }
     127
     128                $user_info = array("user_login"=>"$user_login", "user_pass"=>"$pass1", "user_nickname"=>"$user_nickname", "user_email"=>"$user_email", "user_url"=>"$user_url", "user_ip"=>"$user_ip", "user_domain"=>"$user_domain", "user_browser"=>"$user_browser", "dateYMDhour"=>"$user_joindate", "user_level"=>"1", "user_idmode"=>"nickname");
     129                $user_id = wp_insert_user($user_info);
     130                $this->gmnames[$userdata[0]] = $user_id;
     131               
     132                printf('<li>'.__('user %s...').' <strong>'.__('Done').'</strong></li>', "<em>$user_login</em>");
     133        }
     134
     135?></ul><strong><?php _e('Done') ?></strong></li>
     136<li><?php _e('importing posts, comments, and karma...') ?><br /><ul><?php
     137
     138        chdir($archivespath);
     139       
     140        for($i = 0; $i <= $lastentry; $i = $i + 1) {
     141               
     142                $entryfile = "";
     143               
     144                if ($i<10000000) {
     145                        $entryfile .= "0";
     146                        if ($i<1000000) {
     147                                $entryfile .= "0";
     148                                if ($i<100000) {
     149                                        $entryfile .= "0";
     150                                        if ($i<10000) {
     151                                                $entryfile .= "0";
     152                                                if ($i<1000) {
     153                                                        $entryfile .= "0";
     154                                                        if ($i<100) {
     155                                                                $entryfile .= "0";
     156                                                                if ($i<10) {
     157                                                                        $entryfile .= "0";
     158                }}}}}}}
     159
     160                $entryfile .= "$i";
     161
     162                if (is_file($entryfile.".cgi")) {
     163
     164                        $entry=file($entryfile.".cgi");
     165                        $postinfo=explode("|",$entry[0]);
     166                        $postmaincontent=$this->gm2autobr($entry[2]);
     167                        $postmorecontent=$this->gm2autobr($entry[3]);
     168
     169                        $post_author=trim($wpdb->escape($postinfo[1]));
     170
     171                        $post_title=$this->gm2autobr($postinfo[2]);
     172                        printf('<li>'.__('entry # %s : %s : by %s'), $entryfile, $post_title, $postinfo[1]);
     173                        $post_title=$wpdb->escape($post_title);
     174
     175                        $postyear=$postinfo[6];
     176                        $postmonth=zeroise($postinfo[4],2);
     177                        $postday=zeroise($postinfo[5],2);
     178                        $posthour=zeroise($postinfo[7],2);
     179                        $postminute=zeroise($postinfo[8],2);
     180                        $postsecond=zeroise($postinfo[9],2);
     181
     182                        if (($postinfo[10]=="PM") && ($posthour!="12"))
     183                                $posthour=$posthour+12;
     184
     185                        $post_date="$postyear-$postmonth-$postday $posthour:$postminute:$postsecond";
     186
     187                        $post_content=$postmaincontent;
     188                        if (strlen($postmorecontent)>3)
     189                                $post_content .= "<!--more--><br /><br />".$postmorecontent;
     190                        $post_content=$wpdb->escape($post_content);
     191
     192                        $post_karma=$postinfo[12];
     193
     194                        $post_status = 'publish'; //in greymatter, there are no drafts
     195                        $comment_status = 'open';
     196                        $ping_status = 'closed';
     197                       
     198                        if ($post_ID = post_exists($post_title, '', $post_date)) {
     199                                echo ' ';
     200                                _e('(already exists)');
     201                        } else {
     202                                //just so that if a post already exists, new users are not created by checkauthor
     203                                // we'll check the author is registered, or if it's a deleted author
     204                                $user_id = username_exists($post_author);
     205                                if (!$user_id) {        // if deleted from GM, we register the author as a level 0 user
     206                                        $user_ip="127.0.0.1";
     207                                        $user_domain="localhost";
     208                                        $user_browser="server";
     209                                        $user_joindate="1979-06-06 00:41:00";
     210                                        $user_login=$wpdb->escape($post_author);
     211                                        $pass1=$wpdb->escape("password");
     212                                        $user_nickname=$wpdb->escape($post_author);
     213                                        $user_email=$wpdb->escape("user@deleted.com");
     214                                        $user_url=$wpdb->escape("");
     215                                        $user_joindate=$wpdb->escape($user_joindate);
     216                                       
     217                                        $user_info = array("user_login"=>$user_login, "user_pass"=>$pass1, "user_nickname"=>$user_nickname, "user_email"=>$user_email, "user_url"=>$user_url, "user_ip"=>$user_ip, "user_domain"=>$user_domain, "user_browser"=>$user_browser, "dateYMDhour"=>$user_joindate, "user_level"=>0, "user_idmode"=>"nickname");
     218                                        $user_id = wp_insert_user($user_info);
     219                                        $this->gmnames[$postinfo[1]] = $user_id;
     220                                       
     221                                        echo ': ';
     222                                        printf(__('registered deleted user %s at level 0 '), "<em>$user_login</em>");
     223                                }
     224                       
     225                                if (array_key_exists($postinfo[1], $this->gmnames)) {
     226                                        $post_author = $this->gmnames[$postinfo[1]];
     227                                } else {
     228                                        $post_author = $user_id;
     229                                }
     230                       
     231                                $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'comment_status', 'ping_status', 'post_modified', 'post_modified_gmt');
     232                                $post_ID = wp_insert_post($postdata);
     233                        }
     234
     235                        $c=count($entry);
     236                        if ($c>4) {
     237                                $numAddedComments = 0;
     238                                $numComments = 0;
     239                                for ($j=4;$j<$c;$j++) {
     240                                        $entry[$j]=$this->gm2autobr($entry[$j]);
     241                                        $commentinfo=explode("|",$entry[$j]);
     242                                        $comment_post_ID=$post_ID;
     243                                        $comment_author=$wpdb->escape($commentinfo[0]);
     244                                        $comment_author_email=$wpdb->escape($commentinfo[2]);
     245                                        $comment_author_url=$wpdb->escape($commentinfo[3]);
     246                                        $comment_author_IP=$wpdb->escape($commentinfo[1]);
     247
     248                                        $commentyear=$commentinfo[7];
     249                                        $commentmonth=zeroise($commentinfo[5],2);
     250                                        $commentday=zeroise($commentinfo[6],2);
     251                                        $commenthour=zeroise($commentinfo[8],2);
     252                                        $commentminute=zeroise($commentinfo[9],2);
     253                                        $commentsecond=zeroise($commentinfo[10],2);
     254                                        if (($commentinfo[11]=="PM") && ($commenthour!="12"))
     255                                                $commenthour=$commenthour+12;
     256                                        $comment_date="$commentyear-$commentmonth-$commentday $commenthour:$commentminute:$commentsecond";
     257
     258                                        $comment_content=$wpdb->escape($commentinfo[12]);
     259
     260                                        if (!comment_exists($comment_author, $comment_date)) {
     261                                                $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_author_email', 'comment_author_IP', 'comment_date', 'comment_content', 'comment_approved');
     262                                                $commentdata = wp_filter_comment($commentdata);
     263                                                wp_insert_comment($commentdata);
     264                                                $numAddedComments++;
     265                                        }
     266                                        $numComments++;
     267                                }
     268                                if ($numAddedComments > 0) {
     269                                        echo ': ';
     270                                        printf(__('imported %d comment(s)'), $numAddedComments);
     271                                }
     272                                $preExisting = $numComments - numAddedComments;
     273                                if ($preExisting > 0) {
     274                                        echo ' ';
     275                                        printf(__('ignored %d pre-existing comments'), $preExisting);
     276                                }
     277                        }
     278                        echo '... <strong>'.__('Done').'</strong></li>';
     279                }
     280        }
     281        ?>
     282</ul><strong><?php _e('Done') ?></strong></li></ul>
     283<p>&nbsp;</p>
     284<p><?php _e('Completed Greymatter import!') ?></p>
     285<?php
     286        $this->footer();
     287        }
     288
     289        function dispatch() {
     290                if (empty ($_GET['step']))
     291                        $step = 0;
     292                else
     293                        $step = (int) $_GET['step'];
     294
     295                switch ($step) {
     296                        case 0 :
     297                                $this->greet();
     298                                break;
     299                        case 1:
     300                                $this->import();
     301                                break;
     302                }
     303        }
     304
     305        function GM_Import() {
     306                // Nothing.     
     307        }
     308}
     309
     310$gm_import = new GM_Import();
     311
     312register_importer('greymatter', __('Greymatter'), __('Import posts and comments from your Greymatter blog'), array ($gm_import, 'dispatch'));
     313?>
  • branches/2.0/wp-admin/import/livejournal.php

    r3405 r4239  
    168168$livejournal_import = new LJ_Import();
    169169
    170 register_importer('livejournal', 'LiveJournal', __('Import posts from LiveJournal'), array ($livejournal_import, 'dispatch'));
     170register_importer('livejournal', __('LiveJournal'), __('Import posts from LiveJournal'), array ($livejournal_import, 'dispatch'));
    171171?>
  • branches/2.0/wp-admin/import/mt.php

    r3786 r4239  
    1212        function header() {
    1313                echo '<div class="wrap">';
    14                 echo '<h2>'.__('Import Movable Type').'</h2>';
     14                echo '<h2>'.__('Import Movable Type and Typepad').'</h2>';
    1515        }
    1616
     
    3333                $users = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY ID");
    3434?><select name="userselect[<?php echo $n; ?>]">
    35         <option value="#NONE#">- Select -</option>
     35        <option value="#NONE#"><?php _e('- Select -') ?></option>
    3636        <?php
    3737
     
    135135        function mt_authors_form() {
    136136?>
     137<div class="wrap">
     138<h2><?php _e('Assign Authors'); ?></h2>
    137139<p><?php _e('To make it easier for you to edit and save the imported posts and drafts, you may want to change the name of the author of the posts. For example, you may want to import all the entries as <code>admin</code>s entries.'); ?></p>
    138140<p><?php _e('Below, you can see the names of the authors of the MovableType posts in <i>italics</i>. For each of these names, you can either pick an author in your WordPress installation from the menu, or enter a name for the author in the textbox.'); ?></p>
     
    147149                foreach ($authors as $author) {
    148150                        ++ $j;
    149                         echo '<li><i>'.$author.'</i><br />'.'<input type="text" value="'.$author.'" name="'.'user[]'.'" maxlength="30">';
     151                        echo '<li>'.__('Current author:').' <strong>'.$author.'</strong><br />'.sprintf(__('Create user %1$s or map to existing'), ' <input type="text" value="'.$author.'" name="'.'user[]'.'" maxlength="30"> <br />');
    150152                        $this->users_form($j);
    151153                        echo '</li>';
    152154                }
    153155
    154                 echo '<input type="submit" value="Submit">'.'<br/>';
     156                echo '<input type="submit" value="'.__('Submit').'">'.'<br/>';
    155157                echo '</form>';
    156                 echo '</ol>';
    157 
    158                 flush();
     158                echo '</ol></div>';
     159
    159160        }
    160161
     
    162163                $file = wp_import_handle_upload();
    163164                if ( isset($file['error']) ) {
    164                         echo $file['error'];
     165                        $this->header();
     166                        echo '<p>'.__('Sorry, there has been an error').'.</p>';
     167                        echo '<p><strong>' . $file['error'] . '</strong></p>';
     168                        $this->footer();
    165169                        return;
    166170                }
     
    175179                global $wpdb;
    176180                $i = -1;
    177                 echo "<ol>";
     181                echo "<div class='wrap'><ol>";
    178182                foreach ($this->posts as $post) {
    179183                        if ('' != trim($post)) {
     
    331335                                }
    332336                                if ( $num_comments )
    333                                         printf(__('(%s comments)'), $num_comments);
     337                                        printf(' '.__('(%s comments)'), $num_comments);
    334338
    335339                                // Finally the pings
     
    379383                                }
    380384                                if ( $num_pings )
    381                                         printf(__('(%s pings)'), $num_pings);
    382                                
     385                                        printf(' '.__('(%s pings)'), $num_pings);
     386
    383387                                echo "</li>";
    384388                        }
    385                         flush();
    386389                }
    387390
     
    390393                wp_import_cleanup($this->id);
    391394
    392                 echo '<h3>'.sprintf(__('All done. <a href="%s">Have fun!</a>'), get_option('home')).'</h3>';
     395                echo '<h3>'.sprintf(__('All done. <a href="%s">Have fun!</a>'), get_option('home')).'</h3></div>';
    393396        }
    394397
    395398        function import() {
    396399                $this->id = (int) $_GET['id'];
     400               
    397401                $this->file = get_attached_file($this->id);
    398402                $this->get_authors_from_post();
     
    421425
    422426        function MT_Import() {
    423                 // Nothing.     
     427                // Nothing.
    424428        }
    425429}
     
    427431$mt_import = new MT_Import();
    428432
    429 register_importer('mt', 'Movable Type', __('Import posts and comments from your Movable Type blog'), array ($mt_import, 'dispatch'));
     433register_importer('mt', __('Movable Type and Typepad'), __('Imports <strong>posts and comments</strong> from your Movable Type or Typepad blog'), array ($mt_import, 'dispatch'));
    430434?>
  • branches/2.0/wp-admin/import/rss.php

    r4237 r4239  
    169169$rss_import = new RSS_Import();
    170170
    171 register_importer('rss', 'RSS', __('Import posts from an RSS feed'), array ($rss_import, 'dispatch'));
     171register_importer('rss', __('RSS'), __('Import posts from an RSS feed'), array ($rss_import, 'dispatch'));
    172172?>
  • branches/2.0/wp-admin/import/textpattern.php

    r3975 r4239  
    556556                echo '<p>'.__('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.').'</p>';
    557557                echo '<h3>'.__('Textile').'</h3>';
    558                 echo '<p>'.__('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 <a href="http://www.huddledmasses.org/2004/04/19/wordpress-plugin-textile-20/">Textile for WordPress</a>.  Trust me... You\'ll want it.').'</p>';
     558                echo '<p>'.__('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 <a href="http://www.huddledmasses.org/category/development/wordpress/textile/">Textile for WordPress</a>.  Trust me... You\'ll want it.').'</p>';
    559559                echo '<h3>'.__('WordPress Resources').'</h3>';
    560560                echo '<p>'.__('Finally, there are numerous WordPress resources around the internet.  Some of them are:').'</p>';
    561561                echo '<ul>';
    562562                echo '<li>'.__('<a href="http://www.wordpress.org">The official WordPress site</a>').'</li>';
    563                 echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums').'</li>';
     563                echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums</a>').'</li>';
    564564                echo '<li>'.__('<a href="http://codex.wordpress.org">The Codex (In other words, the WordPress Bible)</a>').'</li>';
    565565                echo '</ul>';
     
    660660
    661661$txp_import = new Textpattern_Import();
    662 register_importer('textpattern', 'Textpattern', __('Import posts from a Textpattern Blog'), array ($txp_import, 'dispatch'));
     662register_importer('textpattern', __('Textpattern'), __('Import posts from a Textpattern Blog'), array ($txp_import, 'dispatch'));
    663663?>
  • branches/2.0/wp-admin/post.php

    r4058 r4239  
    8282        <div id='preview' class='wrap'>
    8383        <h2 id="preview-post"><?php _e('Post Preview (updated when post is saved)'); ?> <small class="quickjump"><a href="#write-post"><?php _e('edit &uarr;'); ?></a></small></h2>
    84                 <iframe src="<?php echo add_query_arg('preview', 'true', get_permalink($post->ID)); ?>" width="100%" height="600" ></iframe>
     84                <iframe src="<?php echo apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID))); ?>" width="100%" height="600" ></iframe>
    8585        </div>
    8686        <?php
  • branches/2.0/wp-includes/classes.php

    r4232 r4239  
    823823                        }
    824824                }
    825                 echo "<div class='updated'><p>$cnt comment";
    826                 if ($cnt != 1 ) echo "s";
    827                 echo " moved to the moderation queue.</p></div>\n";
     825                echo "<div class='updated'><p> ";
     826                printf(__('%d comment(s) moved to the moderation queue.'), $cnt);
     827                echo "</p></div>\n";
    828828        }       // End function move_spam
    829829
     
    854854                $numqueue = $counters[in_queue];
    855855
    856                 $body = '<p>' . sprintf(__('Suspected spam comments: <strong>%s</strong>'), $numfound) . '</p>';
     856                $body = '<p>' . sprintf(__('Suspected spam comments: %s'), "<strong>$numfound</strong>") . '</p>';
    857857
    858858                if ( count($counters[found]) > 0 ) {
Note: See TracChangeset for help on using the changeset viewer.