Make WordPress Core


Ignore:
Timestamp:
04/20/2004 04:15:18 AM (21 years ago)
Author:
rboren
Message:

Mark strings for translation.

File:
1 edited

Legend:

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

    r1094 r1106  
    11<?php
    22/* <Edit> */
     3
     4require_once('../wp-includes/wp-l10n.php');
    35
    46function add_magic_quotes($array) {
     
    8587
    8688        if ($user_level == 0)
    87             die ('Cheatin&#8217; uh?');
     89            die (__('Cheatin&#8217; uh?'));
    8890
    8991        if (($user_level > 4) && (!empty($HTTP_POST_VARS['edit_date']))) {
     
    213215
    214216    case 'edit':
    215         $title = 'Edit';
     217        $title = __('Edit');
    216218
    217219        $standalone = 0;
     
    246248            ?>
    247249    <div id='preview' class='wrap'>
    248             <h2>Post Preview (updated when post is saved)</h2>
    249      <h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    250     <div class="meta">Filed under: <?php the_category() ?> &#8212; <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
     250         <h2><?php _e('Post Preview (updated when post is saved)'); ?></h2>
     251                                                                            <h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="<?php printf(__("Permanent Link: %s"), the_title()); ?>"><?php the_title(); ?></a></h3>
     252                                                                                                                                                                                                                                                                                        <div class="meta"><?php printf(__("Filed under: %s"), the_category()); ?> &#8212; <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    251253   
    252254    <div class="storycontent">
     
    257259        } else {
    258260?>
    259             <p>Since you&#8217;re a newcomer, you&#8217;ll have to wait for an admin to raise your level to 1,
    260             in order to be authorized to post.<br />
    261             You can also <a href="mailto:<?php echo get_settings('admin_email'); ?>?subject=Promotion?">e-mail the admin</a>
    262             to ask for a promotion.<br />
    263             When you&#8217;re promoted, just reload this page and you&#8217;ll be able to blog. :)
     261            <p><?php printf(__('Since you&#8217;re a newcomer, you&#8217;ll have to wait for an admin to raise your level to 1, in order to be authorized to post.<br />
     262You can also <a href="mailto:%s?subject=Promotion?">e-mail the admin</a> to ask for a promotion.<br />
     263When you&#8217;re promoted, just reload this page and you&#8217;ll be able to blog. :)'), get_settings('admin_email')); ?>
    264264            </p>
    265265<?php
     
    273273
    274274        if ($user_level == 0)
    275             die ('Cheatin&#8217; uh?');
     275            die (__('Cheatin&#8217; uh?'));
    276276
    277277        if (!isset($blog_ID)) {
     
    418418
    419419        $post_id = intval($HTTP_GET_VARS['post']);
    420         $postdata = get_postdata($post_id) or die('Oops, no post with this ID. <a href="post.php">Go back</a>!');
     420        $postdata = get_postdata($post_id) or die(sprintf(__('Oops, no post with this ID. <a href="%s">Go back</a>!'), 'post.php'));
    421421        $authordata = get_userdata($postdata['Author_ID']);
    422422
    423423        if ($user_level < $authordata->user_level)
    424             die ('You don&#8217;t have the right to delete <strong>'.$authordata[1].'</strong>&#8217;s posts.');
     424            die (sprintf(__('You don&#8217;t have the right to delete <strong>%s</strong>&#8217;s posts.'), $authordata[1]));
    425425
    426426        // send geoURL ping to "erase" from their DB
     
    435435        $result = $wpdb->query("DELETE FROM $tableposts WHERE ID=$post_id");
    436436        if (!$result)
    437             die('Error in deleting...');
     437            die(__('Error in deleting...'));
    438438
    439439        $result = $wpdb->query("DELETE FROM $tablecomments WHERE comment_post_ID=$post_id");
     
    452452
    453453    case 'editcomment':
    454         $title = 'Edit Comment';
     454        $title = __('Edit Comment');
    455455        $standalone = 0;
    456456        $parent_file = 'edit.php';
     
    460460
    461461        if ($user_level == 0) {
    462             die ('Cheatin&#8217; uh?');
     462            die (__('Cheatin&#8217; uh?'));
    463463        }
    464464
    465465        $comment = $HTTP_GET_VARS['comment'];
    466         $commentdata = get_commentdata($comment, 1, true) or die('Oops, no comment with this ID. <a href="javascript:history.go(-1)">Go back</a>!');
     466        $commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'javascript:history.go(-1)'));
    467467        $content = $commentdata['comment_content'];
    468468        $content = format_to_edit($content);
     
    478478   
    479479    if ($user_level == 0)
    480         die ('Cheatin&#8217; uh?');
     480        die (__('Cheatin&#8217; uh?'));
    481481   
    482482    $comment = $HTTP_GET_VARS['comment'];
    483483    $p = $HTTP_GET_VARS['p'];
    484     $commentdata = get_commentdata($comment, 1, true) or die('Oops, no comment with this ID. <a href="edit.php">Go back</a>!');
     484    $commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
    485485   
    486486    echo "<div class=\"wrap\">\n";
    487     echo "<p><strong>Caution:</strong> You are about to delete the following comment:</p>\n";
     487    echo "<p><?php __('<strong>Caution:</strong> You are about to delete the following comment:'); ?></p>\n";
    488488    echo "<table border=\"0\">\n";
    489     echo "<tr><td>Author:</td><td>" . $commentdata["comment_author"] . "</td></tr>\n";
    490     echo "<tr><td>E-Mail:</td><td>" . $commentdata["comment_author_email"] . "</td></tr>\n";
    491     echo "<tr><td>URL:</td><td>" . $commentdata["comment_author_url"] . "</td></tr>\n";
    492     echo "<tr><td>Comment:</td><td>" . stripslashes($commentdata["comment_content"]) . "</td></tr>\n";
     489    echo "<tr><td>" . __('Author:') . "</td><td>" . $commentdata["comment_author"] . "</td></tr>\n";
     490    echo "<tr><td>" . __('E-Mail:') . "</td><td>" . $commentdata["comment_author_email"] . "</td></tr>\n";
     491    echo "<tr><td>". __('URL:') . "</td><td>" . $commentdata["comment_author_url"] . "</td></tr>\n";
     492    echo "<tr><td>". __('Comment:') . "</td><td>" . stripslashes($commentdata["comment_content"]) . "</td></tr>\n";
    493493    echo "</table>\n";
    494     echo "<p>Are you sure you want to do that?</p>\n";
     494    echo "<p>" . __('Are you sure you want to do that?') . "</p>\n";
    495495   
    496496    echo "<form action='".get_settings('siteurl')."/wp-admin/post.php' method='get'>\n";
     
    499499    echo "<input type=\"hidden\" name=\"comment\" value=\"$comment\" />\n";
    500500    echo "<input type=\"hidden\" name=\"noredir\" value=\"1\" />\n";
    501     echo "<input type=\"submit\" value=\"Yes\" />";
     501    echo "<input type=\"submit\" value=\"" . __('Yes') . "\" />";
    502502    echo "&nbsp;&nbsp;";
    503     echo "<input type=\"button\" value=\"No\" onClick=\"self.location='". get_settings('siteurl') ."/wp-admin/edit.php?p=$p&c=1#comments';\" />\n";
     503    echo "<input type=\"button\" value=\"" . __('No') . "\" onClick=\"self.location='". get_settings('siteurl') ."/wp-admin/edit.php?p=$p&c=1#comments';\" />\n";
    504504    echo "</form>\n";
    505505    echo "</div>\n";
     
    513513
    514514    if ($user_level == 0)
    515         die ('Cheatin&#8217; uh?');
     515        die (__('Cheatin&#8217; uh?'));
    516516
    517517
     
    524524    }
    525525   
    526     $postdata = get_postdata($p) or die('Oops, no post with this ID. <a href="edit.php">Go back</a>!');
    527     $commentdata = get_commentdata($comment, 1, true) or die('Oops, no comment with this ID. <a href="post.php">Go back</a>!');
     526    $postdata = get_postdata($p) or die(sprintf(__('Oops, no post with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
     527    $commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'post.php'));
    528528
    529529    $authordata = get_userdata($postdata['Author_ID']);
    530530    if ($user_level < $authordata->user_level)
    531         die ('You don&#8217;t have the right to delete <strong>'.$authordata->user_nickname.'</strong>&#8217;s post comments. <a href="post.php">Go back</a>!');
     531        die (sprintf(__('You don&#8217;t have the right to delete <strong>%s</strong>&#8217;s post comments. <a href="%s">Go back</a>!'), $authordata->user_nickname, 'post.php'));
    532532
    533533    wp_set_comment_status($comment, "delete");
     
    548548   
    549549    if ($user_level == 0)
    550         die ('Cheatin&#8217; uh?');
     550        die (__('Cheatin&#8217; uh?'));
    551551       
    552552    $comment = $HTTP_GET_VARS['comment'];
     
    558558    }
    559559
    560     $commentdata = get_commentdata($comment) or die('Oops, no comment with this ID. <a href="edit.php">Go back</a>!');
     560    $commentdata = get_commentdata($comment) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
    561561   
    562562    wp_set_comment_status($comment, "hold");
     
    576576   
    577577    if ($user_level == 0)
    578         die ('Cheatin&#8217; uh?');
     578        die (__('Cheatin&#8217; uh?'));
    579579   
    580580    $comment = $HTTP_GET_VARS['comment'];
    581581    $p = $HTTP_GET_VARS['p'];
    582     $commentdata = get_commentdata($comment, 1, true) or die('Oops, no comment with this ID. <a href="edit.php">Go back</a>!');
     582    $commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
    583583
    584584    wp_set_comment_status($comment, "approve");
     
    588588   
    589589    echo "<div class=\"wrap\">\n";
    590     echo "<p>Comment has been approved.</p>\n";
     590    echo "<p>" . __('Comment has been approved.') . "</p>\n";
    591591   
    592592    echo "<form action=\"". get_settings('siteurl') ."/wp-admin/edit.php?p=$p&c=1#comments\" method=\"get\">\n";
    593593    echo "<input type=\"hidden\" name=\"p\" value=\"$p\" />\n";
    594594    echo "<input type=\"hidden\" name=\"c\" value=\"1\" />\n";
    595     echo "<input type=\"submit\" value=\"Ok\" />";
     595    echo "<input type=\"submit\" value=\"" . __('Ok') . "\" />";
    596596    echo "</form>\n";
    597597    echo "</div>\n";
     
    605605   
    606606    if ($user_level == 0)
    607         die ('Cheatin&#8217; uh?');
     607        die (__('Cheatin&#8217; uh?'));
    608608       
    609609    $comment = $HTTP_GET_VARS['comment'];
     
    614614        $noredir = false;
    615615    }
    616     $commentdata = get_commentdata($comment) or die('Oops, no comment with this ID. <a href="edit.php">Go back</a>!');
     616    $commentdata = get_commentdata($comment) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
    617617   
    618618    wp_set_comment_status($comment, "approve");
     
    636636
    637637        if ($user_level == 0)
    638             die ('Cheatin&#8217; uh?');
     638            die (__('Cheatin&#8217; uh?'));
    639639
    640640        $comment_ID = $HTTP_POST_VARS['comment_ID'];
     
    681681
    682682    default:
    683         $title = 'Create New Post';
    684683        $standalone = 0;
     684        $title = __('Create New Post');
    685685        require_once ('./admin-header.php');
    686686
     
    694694                    ?>
    695695                    <div class="wrap">
    696                     <p><strong>Your Drafts:</strong>
     696                    <p><strong><?php _e('Your Drafts:') ?></strong>
    697697                    <?php
    698698                    $i = 0;
     
    702702                        $draft->post_title = stripslashes($draft->post_title);
    703703                        if ($draft->post_title == '')
    704                             $draft->post_title = 'Post #'.$draft->ID;
    705                         echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='Edit this draft'>$draft->post_title</a>";
     704                            $draft->post_title = sprintf(__('Post # %s'), $draft->ID);
     705                        echo "<a href='post.php?action=edit&amp;post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";
    706706                        ++$i;
    707707                        }
     
    725725?>
    726726<div class="wrap">
    727 <h3>WordPress bookmarklet</h3>
    728 <p>You can drag the following link to your links bar or add it to your bookmarks and when you "Press it" it will open up a popup window with information and a link to the site you're currently browsing so you can make a quick post about it. Try it out:</p>
     727<?php _e('<h3>WordPress bookmarklet</h3>
     728<p>You can drag the following link to your links bar or add it to your bookmarks and when you "Press it" it will open up a popup window with information and a link to the site you&#8217re currently browsing so you can make a quick post about it. Try it out:</p>') ?>
    729729<p>
    730730
     
    734734if ($is_NS4 || $is_gecko) {
    735735?>
    736     <a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}void(window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'WordPress bookmarklet','scrollbars=yes,width=600,height=460,left=100,top=150,status=yes'));">Press It
    737     - <?php echo get_settings('blogname'); ?></a>
     736    <a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}void(window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'<?php _e('WordPress bookmarklet') ?>','scrollbars=yes,width=600,height=460,left=100,top=150,status=yes'));"><?php printf(__('Press It - %s'), get_settings('blogname')); ?></a>
    738737    <?php
    739738} else if ($is_winIE) {
    740739?>
    741     <a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">Press it
    742     - <?php echo get_settings('blogname'); ?></a>
     740    <a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
    743741    <script type="text/javascript" language="JavaScript">
    744742<!--
     
    755753} else if ($is_opera) {
    756754?>
    757     <a href="javascript:void(window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));">Press it
    758     - <?php echo get_settings('blogname'); ?></a>
     755    <a href="javascript:void(window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
    759756    <?php
    760757} else if ($is_macIE) {
    761758?>
    762     <a href="javascript:Q='';if(top.frames.length==0);void(btw=window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">Press it
    763     - <?php echo get_settings('blogname'); ?></a>
     759    <a href="javascript:Q='';if(top.frames.length==0);void(btw=window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();"><?php prtinf(__('Press it - %s'), get_settings('blogname')); ?></a>
    764760    <?php
    765761}
     
    773769?>
    774770<div class="wrap">
    775             <p>Since you&#8217;re a newcomer, you&#8217;ll have to wait for an admin to raise your level to 1, in order to be authorized to post blog items.<br />
    776                 You can also <a href="mailto:<?php echo get_settings('admin_email'); ?>?subject=Blog posting permission">e-mail the admin</a> to ask for a promotion.<br />
    777                 When you&#8217;re promoted, just reload this page and you&#8217;ll be able to blog. :)</p>
     771          <?php printf(__('<p>Since you&#8217;re a newcomer, you&#8217;ll have to wait for an admin to raise your level to 1, in order to be authorized to post blog items.<br />
     772You can also <a href="mailto:%s?subject=Blog posting permission">e-mail the admin</a> to ask for a promotion.<br />
     773When you&#8217;re promoted, just reload this page and you&#8217;ll be able to blog. :)</p>'), get_settings('admin_email')); ?>
    778774</div>
    779775<?php
Note: See TracChangeset for help on using the changeset viewer.