WordPress.org

Make WordPress Core

Changeset 5228


Ignore:
Timestamp:
04/10/07 09:27:50 (7 years ago)
Author:
rob1n
Message:

Fix some i18n and typographical stuff in the UTW importer. Props nbachiyski. fixes #4121

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/utw.php

    r5213 r5228  
    33class UTW_Import { 
    44     
    5     function header()  
    6     { 
     5    function header()  { 
    76        echo '<div class="wrap">'; 
    87        echo '<h2>'.__('Import Ultimate Tag Warrior').'</h2>'; 
     
    109    } 
    1110 
    12     function footer()  
    13     { 
     11    function footer() { 
    1412        echo '</div>'; 
    1513    } 
     
    1715    function greet() { 
    1816        echo '<div class="narrow">'; 
    19         echo '<p>'.__('Howdy! This imports tags from an existing Ultimate Tag Warrior 3 installation into this blog using the new Wordpress-native tagging structure.').'</p>'; 
     17        echo '<p>'.__('Howdy! This imports tags from an existing Ultimate Tag Warrior 3 installation into this blog using the new WordPress native tagging structure.').'</p>'; 
    2018        echo '<p>'.__('This has not been tested on any other versions of Ultimate Tag Warrior. Mileage may vary.').'</p>'; 
    21         echo '<p>'.__('To accomodate larger databases for those tag-crazy authors out there, we\'ve made this into an easy 5-step program to help you kick that nasty UTW habit. Just keep clicking along and we\'ll let you know when you\'re in the clear!').'</p>'; 
    22         echo '<p>'.__('<strong>Don\'t be stupid - backup your database before proceeding!</strong>').'</p>'; 
     19        echo '<p>'.__('To accommodate larger databases for those tag-crazy authors out there, we have made this into an easy 5-step program to help you kick that nasty UTW habit. Just keep clicking along and we will let you know when you are in the clear!').'</p>'; 
     20        echo '<p><strong>'.__('Don&#8217;t be stupid - backup your database before proceeding!').'</strong></p>'; 
    2321        echo '<form action="admin.php?import=utw&amp;step=1" method="post">'; 
    24         echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 1').' &raquo;" /></p>'; 
    25         echo '</form>'; 
    26         echo '</div>'; 
    27     } 
    28      
    29      
    30     function dispatch ( ) { 
    31          
     22        echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 1 &raquo;').'" /></p>'; 
     23        echo '</form>'; 
     24        echo '</div>'; 
     25    } 
     26     
     27     
     28    function dispatch () { 
    3229        if ( empty( $_GET['step'] ) ) { 
    3330            $step = 0; 
    34         } 
    35         else { 
     31        } else { 
    3632            $step = (int) $_GET['step']; 
    3733        } 
     
    4137         
    4238        switch ( $step ) { 
    43  
    4439            case 0 : 
    4540                $this->greet(); 
    4641                break; 
    47  
    4842            case 1 : 
    4943                $this->import_tags(); 
    5044                break; 
    51                  
    5245            case 2 : 
    5346                $this->import_posts(); 
    5447                break; 
    55                  
    5648            case 3: 
    5749                $this->import_t2p(); 
    5850                break; 
    59                  
    6051            case 4: 
    6152                $this->cleanup_import(); 
    6253                break; 
    63  
    6454        } 
    6555         
    6656        // load the footer 
    6757        $this->footer(); 
    68          
    6958    } 
    7059     
    7160     
    7261    function import_tags ( ) { 
    73          
    74         echo '<div class="narrow">'; 
    75         echo '<p><h3>'.__('Reading UTW Tags...').'</h3></p>'; 
     62        echo '<div class="narrow">'; 
     63        echo '<p><h3>'.__('Reading UTW Tags&#8230;').'</h3></p>'; 
    7664         
    7765        $tags = $this->get_utw_tags(); 
     
    9482            $count = count($tags); 
    9583             
    96             echo '<p>' . sprintf( __('Done! <strong>%1$d</strong> tags were read.'), $count ) . '<br /></p>'; 
     84            echo '<p>' . sprintf( __('Done! <strong>%s</strong> tags were read.'), $count ) . '<br /></p>'; 
    9785            echo '<p>' . __('The following tags were found:') . '</p>'; 
    9886             
     
    10997            echo '<br />'; 
    11098             
    111             echo '<p>' . __('If you don\'t want to import any of these tags, you should delete them from the UTW tag management page and then re-run this import.') . '</p>'; 
     99            echo '<p>' . __('If you don&#8217;t want to import any of these tags, you should delete them from the UTW tag management page and then re-run this import.') . '</p>'; 
    112100             
    113101             
     
    115103         
    116104        echo '<form action="admin.php?import=utw&amp;step=2" method="post">'; 
    117         echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 2').' &raquo;" /></p>'; 
    118         echo '</form>'; 
    119         echo '</div>'; 
    120          
     105        echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 2 &raquo;').'" /></p>'; 
     106        echo '</form>'; 
     107        echo '</div>'; 
    121108    } 
    122109     
    123110     
    124111    function import_posts ( ) { 
    125  
    126         echo '<div class="narrow">'; 
    127         echo '<p><h3>'.__('Reading UTW Post Tags...').'</h3></p>'; 
     112        echo '<div class="narrow">'; 
     113        echo '<p><h3>'.__('Reading UTW Post Tags&#8230;').'</h3></p>'; 
    128114 
    129115        // read in all the UTW tag -> post settings 
     
    132118        // if we didn't get any tags back, that's all there is folks! 
    133119        if ( !is_array($posts) ) { 
    134             echo '<p>' . __('No Posts were found to have tags!') . '</p>'; 
     120            echo '<p>' . __('No posts were found to have tags!') . '</p>'; 
    135121            return false; 
    136122        } 
     
    147133            $count = count($posts); 
    148134                 
    149             echo '<p>' . sprintf( __('Done! <strong>%1$d</strong> tag to post relationships were read.'), $count ) . '<br /></p>'; 
     135            echo '<p>' . sprintf( __('Done! <strong>%s</strong> tag to post relationships were read.'), $count ) . '<br /></p>'; 
    150136                 
    151137        } 
    152138 
    153139        echo '<form action="admin.php?import=utw&amp;step=3" method="post">'; 
    154         echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 3').' &raquo;" /></p>'; 
     140        echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 3 &raquo;').'" /></p>'; 
    155141        echo '</form>'; 
    156142        echo '</div>'; 
     
    162148 
    163149        echo '<div class="narrow">'; 
    164         echo '<p><h3>'.__('Adding Tags to Posts...').'</h3></p>'; 
     150        echo '<p><h3>'.__('Adding Tags to Posts&#8230;').'</h3></p>'; 
    165151 
    166152        // run that funky magic! 
    167153        $tags_added = $this->tag2post(); 
    168154         
    169         echo '<p>' . sprintf( __('Done! <strong>%1$d</strong> tags where added!'), $tags_added ) . '<br /></p>'; 
     155        echo '<p>' . sprintf( __('Done! <strong>%s</strong> tags where added!'), $tags_added ) . '<br /></p>'; 
    170156 
    171157        echo '<form action="admin.php?import=utw&amp;step=4" method="post">'; 
    172         echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 4').' &raquo;" /></p>'; 
     158        echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 4 &raquo;').'" /></p>'; 
    173159        echo '</form>'; 
    174160        echo '</div>'; 
     
    258244        echo '<p><h3>'.__('Import Complete!').'</h3></p>'; 
    259245         
    260         echo '<p>' . __('OK, so we lied about this being a 5-step program! You\'re done!') . '</p>'; 
    261          
    262         echo '<p>' . __('Now wasn\'t that easy?') . '</p>'; 
     246        echo '<p>' . __('OK, so we lied about this being a 5-step program! You&#8217;re done!') . '</p>'; 
     247         
     248        echo '<p>' . __('Now wasn&#8217;t that easy?') . '</p>'; 
    263249         
    264250        echo '</div>'; 
     
    280266 
    281267// add it to the import page! 
    282 register_importer('utw', 'Ultimate Tag Warrior', __('Import Ultimate Tag Warrior tags into the new native tagging structure.'), array ($utw_import, 'dispatch')); 
     268register_importer('utw', 'Ultimate Tag Warrior', __('Import Ultimate Tag Warrior tags into the new native tagging structure.'), array($utw_import, 'dispatch')); 
    283269 
    284270?> 
Note: See TracChangeset for help on using the changeset viewer.