Making WordPress.org

Changeset 7195


Ignore:
Timestamp:
05/12/2018 10:00:06 AM (9 years ago)
Author:
ocean90
Message:

Plugin Directory: Make use of placeholder and translator comments consistent for labels in the meta widget.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-meta.php

    r6595 r7195  
    3838                <ul>
    3939                        <?php if ( $built_for = get_the_term_list( $post->ID, 'plugin_built_for', '', ', ' ) ) : ?>
    40                                 <li><?php printf( __( 'Designed to work with: %s', 'wporg-plugins' ), $built_for ); ?></li>
    41                         <?php endif; ?>
    42 
    43                         <li><?php printf( __( 'Version: %s', 'wporg-plugins' ), '<strong>' . get_post_meta( $post->ID, 'version', true ) . '</strong>' ); ?></li>
     40                                <li>
     41                                        <?php
     42                                        printf(
     43                                                /* translators: %s: term list */
     44                                                __( 'Designed to work with: %s', 'wporg-plugins' ),
     45                                                esc_html( $built_for )
     46                                        );
     47                                        ?>
     48                                </li>
     49                        <?php endif; ?>
     50
     51                        <li>
     52                                <?php
     53                                printf(
     54                                        /* translators: %s: version number */
     55                                        __( 'Version: %s', 'wporg-plugins' ),
     56                                        '<strong>' . esc_html( get_post_meta( $post->ID, 'version', true ) ) . '</strong>'
     57                                );
     58                                ?>
     59                        </li>
     60
    4461                        <li>
    4562                                <?php
    … …  
    5269
    5370                                printf(
     71                                        /* translators: %s: time since the last update */
    5472                                        __( 'Last updated: %s', 'wporg-plugins' ),
    55                                         /* Translators: Plugin modified time. */
    56                                         '<strong>' . sprintf( __( '%s ago', 'wporg-plugins' ), '<span>' . human_time_diff( $modified_time ) . '</span>' ) . '</strong>'
     73                                        /* translators: %s: time since the last update */
     74                                        '<strong>' . wp_kses( sprintf( __( '%s ago', 'wporg-plugins' ), '<span>' . human_time_diff( $modified_time ) . '</span>', array( 'span' => true ) ) ) . '</strong>'
    5775                                );
    5876                                ?>
    5977                        </li>
    60                         <li><?php printf( __( 'Active installations: %s', 'wporg-plugins' ), '<strong>' . Template::active_installs( false ) . '</strong>' ); ?></li>
     78                        <li>
     79                                <?php
     80                                printf(
     81                                        /* translators: %s: active installations count */
     82                                        __( 'Active installations: %s', 'wporg-plugins' ),
     83                                        '<strong>' . esc_html( Template::active_installs( false ) ) . '</strong>'
     84                                );
     85                                ?>
     86                        </li>
    6187
    6288                        <?php if ( $requires = (string) get_post_meta( $post->ID, 'requires', true ) ) : ?>
    6389                                <li>
    64                                 <?php
    65                                 _e( 'Requires WordPress Version:', 'wporg-plugins' );
    66                                 echo '<strong>' . esc_html( $requires ) . '</strong>';
    67                                 ?>
     90                                        <?php
     91                                        printf(
     92                                                /* translators: %s: version number */
     93                                                __( 'Requires WordPress Version: %s', 'wporg-plugins' ),
     94                                                '<strong>' . esc_html( $requires ) . '</strong>'
     95                                        );
     96                                        ?>
    6897                                </li>
    6998                        <?php endif; ?>
    7099
    71100                        <?php if ( $tested_up_to = (string) get_post_meta( $post->ID, 'tested', true ) ) : ?>
    72                                 <li><?php printf( __( 'Tested up to: %s', 'wporg-plugins' ), '<strong>' . $tested_up_to . '</strong>' ); ?></li>
     101                                <li>
     102                                        <?php
     103                                        printf(
     104                                                /* translators: %s: version number */
     105                                                __( 'Tested up to: %s', 'wporg-plugins' ),
     106                                                '<strong>' . esc_html( $tested_up_to ) . '</strong>'
     107                                        );
     108                                        ?>
     109                                </li>
    73110                        <?php endif; ?>
    74111
    75112                        <?php if ( $requires_php = (string) get_post_meta( $post->ID, 'requires_php', true ) ) : ?>
    76113                                <li>
    77                                 <?php
    78                                 _e( 'Requires PHP Version:', 'wporg-plugins' );
    79                                 echo '<strong>' . esc_html( $requires_php ) . '</strong>';
    80                                 ?>
     114                                        <?php
     115                                        printf(
     116                                                /* translators: %s: version number */
     117                                                __( 'Requires PHP Version: %s', 'wporg-plugins' ),
     118                                                '<strong>' . esc_html( $requires_php ) . '</strong>'
     119                                        );
     120                                        ?>
    81121                                </li>
    82122                        <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.