Making WordPress.org


Ignore:
Timestamp:
04/15/2015 08:56:26 AM (11 years ago)
Author:
dd32
Message:

Theme Directory: Improve localisation by properly using a consistent text domain, and not relying upon strings contained within wp-admin.
This removes the Nav menu, replacing it with a hard-coded menu, and hard-coded site title.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-single.php

    r1465 r1477  
    33                <button class="close"><?php _e( 'Return to Themes List', 'wporg-themes' ); ?></button>
    44                <div class="navigation post-navigation">
    5                         <button class="left dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show previous theme' ); ?></span></button>
    6                         <button class="right dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show next theme' ); ?></span></button>
     5                        <button class="left dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show previous theme', 'wporg-themes' ); ?></span></button>
     6                        <button class="right dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show next theme', 'wporg-themes' ); ?></span></button>
    77                </div>
    88        </div>
     
    1717                        <div>
    1818                                <h3 class="theme-name entry-title" itemprop="name">{{{ data.name }}}</h3>
    19                                 <h4 class="theme-author"><?php printf( __( 'by %s' ), '<a href="https://wordpress.org/themes/author/{{ data.author.user_nicename }}/"><span class="author" itemprop="author">{{{ data.author.display_name }}}</span></a>' ); ?></h4>
     19                                <h4 class="theme-author"><?php printf( __( 'by %s', 'wporg-themes' ), '<a href="https://wordpress.org/themes/author/{{ data.author.user_nicename }}/"><span class="author" itemprop="author">{{{ data.author.display_name }}}</span></a>' ); ?></h4>
    2020                        </div>
    2121
    2222                        <div class="theme-head">
    2323                                <div class="theme-actions clear">
    24                                         <a href="{{{ data.preview_url }}}" class="button button-secondary alignleft"><?php _e( 'Preview' ); ?></a>
    25                                         <a href="//downloads.wordpress.org/theme/{{ data.slug }}.{{ data.version }}.zip" class="button button-primary alignright"><?php _e( 'Download' ); ?></a>
     24                                        <a href="{{{ data.preview_url }}}" class="button button-secondary alignleft"><?php _e( 'Preview', 'wporg-themes' ); ?></a>
     25                                        <a href="//downloads.wordpress.org/theme/{{ data.slug }}.{{ data.version }}.zip" class="button button-primary alignright"><?php _e( 'Download', 'wporg-themes' ); ?></a>
    2626                                </div>
    2727
    2828                                <# if ( data.parent ) { #>
    2929                                <div class="theme-notice notice notice-info">
    30                                         <p class="parent"><?php printf( __( 'This is a child theme of %s.' ), sprintf( '<a href="/themes/%1$s/">%2$s</a>', '{{{ data.parent.slug }}}', '{{{ data.parent.name }}}' ) ); ?></p>
     30                                        <p class="parent"><?php printf( __( 'This is a child theme of %s.', 'wporg-themes' ), sprintf( '<a href="/themes/%1$s/">%2$s</a>', '{{{ data.parent.slug }}}', '{{{ data.parent.name }}}' ) ); ?></p>
    3131                                </div>
    3232                                <# } #>
     
    5151                                <# if ( data.tags ) { #>
    5252                                <div class="theme-tags">
    53                                         <h4><?php _e( 'Tags:' ); ?></h4>
     53                                        <h4><?php _e( 'Tags:', 'wporg-themes' ); ?></h4>
    5454                                        {{{ data.tags }}}
    5555                                </div><!-- .theme-tags -->
     
    5757
    5858                                <div class="theme-downloads">
    59                                         <h4><?php _e( 'Downloads Per Day' ); ?></h4>
     59                                        <h4><?php _e( 'Downloads Per Day', 'wporg-themes' ); ?></h4>
    6060                                        <div id="theme-download-stats-{{data.id}}" class="chart"></div>
    61                                         <p class="total-downloads"><?php printf( __( 'Total downloads: %s' ), '<strong>{{ data.downloaded }}</strong>' ); ?></p>
     61                                        <p class="total-downloads"><?php printf( __( 'Total downloads: %s', 'wporg-themes' ), '<strong>{{ data.downloaded }}</strong>' ); ?></p>
    6262                                </div><!-- .theme-downloads -->
    6363                        </div>
     
    8787                                                <li class="counter-container">
    8888                                                        <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=5" title="<?php echo esc_attr( sprintf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 5 ) ); ?>">
    89                                                                 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 5 ); ?></span>
     89                                                                <span class="counter-label"><?php printf( _n( '%d star', '%d stars', 5, 'wporg-themes' ), 5 ); ?></span>
    9090                                                                <span class="counter-back">
    9191                                                                        <span class="counter-bar" style="width: {{ 100 * data.ratings[5] / data.num_ratings }}%;"></span>
     
    9696                                                <li class="counter-container">
    9797                                                        <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=4" title="<?php echo esc_attr( sprintf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 4 ) ); ?>">
    98                                                                 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 4 ); ?></span>
     98                                                                <span class="counter-label"><?php printf( _n( '%d star', '%d stars', 4, 'wporg-themes' ), 4 ); ?></span>
    9999                                                                <span class="counter-back">
    100100                                                                        <span class="counter-bar" style="width: {{ 100 * data.ratings[4] / data.num_ratings }}%;"></span>
     
    105105                                                <li class="counter-container">
    106106                                                        <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=3" title="<?php echo esc_attr( sprintf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 3 ) ); ?>">
    107                                                                 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 3 ); ?></span>
     107                                                                <span class="counter-label"><?php printf( _n( '%d star', '%d stars', 3, 'wporg-themes' ), 3 ); ?></span>
    108108                                                                <span class="counter-back">
    109109                                                                        <span class="counter-bar" style="width: {{ 100 * data.ratings[3] / data.num_ratings }}%;"></span>
     
    114114                                                <li class="counter-container">
    115115                                                        <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=2" title="<?php echo esc_attr( sprintf( __( 'Click to see reviews that provided a rating of %d stars', 'wporg-themes' ), 2 ) ); ?>">
    116                                                                 <span class="counter-label"><?php printf( __( '%d stars', 'wporg-themes' ), 2 ); ?></span>
     116                                                                <span class="counter-label"><?php printf( _n( '%d star', '%d stars', 2, 'wporg-themes' ), 2 ); ?></span>
    117117                                                                <span class="counter-back">
    118118                                                                        <span class="counter-bar" style="width: {{ 100 * data.ratings[2] / data.num_ratings }}%;"></span>
     
    123123                                                <li class="counter-container">
    124124                                                        <a href="//wordpress.org/support/view/theme-reviews/{{ data.id }}?filter=1" title="<?php esc_attr_e( 'Click to see reviews that provided a rating of 1 star', 'wporg-themes' ); ?>">
    125                                                                 <span class="counter-label"><?php _e( '1 star', 'wporg-themes' ); ?></span>
     125                                                                <span class="counter-label"><?php printf( _n( '%d star', '%d stars', 1, 'wporg-themes' ), 1 ); ?></span>
    126126                                                                <span class="counter-back">
    127127                                                                        <span class="counter-bar" style="width: {{ 100 * data.ratings[1] / data.num_ratings }}%;"></span>
     
    149149                                                        <a href="//themes.trac.wordpress.org/log/{{data.id}}?limit=100&mode=stop_on_copy&format=rss">
    150150                                                                <img src="//s.w.org/style/images/feedicon.png" />
    151                                                                 <?php _e( 'Development Log', 'wporg' ); ?>
     151                                                                <?php _e( 'Development Log', 'wporg-themes' ); ?>
    152152                                                        </a>
    153153                                                </li>
Note: See TracChangeset for help on using the changeset viewer.