Make WordPress Core


Ignore:
Timestamp:
04/22/2004 11:32:34 PM (21 years ago)
Author:
rboren
Message:

Mark strings for translation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/categories.php

    r1108 r1130  
    11<?php
    2 $title = 'Categories';
     2require_once('../wp-includes/wp-l10n.php');
     3
     4$title = __('Categories');
    35/* <Categories> */
    46
     
    4446   
    4547    if ($user_level < 3)
    46         die ('Cheatin&#8217; uh?');
     48        die (__('Cheatin&#8217; uh?'));
    4749   
    4850    $cat_name= addslashes(stripslashes(stripslashes($_POST['cat_name'])));
     
    6971
    7072    if (1 == $cat_ID)
    71         die("Can't delete the <strong>$cat_name</strong> category: this is the default one");
     73        die(sprintf(__("Can't delete the <strong>%s</strong> category: this is the default one"), $cat_name));
    7274
    7375    if ($user_level < 3)
    74         die ('Cheatin&#8217; uh?');
     76        die (__('Cheatin&#8217; uh?'));
    7577
    7678    $wpdb->query("DELETE FROM $tablecategories WHERE cat_ID = $cat_ID");
     
    9092
    9193<div class="wrap">
    92     <h2>Edit Category</h2>
     94    <h2><?php _e('Edit Category') ?></h2>
    9395    <form name="editcat" action="categories.php" method="post">
    9496        <input type="hidden" name="action" value="editedcat" />
    9597        <input type="hidden" name="cat_ID" value="<?php echo $_GET['cat_ID'] ?>" />
    96         <p>Category name:<br />
     98        <p><?php _e('Category name:') ?><br />
    9799        <input type="text" name="cat_name" value="<?php echo $cat_name; ?>" /></p>
    98         <p>Category parent:<br />
     100        <p><?php _e('Category parent:') ?><br />
    99101        <select name='cat' class='postform'>
    100102        <option value='0'<?php if (!$category->category_parent) echo " selected='selected'"; ?>>None</option>
     
    102104        </select>
    103105        </p>
    104         <p>Description:<br />
     106
     107        <p><?php _e('Description:') ?><br />
    105108        <textarea name="category_description" rows="5" cols="50" style="width: 97%;"><?php echo htmlentities($category->category_description); ?></textarea></p>
    106         <p><input type="submit" name="submit" value="Edit it!" class="search" /></p>
     109        <p><input type="submit" name="submit" value="<?php _e('Edit it!') ?>" class="search" /></p>
    107110    </form>
    108111</div>
     
    118121
    119122    if ($user_level < 3)
    120         die ('Cheatin&#8217; uh?');
     123        die (__('Cheatin&#8217; uh?'));
    121124   
    122125    $cat_name = addslashes(stripslashes(stripslashes($_POST['cat_name'])));
     
    136139    require_once ('admin-header.php');
    137140    if ($user_level < 3) {
    138         die("You have no right to edit the categories for this blog.<br />Ask for a promotion to your <a href='mailto:" . get_settings('admin_email'). "'>blog admin</a>. :)");
     141        die(sprintf(__("You have no right to edit the categories for this blog.<br />Ask for a promotion to your <a href='mailto:%s'>blog admin</a>. :)"), get_settings('admin_email')));
    139142    }
    140143    ?>
    141144
    142145<div class="wrap">
    143 <h2>Current Categories (<a href="#addcat">add new</a>) </h2>
     146     <h2><?php printf(__('Current Categories (<a href="%s">add new</a>)'), '#addcat') ?> </h2>
    144147<table width="100%" cellpadding="3" cellspacing="3">
    145148    <tr>
    146         <th scope="col">Name</th>
    147         <th scope="col">Description</th>
    148         <th scope="col"># Posts</th>
    149         <th colspan="2">Action</th>
     149        <th scope="col"><?php _e('Name') ?></th>
     150        <th scope="col"><?php _e('Description') ?></th>
     151        <th scope="col"><?php _e('# Posts') ?></th>
     152        <th colspan="2"><?php _e('Action') ?></th>
    150153    </tr>
    151154<?php
     
    157160
    158161<div class="wrap">
    159   <p><strong>Note:</strong><br />
    160     Deleting a category does not delete posts from that category, it will just
    161     set them back to the default category <strong><?php echo get_catname(1) ?></strong>.
     162    <p><?php printf(__('<strong>Note:</strong><br />
     163Deleting a category does not delete posts from that category, it will just
     164set them back to the default category <strong>%s</strong>.'), get_catname(1)) ?>
    162165  </p>
    163166</div>
    164167
    165168<div class="wrap">
    166     <h2>Add New Category</h2>
     169    <h2><?php _e('Add New Category') ?></h2>
    167170    <form name="addcat" id="addcat" action="categories.php" method="post">
    168171       
    169         <p>Name:<br />
     172        <p><?php _e('Name:') ?><br />
    170173        <input type="text" name="cat_name" value="" /></p>
    171         <p>Category parent:<br />
     174        <p><?php _e('Category parent:') ?><br />
    172175        <select name='cat' class='postform'>
    173         <option value='0'>None</option>
     176        <option value='0'><?php _e('None') ?></option>
    174177        <?php wp_dropdown_cats(); ?></p>
    175178        </select>
    176         <p>Description: (optional) <br />
     179        <p><?php _e('Description: (optional)') ?> <br />
    177180        <textarea name="category_description" rows="5" cols="50" style="width: 97%;"></textarea></p>
    178         <p><input type="hidden" name="action" value="addcat" /><input type="submit" name="submit" value="Add" class="search" /></p>
     181        <p><input type="hidden" name="action" value="addcat" /><input type="submit" name="submit" value="<?php _e('Add') ?>" class="search" /></p>
    179182    </form>
    180183</div>
Note: See TracChangeset for help on using the changeset viewer.