Make WordPress Core

Changeset 1141


Ignore:
Timestamp:
04/24/2004 04:47:27 AM (22 years ago)
Author:
rboren
Message:

Mark strings for translation.

File:
1 edited

Legend:

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

    r872 r1141  
    11<?php
    2 $title = 'Posts';
     2require_once('../wp-includes/wp-l10n.php');
     3
     4$title = __('Posts');
    35require_once('admin-header.php');
    46
    57?>
    68 <ul id="adminmenu2">
    7   <li><a href="edit.php" class="current">Posts</a></li>
    8   <li><a href="edit-comments.php">Comments</a></li>
    9   <li class="last"><a href="moderation.php">Awaiting Moderation</a></li>
     9  <li><a href="edit.php" class="current"><?php _e('Posts') ?></a></li>
     10  <li><a href="edit-comments.php"><?php _e('Comments') ?></a></li>
     11  <li class="last"><a href="moderation.php"><?php _e('Awaiting Moderation') ?></a></li>
    1012</ul>
    1113<?php
     
    1517    ?>
    1618<div class="wrap">
    17   <p><strong>Your Drafts:</strong>
     19    <p><strong><?php _e('Your Drafts:') ?></strong>
    1820    <?php
    1921    $i = 0;
     
    2325        $draft->post_title = stripslashes($draft->post_title);
    2426        if ($draft->post_title == '')
    25             $draft->post_title = 'Post #'.$draft->ID;
    26         echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='Edit this draft'>$draft->post_title</a>";
     27            $draft->post_title = sprintf(__('Post #%s'), $draft->ID);
     28        echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";
    2729        ++$i;
    2830        }
     
    3638<form name="searchform" action="" method="get">
    3739  <fieldset>
    38   <legend>Show Posts That Contain...</legend>
     40  <legend><?php _e('Show Posts That Contain...') ?></legend>
    3941  <input type="text" name="s" value="<?php echo $s; ?>" size="17" />
    40   <input type="submit" name="submit" value="Search"  />
     42  <input type="submit" name="submit" value="<?php _e('Search') ?>"  />
    4143  </fieldset>
    4244</form>
    4345<table width="100%" cellpadding="3" cellspacing="3">
    4446  <tr>
    45     <th scope="col">ID</th>
    46     <th scope="col">When</th>
    47     <th scope="col">Title</th>
    48     <th scope="col">Categories</th>
    49     <th scope="col">Comments</th>
    50     <th scope="col">Author</th>
    51     <th scope="col">Edit</th>
    52     <th scope="col">Delete</th>
     47    <th scope="col"><?php _e('ID') ?></th>
     48    <th scope="col"><?php _e('When') ?></th>
     49    <th scope="col"><?php _e('Title') ?></th>
     50    <th scope="col"><?php _e('Categories') ?></th>
     51    <th scope="col"><?php _e('Comments') ?></th>
     52    <th scope="col"><?php _e('Author') ?></th>
     53    <th scope="col"><?php _e('Edit') ?></th>
     54    <th scope="col"><?php _e('Delete') ?></th>
    5355  </tr>
    5456  <?php
     
    6567      <?php the_title() ?>
    6668      </a>
    67       <?php if ('private' == $post->post_status) echo ' - <strong>Private</strong>'; ?></td>
     69    <?php if ('private' == $post->post_status) _e(' - <strong>Private</strong>'); ?></td>
    6870    <td><?php the_category(','); ?></td>
    6971    <td><a href="edit.php?p=<?php echo $id ?>&c=1">
    70       <?php comments_number('no comments', '1 comment', "% comments") ?>
     72      <?php comments_number(__('no comments'), __('1 comment'), __("% comments")) ?>
    7173      </a></td>
    7274    <td><?php the_author() ?></td>
    73     <td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>Edit</a>"; } ?></td>
    74     <td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "<a href='post.php?action=delete&amp;post=$id' class='delete' onclick=\"return confirm('You are about to delete this post \'".the_title('','',0)."\'\\n  \'OK\' to delete, \'Cancel\' to stop.')\">Delete</a>"; } ?></td>
     75    <td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
     76    <td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "<a href='post.php?action=delete&amp;post=$id' class='delete' onclick=\"return confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n  \'OK\' to delete, \'Cancel\' to stop."), the_title('','',0)) . "')\">" . __('Delete') . "</a>"; } ?></td>
    7577  </tr>
    7678<?php
     
    7981?>
    8082  <tr style='background-color: <?php echo $bgcolor; ?>'>
    81     <td colspan="8">No posts found.</td>
     83    <td colspan="8"><?php _e('No posts found.') ?></td>
    8284  </tr>
    8385<?php
     
    9193    if ($comments) {
    9294    ?>
    93 <h3>Comments</h3>
     95<h3><?php _e('Comments') ?></h3>
    9496<ol id="comments">
    9597<?php
     
    104106  <?php
    105107            if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
    106                 echo "[ <a href=\"post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">Edit</a>";
    107                 echo " - <a href=\"post.php?action=deletecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n  \'OK\' to delete, \'Cancel\' to stop.')\">Delete</a> ";
     108                echo "[ <a href=\"post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">" .  __('Edit') . "</a>";
     109                echo " - <a href=\"post.php?action=deletecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n  \'OK\' to delete, \'Cancel\' to stop."), $comment->comment_author) . "')\">" . __('Delete') . "</a> ";
    108110                if ( ('none' != $comment_status) && ($user_level >= 3) ) {
    109111                    if ('approved' == wp_get_comment_status($comment->comment_ID)) {
    110                         echo " - <a href=\"post.php?action=unapprovecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">Unapprove</a> ";
     112                        echo " - <a href=\"post.php?action=unapprovecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">" . __('Unapprove') . "</a> ";
    111113                    } else {
    112                         echo " - <a href=\"post.php?action=approvecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">Approve</a> ";
     114                        echo " - <a href=\"post.php?action=approvecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">" . __('Approve') . "</a> ";
    113115                    }
    114116                }
     
    135137    }//end if comments
    136138    ?>
    137     <p><a href="edit.php">Back to posts</a></p>
     139    <p><a href="edit.php"><?php _e('Back to posts') ?></a></p>
    138140<?php } ?>
    139141</div>
Note: See TracChangeset for help on using the changeset viewer.