Changeset 4658
- Timestamp:
- 12/21/2006 11:06:18 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r4657 r4658 41 41 if ( 'page' == $_POST['post_type'] ) { 42 42 if ( !current_user_can( 'edit_others_pages' ) ) 43 return new WP_Error( 'edit_others_pages', __( 'You cannotcreate pages as this user.' ) );43 return new WP_Error( 'edit_others_pages', __( 'You are not allowed to create pages as this user.' ) ); 44 44 } else { 45 45 if ( !current_user_can( 'edit_others_posts' ) ) 46 return new WP_Error( 'edit_others_posts', __( 'You cannotpost as this user.' ) );46 return new WP_Error( 'edit_others_posts', __( 'You are not allowed to post as this user.' ) ); 47 47 48 48 } … … 185 185 if ( 'page' == $_POST['post_type'] ) { 186 186 if ( !current_user_can( 'edit_others_pages' ) ) 187 wp_die( __('You cannotedit pages as this user.' ));187 wp_die( __('You are not allowed to edit pages as this user.' )); 188 188 } else { 189 189 if ( !current_user_can( 'edit_others_posts' ) ) 190 wp_die( __('You cannotedit posts as this user.' ));190 wp_die( __('You are not allowed to edit posts as this user.' )); 191 191 192 192 } … … 562 562 function edit_link( $link_id = '' ) { 563 563 if (!current_user_can( 'manage_links' )) 564 wp_die( __( "Cheatin' uh ?"));564 wp_die( __( 'Cheatin&8217; uh?' )); 565 565 566 566 $_POST['link_url'] = wp_specialchars( $_POST['link_url'] ); … … 827 827 if ( $numposts > 0 ) { 828 828 $r .= "<a href='edit.php?author=$user_object->ID' title='" . __( 'View posts by this author' ) . "' class='edit'>"; 829 $r .= sprintf( __('View %1$s %2$s' ), $numposts, __ngettext( 'post', 'posts', $numposts ));829 $r .= sprintf(__ngettext( 'View %s post', 'View %s posts', $numposts ), $numposts); 830 830 $r .= '</a>'; 831 831 } … … 1070 1070 <?php 1071 1071 if ( $edit ) { 1072 _e( 'Existing timestamp' ); 1073 //echo ': ' . $wp_locale->get_month( $mm ) . "$jj, $aa @ $hh:$mn"; 1074 echo sprintf( __(': %1$s %2$s, %3$s @ %4$s:%5$s' ), $wp_locale->get_month( $mm ), $jj, $aa, $hh, $mn ); 1072 printf( __('Existing timestamp: %1$s %2$s, %3$s @ %4$s:%5$s' ), $wp_locale->get_month( $mm ), $jj, $aa, $hh, $mn ); 1075 1073 } 1076 1074 ?> -
trunk/wp-admin/categories.php
r4499 r4658 35 35 // Don't delete the default cats. 36 36 if ( $cat_ID == get_option('default_category') ) 37 wp_die(sprintf(__("Can 't delete the <strong>%s</strong> category: this is the default one"), $cat_name));37 wp_die(sprintf(__("Can&8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); 38 38 39 39 if ( $cat_ID == get_option('default_link_category') ) 40 wp_die(sprintf(__("Can 't delete the <strong>%s</strong> category: this is the default one for links"), $cat_name));40 wp_die(sprintf(__("Can&8217;t delete the <strong>%s</strong> category: this is the default one for links"), $cat_name)); 41 41 42 42 wp_delete_category($cat_ID); -
trunk/wp-admin/edit-comments.php
r4656 r4658 68 68 endforeach; 69 69 echo '<div style="background-color: rgb(207, 235, 247);" id="message" class="updated fade"><p>'; 70 if ( !empty( $_POST['spam_button'] ) ) 71 printf(__('%s comments marked as spam.'), $i); 72 else 73 printf(__('%s comments deleted.'), $i); 70 if ( !empty( $_POST['spam_button'] ) ) { 71 printf(__ngettext('%s comment marked as spam', '%s comments marked as spam.', $i), $i); 72 } else { 73 printf(__ngettext('%s comment deleted.', '%s comments deleted.', $i), $i); 74 } 74 75 echo '</p></div>'; 75 76 endif; -
trunk/wp-admin/edit-form-advanced.php
r4656 r4658 207 207 </div> 208 208 <div class="dbx-c-ontent-wrapper"> 209 <div class="dbx-content"><?php _e('Send trackbacks to '); ?>: <?php echo $form_trackback; ?> (<?php _e('Separate multiple URIs with spaces'); ?>)209 <div class="dbx-content"><?php _e('Send trackbacks to:'); ?> <?php echo $form_trackback; ?> (<?php _e('Separate multiple URLs with spaces'); ?>) 210 210 <?php 211 211 if ( ! empty($pings) ) -
trunk/wp-admin/edit-form-comment.php
r4607 r4658 68 68 <tr> 69 69 <th scope="row" valign="top"><?php _e('Delete'); $delete_nonce = wp_create_nonce( 'delete-comment_' . $comment->comment_ID ); ?>:</th> 70 <td><input name="deletecomment" class="button delete" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"if ( confirm('" . __("You are about to delete this comment \\n \'Cancel\' to stop, \'OK\' to delete.") . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true; } return false;\""; ?> />70 <td><input name="deletecomment" class="button delete" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true; } return false;\""; ?> /> 71 71 <input type="hidden" name="c" value="<?php echo $comment->comment_ID ?>" /> 72 72 <input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" /> -
trunk/wp-admin/edit-form.php
r4495 r4658 52 52 <input type="hidden" name="post_pingback" value="<?php echo get_option('default_pingback_flag') ?>" id="post_pingback" /> 53 53 54 <p><label for="trackback"> <?php printf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Locator">URL</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Locator">URL</abbr>s with spaces.) <br />'), 'http://wordpress.org/docs/reference/post/#trackback')?>54 <p><label for="trackback"> <?php printf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Locator">URL</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Locator">URL</abbr>s with spaces.)'), 'http://wordpress.org/docs/reference/post/#trackback'); echo '<br />'; ?> 55 55 <input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p> 56 56 -
trunk/wp-admin/edit-page-form.php
r4656 r4658 53 53 <label for="comment_status" class="selectit"> 54 54 <input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /> 55 <?php _e('Allow Comments') ?></label> 55 <?php _e('Allow Comments') ?></label> 56 56 <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label> 57 57 </div> … … 59 59 60 60 <fieldset class="dbx-box"> 61 <h3 class="dbx-handle"><?php _e('Page Status') ?></h3> 61 <h3 class="dbx-handle"><?php _e('Page Status') ?></h3> 62 62 <div class="dbx-content"><?php if ( current_user_can('publish_pages') ) : ?> 63 63 <label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); checked($post->post_status, 'future'); ?> /> <?php _e('Published') ?></label> … … 68 68 69 69 <fieldset id="passworddiv" class="dbx-box"> 70 <h3 class="dbx-handle"><?php _e('Page Password') ?></h3> 70 <h3 class="dbx-handle"><?php _e('Page Password') ?></h3> 71 71 <div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div> 72 72 </fieldset> 73 73 74 74 <fieldset id="pageparent" class="dbx-box"> 75 <h3 class="dbx-handle"><?php _e('Page Parent') ?></h3> 75 <h3 class="dbx-handle"><?php _e('Page Parent') ?></h3> 76 76 <div class="dbx-content"><p><select name="parent_id"> 77 77 <option value='0'><?php _e('Main Page (no parent)'); ?></option> … … 83 83 <?php if ( 0 != count( get_page_templates() ) ) { ?> 84 84 <fieldset id="pagetemplate" class="dbx-box"> 85 <h3 class="dbx-handle"><?php _e('Page Template :') ?></h3>85 <h3 class="dbx-handle"><?php _e('Page Template') ?></h3> 86 86 <div class="dbx-content"><p><select name="page_template"> 87 87 <option value='default'><?php _e('Default Template'); ?></option> … … 93 93 94 94 <fieldset id="slugdiv" class="dbx-box"> 95 <h3 class="dbx-handle"><?php _e('Page Slug') ?></h3> 95 <h3 class="dbx-handle"><?php _e('Page Slug') ?></h3> 96 96 <div class="dbx-content"><input name="post_name" type="text" size="13" id="post_name" value="<?php echo $post->post_name ?>" /></div> 97 97 </fieldset> … … 126 126 127 127 <fieldset id="titlediv"> 128 <legend><?php _e('Page Title') ?></legend> 128 <legend><?php _e('Page Title') ?></legend> 129 129 <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div> 130 130 </fieldset> … … 139 139 <span id="autosave"></span> 140 140 <input name="save" type="submit" id="save" tabindex="3" value="<?php _e('Save and Continue Editing'); ?>" /> 141 <input type="submit" name="submit" value="<?php _e('Save') ?>" style="font-weight: bold;" tabindex="4" /> 142 <?php 141 <input type="submit" name="submit" value="<?php _e('Save') ?>" style="font-weight: bold;" tabindex="4" /> 142 <?php 143 143 if ('publish' != $post->post_status || 0 == $post_ID): 144 144 ?> 145 145 <?php if ( current_user_can('publish_pages') ) : ?> 146 <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 146 <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 147 147 <?php endif; endif;?> 148 148 <input name="referredby" type="hidden" id="referredby" value="<?php echo $sendto; ?>" /> -
trunk/wp-admin/edit.php
r4656 r4658 222 222 case 'control_delete': 223 223 ?> 224 <td><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&post=$id", 'delete-post_' . $post->ID) . "' class='delete' onclick=\"return deleteSomething( 'post', " . $id . ", '" . sprintf(__("You are about to delete this post "%s".\\n"OK" to delete, "Cancel" to stop."), js_escape(get_the_title())) . "' );\">" . __('Delete') . "</a>"; } ?></td>224 <td><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&post=$id", 'delete-post_' . $post->ID) . "' class='delete' onclick=\"return deleteSomething( 'post', " . $id . ", '" . js_escape(sprintf(__("You are about to delete this post '%s'.\n'OK' to delete, 'Cancel' to stop."), get_the_title())) . "' );\">" . __('Delete') . "</a>"; } ?></td> 225 225 <?php 226 226 break; … … 284 284 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 285 285 echo " <a href='comment.php?action=editcomment&c=".$comment->comment_ID."'>" . __('Edit') . '</a>'; 286 echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $post->ID . '&c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK"to delete."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> ';286 echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $post->ID . '&c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . sprintf(__("You are about to delete this comment by '%s'.\n'Cancel' to stop, 'OK' to delete."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> '; 287 287 if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 288 288 echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&p=' . $post->ID . '&c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>'; 289 289 echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&p=' . $post->ID . '&c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>'; 290 290 } 291 echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=".$comment->comment_post_ID."&c=".$comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by "%s".\\n"Cancel" to stop, "OK"to mark as spam."), js_escape( $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> ]";291 echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=".$comment->comment_post_ID."&c=".$comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by '%s'.\n'Cancel' to stop, 'OK' to mark as spam."), js_escape( $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> ]"; 292 292 } // end if any comments to show 293 293 ?> -
trunk/wp-admin/export.php
r4608 r4658 15 15 <p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p> 16 16 <p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, comments, custom fields, and categories.'); ?></p> 17 <p><?php _e('Once you \'ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p>17 <p><?php _e('Once you&8217;ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p> 18 18 <form action="" method="get"> 19 19 <h3><?php _e('Optional options'); ?></h3> -
trunk/wp-admin/index.php
r4495 r4658 108 108 if (0 < $numcats) $numcats = number_format($numcats); 109 109 ?> 110 <p><?php printf(__('There are currently %1$s <a href="%2$s" title="Posts">posts</a> and %3$s <a href="%4$s" title="Comments">comments</a>, contained within %5$s <a href="%6$s" title="categories">categories</a>.'), $numposts, 'edit.php', $numcomms, 'edit-comments.php', $numcats, 'categories.php'); ?></p> 110 <p><?php 111 $post_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Posts">post</a>', '%1$s <a href="%2$s" title="Posts">posts</a>', $numposts), $numposts, 'edit.php'); 112 $comm_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Comments">comment</a>', '%1$s <a href="%2$s" title="Comments">comments</a>', $numcomms), $numcomms, 'edit-comments.php'); 113 $cat_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Categories">category</a>', '%1$s <a href="%2$s" title="Categories">categories</a>', $numcats), $numcats, 'categories.php'); 114 115 printf(__('There are currently %1$s and %2$s, contained within %3$s.'), $post_str, $comm_str, $cat_str); ?></p> 111 116 </div> 112 117 -
trunk/wp-admin/link-add.php
r4539 r4658 29 29 <div id="wp-link-bookmarklet" class="wrap"> 30 30 <h3><?php _e('Add Link Bookmarklet'); ?></h3> 31 <p><?php _e('Right click on the following link and choose "Bookmark This Link..." to create an add link shortcut. Right now this only works on Mozilla or Netscape, but we ’re working on it.'); ?></p>31 <p><?php _e('Right click on the following link and choose "Bookmark This Link..." to create an add link shortcut. Right now this only works on Mozilla or Netscape, but we&8217;re working on it.'); ?></p> 32 32 <?php printf('<p><a href="%s" title="'.__('Link add bookmarklet').'">'.__('Link This').'</a></p>', "javascript:void(linkmanpopup=window.open('" . get_option('siteurl') . "/wp-admin/link-add.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?> 33 33 </div> -
trunk/wp-admin/link-manager.php
r4656 r4658 66 66 echo '<div style="background-color: rgb(207, 235, 247);" id="message" class="updated fade"><p>'; 67 67 $deleted = (int) $_GET['deleted']; 68 printf(__ ('%s links deleted.'), $deleted);68 printf(__ngettext('%s link deleted.', '%s links deleted', $deleted), $deleted); 69 69 echo '</p></div>'; 70 70 } -
trunk/wp-admin/moderation.php
r4655 r4658 73 73 $spam = (int) $_GET['spam']; 74 74 if ($approved) { 75 if ('1' == $approved) { 76 echo __("1 comment approved") . " <br/>\n"; 77 } else { 78 echo sprintf(__("%s comments approved <br />"), $approved) . "\n"; 79 } 75 printf(__ngettext('%s comment approved', '%s comments approved', $approved), $approved); 76 echo "<br/>\n"; 80 77 } 81 78 if ($deleted) { 82 if ('1' == $deleted) { 83 echo __("1 comment deleted") . " <br/>\n"; 84 } else { 85 echo sprintf(__("%s comments deleted"), $deleted) . " <br/>\n"; 86 } 79 printf(__ngettext('%s comment deleted', '%s comments deleted', $deleted), $deleted); 80 echo "<br/>\n"; 87 81 } 88 82 if ($spam) { 89 if ('1' == $spam) { 90 echo __("1 comment marked as spam") . " <br/>\n"; 91 } else { 92 echo sprintf(__("%s comments marked as spam"), $spam) . " <br/>\n"; 93 } 83 printf(__ngettext('%s comment marked as spam', '%s comments marked as spam', $spam), $spam); 84 echo "<br/>\n"; 94 85 } 95 86 if ($ignored) { 96 if ('1' == $ignored) { 97 echo __("1 comment unchanged") . " <br/>\n"; 98 } else { 99 echo sprintf(__("%s comments unchanged"), $ignored) . " <br/>\n"; 100 } 87 printf(__ngettext('%s comment unchanged', '%s comments unchanged', $ignored), $ignored); 88 echo "<br/>\n"; 101 89 } 102 90 echo "</p></div>\n"; -
trunk/wp-admin/options-discussion.php
r4480 r4658 14 14 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> 15 15 <fieldset class="options"> 16 <legend><?php _e('Usual settings for an article:<br /><small><em>(These settings may be overridden for individual articles.)</em></small>')?></legend>16 <legend><?php echo __('Usual settings for an article:').'<br /><small><em>('.__('These settings may be overridden for individual articles.').')</em></small>'; ?></legend> 17 17 <ul> 18 18 <li> -
trunk/wp-admin/plugins.php
r4646 r4658 80 80 if (empty($plugins)) { 81 81 echo '<p>'; 82 _e("Couldn 't open plugins directory or there are no plugins available."); // TODO: make more helpful82 _e("Couldn&8217;t open plugins directory or there are no plugins available."); // TODO: make more helpful 83 83 echo '</p>'; 84 84 } else { -
trunk/wp-admin/users.php
r4656 r4658 291 291 ?> 292 292 <?php $delete_count = (int) $_GET['delete_count']; ?> 293 <div id="message" class="updated fade"><p><?php printf(__ ('%1$s %2$s deleted.'), $delete_count, __ngettext('user', 'users', $delete_count)); ?></p></div>293 <div id="message" class="updated fade"><p><?php printf(__ngettext('%s user deleted', '%s users deleted', $delete_count), $delete_count); ?></p></div> 294 294 <?php 295 295 break; -
trunk/wp-includes/formatting.php
r4657 r4658 739 739 if ($diff <= 3600) { 740 740 $mins = round($diff / 60); 741 if ($mins <= 1) 742 $ since = __('1 min');743 else744 $since = sprintf( __('%s mins'), $mins);741 if ($mins <= 1) { 742 $mins = 1; 743 } 744 $since = sprintf(__ngettext('%s min', '%s mins', $mins), $mins); 745 745 } else if (($diff <= 86400) && ($diff > 3600)) { 746 746 $hours = round($diff / 3600); 747 if ($hours <= 1) 748 $ since = __('1 hour');749 else750 $since = sprintf( __('%s hours'), $hours);747 if ($hours <= 1) { 748 $hour = 1; 749 } 750 $since = sprintf(__ngettext('%s hour', '%s hours', $hours), $hours); 751 751 } elseif ($diff >= 86400) { 752 752 $days = round($diff / 86400); 753 if ($days <= 1) 754 $ since = __('1 day');755 else756 $since = sprintf( __('%s days'), $days);753 if ($days <= 1) { 754 $days = 1; 755 } 756 $since = sprintf(__('%s day', '%s days', $days), $days); 757 757 } 758 758 return $since;
Note: See TracChangeset
for help on using the changeset viewer.