Make WordPress Core

Changeset 13024


Ignore:
Timestamp:
02/08/2010 05:59:08 PM (15 years ago)
Author:
ryan
Message:

gettext for twentyten. see #12170

Location:
trunk/wp-content/themes/twentyten
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/comments.php

    r13012 r13024  
    2121
    2222<?php if ( have_comments() ) : ?>
    23             <h3 id="comments-title"><?php comments_number('No Responses to', 'One Response to', '% Responses to' );?>  <em><?php the_title(); ?></em></h3>
     23            <h3 id="comments-title"><?php comments_number( __('No Responses to', 'twentyten'), __('One Response to', 'twentyten'), __('% Responses to', 'twentyten') );?>  <em><?php the_title(); ?></em></h3>
    2424
    2525<?php $total_pages = get_comment_pages_count(); if ( $total_pages > 1 ) : // are there comments to navigate through ?>
     
    2828                <div class="nav-next"><?php next_comments_link( __('Newer Comments &rarr;', 'twentyten') ) ?></div>
    2929            </div>
    30 <?php endif; // check for comment navigation ?>                             
     30<?php endif; // check for comment navigation ?>
    3131
    3232            <ol class="commentlist">
     
    3939                <div class="nav-next"><?php next_comments_link( __('Newer Comments &rarr;', 'twentyten') ) ?></div>
    4040            </div>
    41 <?php endif; // check for comment navigation ?>                                         
    42            
     41<?php endif; // check for comment navigation ?>
     42
    4343<?php else : // this is displayed if there are no comments so far ?>
    4444
    45 <?php if ( comments_open() ) : // If comments are open, but there are no comments ?>       
     45<?php if ( comments_open() ) : // If comments are open, but there are no comments ?>
    4646
    4747<?php else : // if comments are closed ?>
    4848
    49         <p class="nocomments">Comments are closed.</p>
     49        <p class="nocomments"><?php _e('Comments are closed.', 'twentyten'); ?></p>
    5050
    5151<?php endif; ?>
     
    5555
    5656            <div id="respond">
    57            
    58                 <h3 id="reply-title"><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?> <small><?php cancel_comment_reply_link('Cancel reply'); ?></small></h3>
    59            
     57
     58                <h3 id="reply-title"><?php comment_form_title( __('Leave a Reply', 'twentyten'), __('Leave a Reply to %s', 'twentyten') ); ?> <small><?php cancel_comment_reply_link( __('Cancel reply', 'twentyten') ); ?></small></h3>
     59
    6060<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
    61                 <p>You must be <a href="<?php echo wp_login_url( get_permalink() ); ?>">logged in</a> to post a comment.</p>
    62                
    63 <?php else : // here's the big comment form ?>         
    64                 <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    65                
     61                <p><?php printf( __('You must be <a href="%s">logged in</a> to post a comment.', 'twentyten'), wp_login_url( get_permalink() ) ); ?></p>
     62
     63<?php else : // here's the big comment form ?>
     64                <form action="<?php echo site_url('wp-comments-post.php'); ?>" method="post" id="commentform">
     65
    6666    <?php if ( $user_ID ) : ?>
    6767                    <p id="login"><?php printf(__('<span class="loggedin">Logged in as <a href="%1$s" title="Logged in as %2$s">%2$s</a>.</span> <span class="logout"><a href="%3$s" title="Log out of this account">Log out?</a></span>', 'twentyten'),
    68                         get_option('siteurl') . '/wp-admin/profile.php',
     68                        admin_url('profile.php'),
    6969                        wp_specialchars($user_identity, true),
    7070                        wp_logout_url(get_permalink()) ) ?></p>
    71                    
     71
    7272    <?php else : ?>
    73    
     73
    7474                    <p id="comment-notes"><?php _e('Your email is <em>never</em> published nor shared.', 'twentyten') ?> <?php if ($req) _e('Required fields are marked <span class="required">*</span>', 'twentyten') ?></p>
    75    
    76                    
     75
     76
    7777                    <div id="form-section-author" class="form-section">
    7878                        <div class="form-label"><label for="author"><?php _e('Name', 'twentyten') ?></label> <?php if ($req) _e('<span class="required">*</span>', 'twentyten') ?></div>
    7979                        <div class="form-input"><input id="author" name="author" type="text" value="<?php echo $comment_author ?>" size="30" tabindex="3" /></div>
    8080                    </div><!-- #form-section-author .form-section -->
    81                    
     81
    8282                    <div id="form-section-email" class="form-section">
    8383                        <div class="form-label"><label for="email"><?php _e('Email', 'twentyten') ?></label> <?php if ($req) _e('<span class="required">*</span>', 'twentyten') ?></div>
    8484                        <div class="form-input"><input id="email" name="email" type="text" value="<?php echo $comment_author_email ?>" size="30" tabindex="4" /></div>
    8585                    </div><!-- #form-section-email .form-section -->
    86                    
     86
    8787                    <div id="form-section-url" class="form-section">
    8888                        <div class="form-label"><label for="url"><?php _e('Website', 'twentyten') ?></label></div>
    8989                        <div class="form-input"><input id="url" name="url" type="text" value="<?php echo $comment_author_url ?>" size="30" tabindex="5" /></div>
    9090                    </div><!-- #form-section-url .form-section -->
    91                    
     91
    9292    <?php endif; // if ( $user_ID ) ?>
    93                    
     93
    9494                    <div id="form-section-comment" class="form-section">
    9595                        <div class="form-label"><label for="comment"><?php _e('Comment', 'twentyten') ?></label></div>
    9696                        <div class="form-textarea"><textarea id="comment" name="comment" cols="45" rows="8" tabindex="6"></textarea></div>
    9797                    </div><!-- #form-section-comment .form-section -->
    98                    
     98
    9999                    <div id="form-allowed-tags" class="form-section">
    100100                        <p><span><?php _e('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:', 'twentyten') ?></span> <code><?php echo allowed_tags(); ?></code></p>
    101101                    </div>
    102                    
     102
    103103                    <?php do_action('comment_form', $post->ID); ?>
    104                    
     104
    105105                    <div class="form-submit"><input id="submit" name="submit" type="submit" value="<?php _e('Post Comment', 'twentyten') ?>" tabindex="7" /><input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></div>
    106106
    107 <?php comment_id_fields(); ?>   
     107<?php comment_id_fields(); ?>
    108108
    109                
     109
    110110                </form>
    111            
     111
    112112    <?php endif; // If registration required and not logged in ?>
    113113            </div> <!-- #respond -->
  • trunk/wp-content/themes/twentyten/footer.php

    r13012 r13024  
    11    </div><!-- #main -->
    2    
     2
    33    <div id="footer">
    44        <div id="colophon">
    5        
    6 <?php get_sidebar('footer'); ?>             
    7        
     5
     6<?php get_sidebar('footer'); ?>
     7
    88            <div id="site-info">
    99                <a href="<?php bloginfo( 'url' ) ?>/" title="<?php bloginfo( 'name' ) ?>" rel="home"><?php bloginfo( 'name' ) ?></a>
    1010            </div>
    11            
     11
    1212            <div id="site-generator">
    13                 Proudly powered by <span id="generator-link"><a href="http://wordpress.org/" title="<?php _e( 'Semantic Personal Publishing Platform', 'twentyten' ) ?>" rel="generator"><?php _e( 'WordPress', 'twentyten' ) ?></a>.</span>
     13                <?php printf( __('Proudly powered by <span id="generator-link">%s</span>.', 'twentyten'), '<a href="http://wordpress.org/" title="' . __( 'Semantic Personal Publishing Platform', 'twentyten' ) . '" rel="generator">' . __( 'WordPress', 'twentyten' ) . '</a>' ); ?>
    1414            </div>
    15            
     15
    1616        </div><!-- #colophon -->
    1717    </div><!-- #footer -->
    18    
    19 </div><!-- #wrapper --> 
     18
     19</div><!-- #wrapper -->
    2020
    2121<?php wp_footer(); ?>
  • trunk/wp-content/themes/twentyten/index.php

    r13012 r13024  
    11<?php get_header(); ?>
    2    
    3         <div id="container">   
     2
     3        <div id="container">
    44            <div id="content">
    5            
     5
    66<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
    77                <div id="nav-above" class="navigation">
     
    99                    <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' )) ?></div>
    1010                </div><!-- #nav-above -->
    11 <?php } ?>         
    12    
    13     <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
     11<?php } ?>
     12
     13    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    1414    <?php if ( in_category( 'Gallery' ) ) { ?>
    1515        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     
    2121the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>
    2222                <span class="meta-sep"> <?php _e('by ', 'twentyten'); ?> </span>
    23                 <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( __( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>                 
     23                <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( __( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
    2424            </div><!-- .entry-meta -->
    2525
    2626            <div class="entry-content">
    2727                <div class="gallery-thumb"><a class="size-thumbnail" href="<?php permalink_link() ?>"><?php $hilite = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE post_parent = '$post->ID' AND post_type = 'attachment' LIMIT 1" ); echo wp_get_attachment_image( $hilite, 'thumbnail' );?></a></div>
    28                        
    29                 <p><em>This gallery contains <a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php echo $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_parent = '$post->ID' AND post_type = 'attachment'" ); ?> photos</a>.</em></p>
    30                
     28
     29                <p><em><?php printf( __('This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten'), 'href="' . get_permalink() . '" title="' . sprintf( __('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ) . '" rel="bookmark"', $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_parent = '$post->ID' AND post_type = 'attachment'" )); ?></em></p>
     30
    3131                <?php the_excerpt(''); ?>
    3232            </div><!-- .entry-content -->
     
    3939                <a href="<?php echo $category_link; ?>" title="<?php _e('View posts in the Gallery category', 'twentyten'); ?>"><?php _e('More Galleries', 'twentyten'); ?></a>
    4040
    41                 <span class="meta-sep"> | </span>               
     41                <span class="meta-sep"> | </span>
    4242
    4343                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ) ?></span>
     
    4949
    5050    <?php } elseif ( in_category( 'asides' ) ) { ?>
    51         <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>                                       
    52             <div class="entry-content"> 
     51        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     52            <div class="entry-content">
    5353<?php the_content( __( 'Continue&nbsp;reading&nbsp;<span class="meta-nav">&rarr;</span>', 'twentyten' )  ); ?>
    5454            </div><!-- .entry-content -->
     
    6060                <span class="meta-sep"> <?php _e('by ', 'twentyten'); ?> </span>
    6161                <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( __( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
    62                 <span class="meta-sep"> | </span>           
     62                <span class="meta-sep"> | </span>
    6363                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ) ?></span>
    6464                <?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ) ?>
    65             </div><!-- #entry-utility -->   
     65            </div><!-- #entry-utility -->
    6666        </div><!-- #post-<?php the_ID(); ?> -->
    67                
    68    
     67
     68
    6969    <?php } else { ?>
    7070        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    7171            <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    72            
     72
    7373            <div class="entry-meta">
    7474                <span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
     
    7676the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>
    7777                <span class="meta-sep"> <?php _e('by ', 'twentyten'); ?> </span>
    78                 <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( __( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>                 
     78                <span class="author vcard"><a class="url fn n"2 href="<?php echo get_author_posts_url( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( __( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
    7979            </div><!-- .entry-meta -->
    80                                
    81             <div class="entry-content"> 
     80
     81            <div class="entry-content">
    8282<?php the_content( __( 'Continue&nbsp;reading&nbsp;<span class="meta-nav">&rarr;</span>', 'twentyten' )  ); ?>
    8383<?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>') ?>
     
    9090                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ) ?></span>
    9191                <?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ) ?>
    92             </div><!-- #entry-utility -->   
     92            </div><!-- #entry-utility -->
    9393        </div><!-- #post-<?php the_ID(); ?> -->
    94                
    95 <?php comments_template(); ?>               
    96    
     94
     95<?php comments_template(); ?>
     96
    9797    <?php } ?>
    9898    <?php endwhile; ?>
     
    103103        <?php get_search_form(); ?>
    104104        </div>
    105     <?php endif; ?>     
     105    <?php endif; ?>
    106106
    107107<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
     
    110110                    <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' )) ?></div>
    111111                </div><!-- #nav-below -->
    112 <?php } ?>         
    113            
    114             </div><!-- #content -->     
     112<?php } ?>
     113
     114            </div><!-- #content -->
    115115        </div><!-- #container -->
    116        
    117 <?php get_sidebar(); ?> 
     116
     117<?php get_sidebar(); ?>
    118118<?php get_footer(); ?>
  • trunk/wp-content/themes/twentyten/searchform.php

    r13012 r13024  
    11    <form id="searchform" name="searchform" method="get" action="/">
    22        <div>
    3             <label for="s">Search</label>
     3            <label for="s"><?php _e('Search', 'twentyten'); ?></label>
    44            <input type="text" id="s" name="s" />
    55            <input type="submit" id="searchsubmit" value="<?php _e('Search', 'twentyten'); ?>" />
Note: See TracChangeset for help on using the changeset viewer.