WordPress.org

Making WordPress.org

Changeset 2376


Ignore:
Timestamp:
01/26/2016 11:41:27 PM (4 years ago)
Author:
coffee2code
Message:

W.org Showcase: Pass all strings through i18n functions.

Props ramiy, coffee2code.
Fixes #1507.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/archive.php

    r1705 r2376  
    2323                    <h5><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h5>
    2424                    <div class="excerpt"><?php the_content_limit(200); ?></div>
    25                     <div class="meta"><?php tags_with_count( 'flat', '<strong>Tags:</strong> ', ', ', '<br />'); ?><?php edit_post_link( 'Edit this entry' ); ?></div>
     25                    <div class="meta"><?php tags_with_count( 'flat', '<strong>' . __( 'Tags:', 'wporg-showcase' ) . '</strong> ', ', ', '<br />'); ?><?php edit_post_link( __( 'Edit this entry', 'wporg-showcase' ) ); ?></div>
    2626                    <div style="clear:both;"></div>
    2727                </div>
     
    3333        <?php else : // have_posts ?>
    3434
    35             <p><?php _e('Sorry, no sites in the Showcase matched your criteria.'); ?></p>
     35            <p><?php _e( 'Sorry, no sites in the Showcase matched your criteria.', 'wporg-showcase' ); ?></p>
    3636
    3737        <?php endif; ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/comments.php

    r1474 r2376  
    11<?php if ( !empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>
    2 <p><?php _e('Enter your password to view comments.'); ?></p>
     2<p><?php _e( 'Enter your password to view comments.', 'wporg-showcase' ); ?></p>
    33<?php return; endif; ?>
    44
    55<?php if ( is_single() ) : ?>
    6 <div class="nextprev"><span class="prev"><?php previous_post('&laquo; %', '');?></span><span class="next"><?php next_post('% &raquo;', ''); ?></span><div class="clear"></div></div>
     6<div class="nextprev"><span class="prev"><?php previous_post( __( '&laquo; %', 'wporg-showcase' ), '');?></span><span class="next"><?php next_post( __( '% &raquo;', 'wporg-showcase' ), ''); ?></span><div class="clear"></div></div>
    77<?php endif; ?>
    88
    99<?php if ( $comments ) : ?>
    10 <h2 class="fancy"><?php comments_number(__('No Pings'), __('1 Ping'), __('% Pings')); ?></h2>
     10<h2 class="fancy"><?php comments_number( __( 'No Pings', 'wporg-showcase' ), __( '1 Ping', 'wporg-showcase' ), __( '% Pings', 'wporg-showcase' ) ); ?></h2>
    1111<ol id="comments">
    1212
     
    1414    <li id="comment-<?php comment_ID() ?>" <?php if ($i % 2) echo "class='altc'"; ?>>
    1515    <?php comment_text() ?>
    16     <p><cite><?php comment_type(__('Comment'), __('Trackback'), __('Pingback')); ?> from <?php comment_author_link() ?> on <?php comment_date() ?></cite> <?php edit_comment_link(__("Edit This"), ' |'); ?></p>
     16    <p><cite><?php printf(
     17        _x( '%1$s from %2$s on %3$s', '{comment type} from {comment author link} on {comment date}', 'wporg-showcase' ),
     18        comment_type( __( 'Comment', 'wporg-showcase' ), __( 'Trackback', 'wporg-showcase' ), __( 'Pingback', 'wporg-showcase' ) ),
     19        comment_author_link(),
     20        comment_date()
     21    ); ?></cite> <?php edit_comment_link( __( 'Edit This', 'wporg-showcase' ), ' |' ); ?></p>
    1722    </li>
    1823
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/functions.php

    r2077 r2376  
    7070    global $post;
    7171
    72     echo '<h4>Flavor</h4>
    73         <ul id="flavors">';
     72    echo '<h4>' . __( 'Flavor', 'wporg-showcase' ). '</h4>';
     73    echo '<ul id="flavors">';
    7474
    7575    $flavors = array( 'WordPress.org', 'WordPress.com', 'WordPress.com VIP', 'WordPress MS' );
     
    8484
    8585    if ( in_category( 'BuddyPress' ) ) {
    86         echo '<li class="flavor-used"><img src="' . get_template_directory_uri() . '/images/flavor-bp.png" /> BuddyPress</li>';
    87     } else {
    88         echo '<li><img src="' . get_template_directory_uri() . '/images/flavor-bp2.png" /> BuddyPress</li>';
     86        echo '<li class="flavor-used"><img src="' . get_template_directory_uri() . '/images/flavor-bp.png" /> ' . __( 'BuddyPress', 'wporg-showcase' ). '</li>';
     87    } else {
     88        echo '<li><img src="' . get_template_directory_uri() . '/images/flavor-bp2.png" /> ' . __( 'BuddyPress', 'wporg-showcase' ). '</li>';
    8989    }
    9090
     
    9494function blockquote_style( $content ) {
    9595    if ( is_single() )
    96         $content = str_replace( '</blockquote>', '<cite>Source: <a href="http://' . get_site_domain( false, false ) . '">' . get_site_domain( false, false, true ) . '</a></cite><div class="clear"></div></blockquote>', $content );
     96        $content = str_replace( '</blockquote>', '<cite>' . __( 'Source:', 'wporg-showcase' ). ' <a href="http://' . get_site_domain( false, false ) . '">' . get_site_domain( false, false, true ) . '</a></cite><div class="clear"></div></blockquote>', $content );
    9797
    9898    return $content;
     
    120120    $tags = get_terms( 'post_tag', $args );
    121121
    122     $out = '<h4>Browse Popular Tags</h4>';
     122    $out = '<h4>' . __( 'Browse Popular Tags', 'wporg-showcase' ). '</h4>';
    123123    $out .= '<ul class="submenu wpsc-popular-tags">';
    124124
     
    139139function breadcrumb() { ?>
    140140
    141     <h3><a href="<?php echo home_url( '/' ); ?>" title="Showcase">Showcase</a>
     141    <h3><a href="<?php echo home_url( '/' ); ?>" title="<?php esc_attr_e( 'Showcase', 'wporg-showcase' ); ?>"><?php _e( 'Showcase', 'wporg-showcase' ); ?></a>
    142142
    143143        <?php if ( is_search() ) : ?>
    144             &raquo; Search for: <?php the_search_query(); ?>
     144            <?php printf( __( '&raquo; Search for: %s', 'wporg-showcase' ), get_search_query() ); ?>
    145145        <?php elseif ( strstr( $_SERVER['REQUEST_URI'], '/showcase/archives' ) ) : ?>
    146             &raquo; Archives
     146            <?php _e( '&raquo; Archives', 'wporg-showcase' ); ?>
    147147        <?php else : ?>
    148148            <?php if ( is_category() ) : ?>
    149                 &raquo; Flavor
     149                <?php _e( '&raquo; Flavor', 'wporg-showcase' ); ?>
    150150            <?php elseif ( is_tag() ) : ?>
    151                 &raquo; Tag
     151                <?php _e( '&raquo; Tag', 'wporg-showcase' ); ?>
    152152            <?php endif; // is_category ?>
    153153
    154             &raquo; <?php echo wp_get_document_title(); ?>
     154            <?php printf( __( '&raquo; %s', 'wporg-showcase' ), wp_get_document_title() ); ?>
    155155        <?php endif; // is_search ?>
    156156
     
    161161function sc_feed_author( $author ) {
    162162    if ( is_feed() )
    163         $author = 'WordPress Showcase';
     163        $author = _x( 'WordPress Showcase', 'Feed Author', 'wporg-showcase' );
    164164
    165165    return $author;
     
    175175        foreach ( $posttags as $tag ) {
    176176            if ( $tag->count > 1 && !is_tag($tag->slug) ) {
    177                 $tag_link = '<a href="' . get_term_link($tag, 'post_tag') . '" rel="tag">' . $tag->name . ' (' . $tag->count . ')</a>';
     177                $tag_link = '<a href="' . get_term_link($tag, 'post_tag') . '" rel="tag">' . sprintf( _x( '%1$s (%2$s)', 'Tag name (tag count)', 'wporg-showcase' ), $tag->name, $tag->count ) . '</a>';
    178178            } else {
    179179                $tag_link = $tag->name;
     
    249249    } elseif ( is_category() ) {
    250250        // Prepend 'Flavor: ' to category document titles.
    251         $parts['title'] = 'Flavor: ' . $parts['title'];
     251        $parts['title'] = sprintf( __( 'Flavor: %s', 'wporg-showcase' ) . $parts['title'] );
    252252    } elseif ( is_tag() ) {
    253253        // Prepend 'Tag: ' to tag document titles.
    254         $parts['title'] = 'Tag: ' . $parts['title'];
     254        $parts['title'] = sprintf( __( 'Tag: %s', 'wporg-showcase' ) . $parts['title'] );
    255255    }
    256256
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/header.php

    r2077 r2376  
    99<div id="headline">
    1010    <div class="wrapper">
    11         <h2>Showcase</h2>
     11        <h2><?php _e( 'Showcase', 'wporg-showcase' ); ?></h2>
    1212    </div>
    1313</div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/index.php

    r1474 r2376  
    2222        <?php else : // have_posts ?>
    2323           
    24             <p><?php _e('Sorry, no sites in the Showcase matched your criteria.'); ?></p>
     24            <p><?php _e( 'Sorry, no sites in the Showcase matched your criteria.', 'wporg-showcase' ); ?></p>
    2525           
    2626        <?php endif; ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/page-home.php

    r1705 r2376  
    2626                            <a href="<?php echo $wpsc_url; ?>" class="wpsc-linkout">
    2727                                <?php echo str_replace( parse_url( $wpsc_url, PHP_URL_SCHEME ) . '://', '', untrailingslashit( $wpsc_url ) ); ?>
    28                                 <span class="linkout-symbol">&#10162;</span>
     28                                <span class="linkout-symbol"><?php _ex( '&#10162;', 'linkout symbol', 'wporg-showcase' ); ?></span>
    2929                            </a>
    3030                            <?php endif; // $wpsc_url ?>
     
    3535                            ?>
    3636                            <a class="wpsc-hero-learnmore" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
    37                                 Learn More &rarr;
     37                                <?php _e( 'Learn More &rarr;', 'wporg-showcase' ); ?>
    3838                            </a>
    3939                        </div><!-- .wpsc-hero-slide-content -->
     
    5656            <?php query_posts( array( 'cat' => 4, 'posts_per_page' => 3, 'tag' => 'business', 'orderby' => 'rand' ) ); ?>
    5757            <?php if ( have_posts() ) : ?>
    58             <h3>Featured Business Sites</h3>
     58            <h3><?php _e( 'Featured Business Sites', 'wporg-showcase' ); ?></h3>
    5959            <ul class="wpsc-recent">
    6060               
     
    7979            <?php if ( have_posts() ) : ?>
    8080
    81             <h3>Recently Added Sites</h3>
     81            <h3><?php _e( 'Recently Added Sites', 'wporg-showcase' ); ?></h3>
    8282            <ul class="wpsc-recent">
    8383
     
    9797                <?php endwhile; // have_posts ?>
    9898            </ul>
    99             <a href="<?php echo home_url( '/archives/' ); ?>" class="wpsc-view-all">View All Showcase Sites &rarr;</a>
     99            <a href="<?php echo home_url( '/archives/' ); ?>" class="wpsc-view-all"><?php _e( 'View All Showcase Sites &rarr;', 'wporg-showcase' ); ?></a>
    100100           
    101101            <?php endif; // have_posts ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/page-submit.php

    r1474 r2376  
    2626<?php if ( $_POST && ! $error ) : ?>
    2727    <div id="return">
    28     <h3>Submitted!</h3>
    29     <p>Thanks! You have successfully submitted a site for consideration to be added to the WordPress Showcase. If the site you submitted is added, you will be contacted via email within one week. We appreciate your interest in the WordPress Showcase! If you'd like to submit another site, head back to the <a href="http://wordpress.org/showcase/submit-a-wordpress-site/">submission form</a>.</p>
     28    <h3><?php _e( 'Submitted!', 'wporg-showcase' ); ?></h3>
     29    <p><?php printf( __( 'Thanks! You have successfully submitted a site for consideration to be added to the WordPress Showcase. If the site you submitted is added, you will be contacted via email within one week. We appreciate your interest in the WordPress Showcase! If you\'d like to submit another site, head back to the <a href="%s">submission form</a>.', 'wporg-showcase' ), 'https://wordpress.org/showcase/submit-a-wordpress-site/' ); ?></p>
    3030    </div>
    3131<?php endif; // $_POST && ! $error ?>
     
    4848?>
    4949
    50     <?php if ( $error ) : ?>       
    51         <h3 id="return">Whoops!</h3>
     50    <?php if ( $error ) : ?>
     51        <h3 id="return"><?php _e( 'Whoops!', 'wporg-showcase' ); ?></h3>
    5252       
    5353        <?php if ( strstr( $url, 'blogspot.com' ) || strstr( $url, 'blogger.com' ) ) : ?>
    54             <p>Please submit a WordPress blog URL. Blogspot/Blogger blogs are not accepted.</p>
     54            <p><?php _e( 'Please submit a WordPress blog URL. Blogspot/Blogger blogs are not accepted.', 'wporg-showcase' ); ?></p>
    5555   
    5656        <?php elseif ( $site_detected == "NO" ) : ?>
    57             <p>We didn't detect WordPress at the given URL. Please submit the URL of a site running WordPress.</p>
     57            <p><?php _e( 'We didn\'t detect WordPress at the given URL. Please submit the URL of a site running WordPress.', 'wporg-showcase' ); ?></p>
    5858       
    5959        <?php elseif ( $site_detected == "YES" && version_compare($site_version, $latest_release, '<' ) ) : ?>
    60             <p>We were unable to detect the latest version of WordPress at the given URL.
    61             We'd prefer submissions to the showcase to be running up-to-date versions of WordPress.</p>
    62             <p>If you're sure the site is running the latest version of WordPress, then please
    63             check the URL to make sure it's accurate, and that the URL you submit points directly
    64             to the location where WordPress is running.</p>
     60            <p><?php _e( 'We were unable to detect the latest version of WordPress at the given URL. We\'d prefer submissions to the showcase to be running up-to-date versions of WordPress.', 'wporg-showcase' ); ?></p>
     61            <p><?php _e( 'If you\'re sure the site is running the latest version of WordPress, then please check the URL to make sure it\'s accurate, and that the URL you submit points directly to the location where WordPress is running.', 'wporg-showcase' ); ?></p>
    6562       
    6663        <?php else : ?>
    67             <p>There seems to have been a problem with the information you entered. Please make sure
    68             all fields have data and resubmit.</p>
     64            <p><?php _e( 'There seems to have been a problem with the information you entered. Please make sure all fields have data and resubmit.', 'wporg-showcase' ); ?></p>
    6965   
    7066        <?php endif; ?>
     
    7571    <input type="hidden" name="comment_post_ID" value="<?php echo $post->ID; ?>" />
    7672
    77     <p><label for="submitname"><?php _e('Your Name'); ?></label><br />
     73    <p><label for="submitname"><?php _e( 'Your Name', 'wporg-showcase' ); ?></label><br />
    7874    <input type="text" name="submitname" id="submitname" class="text" value="<?php echo esc_attr( $submitname ); ?>" size="28" tabindex="1" /></p>
    7975
    80     <p><label for="email"><?php _e('Your E-mail'); ?></label><br />
     76    <p><label for="email"><?php _e( 'Your E-mail', 'wporg-showcase'); ?></label><br />
    8177    <input type="text" name="email" id="email" value="<?php echo esc_attr( $email ); ?>" size="28" tabindex="2" class="text" /></p>
    8278
    83     <p><label for="url"><?php _e('Site URL'); ?></label><br />
     79    <p><label for="url"><?php _e( 'Site URL', 'wporg-showcase' ); ?></label><br />
    8480    <input type="text" name="url" id="url" value="<?php echo esc_url( $url ); ?>" size="28" tabindex="3" class="text" /></p>
    8581
    86     <p><label for="owner"><?php _e("Do you own this site? (It's okay if you don't - we just want to know for contact purposes.)"); ?></label><br />
     82    <p><label for="owner"><?php _e( "Do you own this site? (It's okay if you don't - we just want to know for contact purposes.)", 'wporg-showcase' ); ?></label><br />
    8783    <select name="owner" id="owner">
    88         <option value="yes" <?php selected( $owner, 'yes' ); ?> ><?php _e( 'Yes' ); ?></option>
    89         <option value="no" <?php selected( $owner, 'no' ); ?> ><?php _e( 'No' ); ?></option>
     84        <option value="yes" <?php selected( $owner, 'yes' ); ?> ><?php _e( 'Yes', 'wporg-showcase' ); ?></option>
     85        <option value="no" <?php selected( $owner, 'no' ); ?> ><?php _e( 'No', 'wporg-showcase' ); ?></option>
    9086    </select>
    9187
    92     <p><label for="description"><?php _e( 'Please describe the site and, if applicable, the person or organization it represents.' ); ?></label><br />
     88    <p><label for="description"><?php _e( 'Please describe the site and, if applicable, the person or organization it represents.', 'wporg-showcase' ); ?></label><br />
    9389    <textarea name="description" id="description" cols="60" rows="4" tabindex="4" class="text"><?php echo esc_textarea( $description ); ?></textarea></p>
    9490
    95     <p><label for="why"><?php _e( 'What justifies this site being added to the WordPress Showcase? What makes it unique or interesting?' ); ?></label><br />
     91    <p><label for="why"><?php _e( 'What justifies this site being added to the WordPress Showcase? What makes it unique or interesting?', 'wporg-showcase' ); ?></label><br />
    9692    <textarea name="why" id="why" cols="60" rows="4" tabindex="5" class="text"><?php echo esc_textarea( $why ); ?></textarea></p>
    9793
    98     <p class="required">* All fields are required.</p>
     94    <p class="required"><?php _e( '* All fields are required.', 'wporg-showcase' ); ?></p>
    9995
    10096    <?php
     
    114110    ?>
    115111   
    116     <p><input id="submit" type="submit" tabindex="6" value="<?php _e('Submit Site'); ?>" class="button" /></p>
     112    <p><input id="submit" type="submit" tabindex="6" value="<?php esc_attr_e( 'Submit Site', 'wporg-showcase' ); ?>" class="button" /></p>
    117113    <?php do_action( 'comment_form', $post->ID ); ?>
    118114</form>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/sidebar-left.php

    r1474 r2376  
    11        <div class="col-2 secondary">
    2             <a href="<?php echo home_url( '/submit-a-wordpress-site/' ); ?>" class="wpsc-submit-site">Submit a Site &rarr;</a>
     2            <a href="<?php echo home_url( '/submit-a-wordpress-site/' ); ?>" class="wpsc-submit-site"><?php _e( 'Submit a Site &rarr;', 'wporg-showcase' ); ?></a>
    33           
    4             <h4 class="search">Search</h4>
     4            <h4 class="search"><?php _e( 'Search', 'wporg-showcase' ); ?></h4>
    55            <?php // @todo: use get_search_form(); ?>
    66            <form method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
    77                <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" class="text" />
    8                 <input type="submit" id="searchsubmit" value="Go" class="button" />
     8                <input type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Go', 'wporg-showcase' ); ?>" class="button" />
    99            </form>
    1010           
    1111
    1212            <?php popular_tags(); ?>
    13             <a href='<?php echo home_url( '/tag-cloud/' ); ?>' class="wpsc-all-tags">View All Tags &rarr;</a>
     13            <a href='<?php echo home_url( '/tag-cloud/' ); ?>' class="wpsc-all-tags"><?php _e( 'View All Tags &rarr;', 'wporg-showcase' ); ?></a>
    1414           
    15             <h4>Browse by Flavor</h4>
     15            <h4><?php _e( 'Browse by Flavor', 'wporg-showcase' ); ?></h4>
    1616            <ul class="submenu">
    1717                <?php wp_list_categories( 'exclude=4&title_li=' ); ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/sidebar-right.php

    r1474 r2376  
    11        <div class="col-3">
    2             <h4>Top Rated</h4>
     2            <h4><?php _e( 'Top Rated', 'wporg-showcase' ); ?></h4>
    33            <table class="top-rated">
    44                <?php get_highest_rated( 'post', 10, 10 ); ?>
    55            </table>
    66
    7             <h4>Most Votes</h4>
     7            <h4><?php _e( 'Most Votes', 'wporg-showcase' ); ?></h4>
    88            <table class="most-votes">
    99                <?php get_most_rated(); ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/single.php

    r1705 r2376  
    5050                                ?>
    5151
    52                             <?php edit_post_link('Edit This', '<div class="meta">', '</div>'); ?>
     52                            <?php edit_post_link( __( 'Edit This', 'wporg-showcase' ), '<div class="meta">', '</div>'); ?>
    5353
    5454                        </div><!-- .storycontent -->
     
    5656                    </div><!-- .col-5 -->
    5757                    <div class="col-13">
    58                         <p class="button"><a href="http://<?php get_site_domain( false ); ?>">Visit Site</a></p>
     58                        <p class="button"><a href="http://<?php get_site_domain( false ); ?>"><?php _e( 'Visit Site', 'wporg-showcase' ); ?></a></p>
    5959
    60                         <h4>Rating</h4>
     60                        <h4><?php _e( 'Rating', 'wporg-showcase' ); ?></h4>
    6161                        <?php the_ratings(); ?>
    62                         <p class='rating-descrip'>Rate this site based on their implementation and use of WordPress.</p>
     62                        <p class='rating-descrip'><?php _e( 'Rate this site based on their implementation and use of WordPress.', 'wporg-showcase' ); ?></p>
    6363
    6464                        <?php wp_flavors(); ?>
    6565                        <br />
    66                         <?php tags_with_count( 'list', '<h4>Tags</h4><ul>', '', '</ul>' ); ?>
     66                        <?php tags_with_count( 'list', '<h4>' . __( 'Tags', 'wporg-showcase' ) . '</h4><ul>', '', '</ul>' ); ?>
    6767                    </div>
    6868
Note: See TracChangeset for help on using the changeset viewer.