Make WordPress Core


Ignore:
Timestamp:
09/03/2019 12:39:13 AM (7 years ago)
Author:
SergeyBiryukov
Message:

I18N: Capitalize translator comments consistently, add trailing punctuation.

Includes minor code layout fixes.

See #44360.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/media.php

    r45926 r45932  
    6161        }
    6262
    63         /* translators: %s: number of attachments */
     63        /* translators: %s: Number of attachments. */
    6464        $tabs['gallery'] = sprintf( __( 'Gallery (%s)' ), "<span id='attachments-count'>$attachments</span>" );
    6565
     
    324324
    325325                        if ( ! empty( $meta['album'] ) && ! empty( $meta['artist'] ) ) {
    326                                 /* translators: 1: audio track title, 2: album title, 3: artist name */
     326                                /* translators: 1: Audio track title, 2: Album title, 3: Artist name. */
    327327                                $content .= sprintf( __( '"%1$s" from %2$s by %3$s.' ), $title, $meta['album'], $meta['artist'] );
    328328                        } elseif ( ! empty( $meta['album'] ) ) {
    329                                 /* translators: 1: audio track title, 2: album title */
     329                                /* translators: 1: Audio track title, 2: Album title. */
    330330                                $content .= sprintf( __( '"%1$s" from %2$s.' ), $title, $meta['album'] );
    331331                        } elseif ( ! empty( $meta['artist'] ) ) {
    332                                 /* translators: 1: audio track title, 2: artist name */
     332                                /* translators: 1: Audio track title, 2: Artist name. */
    333333                                $content .= sprintf( __( '"%1$s" by %2$s.' ), $title, $meta['artist'] );
    334334                        } else {
    335                                 /* translators: %s: audio track title */
     335                                /* translators: %s: Audio track title. */
    336336                                $content .= sprintf( __( '"%s".' ), $title );
    337337                        }
     
    339339
    340340                        if ( ! empty( $meta['artist'] ) ) {
    341                                 /* translators: 1: audio album title, 2: artist name */
     341                                /* translators: 1: Audio album title, 2: Artist name. */
    342342                                $content .= sprintf( __( '%1$s by %2$s.' ), $meta['album'], $meta['artist'] );
    343343                        } else {
     
    351351
    352352                if ( ! empty( $meta['year'] ) ) {
    353                         /* translators: Audio file track information. %d: Year of audio track release */
     353                        /* translators: Audio file track information. %d: Year of audio track release. */
    354354                        $content .= ' ' . sprintf( __( 'Released: %d.' ), $meta['year'] );
    355355                }
     
    358358                        $track_number = explode( '/', $meta['track_number'] );
    359359                        if ( isset( $track_number[1] ) ) {
    360                                 /* translators: Audio file track information. 1: Audio track number, 2: Total audio tracks */
     360                                /* translators: Audio file track information. 1: Audio track number, 2: Total audio tracks. */
    361361                                $content .= ' ' . sprintf( __( 'Track %1$s of %2$s.' ), number_format_i18n( $track_number[0] ), number_format_i18n( $track_number[1] ) );
    362362                        } else {
    363                                 /* translators: Audio file track information. %s: Audio track number */
     363                                /* translators: Audio file track information. %s: Audio track number. */
    364364                                $content .= ' ' . sprintf( __( 'Track %s.' ), number_format_i18n( $track_number[0] ) );
    365365                        }
     
    367367
    368368                if ( ! empty( $meta['genre'] ) ) {
    369                         /* translators: Audio file genre information. %s: Audio genre name */
     369                        /* translators: Audio file genre information. %s: Audio genre name. */
    370370                        $content .= ' ' . sprintf( __( 'Genre: %s.' ), $meta['genre'] );
    371371                }
     
    16041604                <tr><td style='display:none' colspan='2' class='image-editor' id='image-editor-$post->ID'></td></tr>\n
    16051605                <tr><td colspan='2'><p class='media-types media-types-required-info'>" .
    1606                         /* translators: %s: an asterisk symbol (*) */
     1606                        /* translators: %s: Asterisk symbol (*). */
    16071607                        sprintf( __( 'Required fields are marked %s' ), '<span class="required">*</span>' ) .
    16081608                "</p></td></tr>\n";
     
    16261626                        $delete = "<a href='#' class='del-link' onclick=\"document.getElementById('del_attachment_$attachment_id').style.display='block';return false;\">" . __( 'Delete' ) . "</a>
    16271627                                <div id='del_attachment_$attachment_id' class='del-attachment' style='display:none;'>" .
    1628                                 /* translators: %s: file name */
     1628                                /* translators: %s: File name. */
    16291629                                '<p>' . sprintf( __( 'You are about to delete %s.' ), '<strong>' . $filename . '</strong>' ) . "</p>
    16301630                                <a href='" . wp_nonce_url( "post.php?action=delete&amp;post=$attachment_id", 'delete-post_' . $attachment_id ) . "' id='del[$attachment_id]' class='button'>" . __( 'Continue' ) . "</a>
     
    19111911        if ( $item ) {
    19121912                $item = '<p class="media-types media-types-required-info">' .
    1913                         /* translators: %s: an asterisk symbol (*) */
     1913                        /* translators: %s: Asterisk symbol (*). */
    19141914                        sprintf( __( 'Required fields are marked %s' ), '<span class="required">*</span>' ) .
    19151915                        '</p>' .
     
    21432143<p class="max-upload-size">
    21442144        <?php
    2145         /* translators: %s: maximum allowed file size */
     2145        /* translators: %s: Maximum allowed file size. */
    21462146        printf( __( 'Maximum upload file size: %s.' ), esc_html( size_format( $max_upload_size ) ) );
    21472147        ?>
     
    27922792        <p class="media-types"><label><input type="radio" name="media_type" value="image" id="image-only"' . checked( 'image-only', $view, false ) . ' /> ' . __( 'Image' ) . '</label> &nbsp; &nbsp; <label><input type="radio" name="media_type" value="generic" id="not-image"' . checked( 'not-image', $view, false ) . ' /> ' . __( 'Audio, Video, or Other File' ) . '</label></p>
    27932793        <p class="media-types media-types-required-info">' .
    2794                 /* translators: %s: an asterisk symbol (*) */
     2794                /* translators: %s: Asterisk symbol (*). */
    27952795                sprintf( __( 'Required fields are marked %s' ), '<span class="required">*</span>' ) .
    27962796        '</p>
     
    28832883        <?php
    28842884                printf(
    2885                         /* translators: 1: URL to browser uploader, 2: additional link attributes */
     2885                        /* translators: 1: URL to browser uploader, 2: Additional link attributes. */
    28862886                        __( 'You are using the multi-file uploader. Problems? Try the <a href="%1$s" %2$s>browser uploader</a> instead.' ),
    28872887                        $browser_uploader,
     
    29312931<input name="image_resize" type="checkbox" id="image_resize" value="true"<?php echo $checked; ?> />
    29322932        <?php
    2933         /* translators: 1: link start tag, 2: link end tag, 3: width, 4: height */
     2933        /* translators: 1: Link start tag, 2: Link end tag, 3: Width, 4: Height. */
    29342934        printf( __( 'Scale images to match the large size selected in %1$simage options%2$s (%3$d &times; %4$d).' ), $a, $end, (int) get_option( 'large_size_w', '1024' ), (int) get_option( 'large_size_h', '1024' ) );
    29352935        ?>
     
    29452945function multisite_over_quota_message() {
    29462946        echo '<p>' . sprintf(
    2947                 /* translators: %s: allowed space allocation */
     2947                /* translators: %s: Allowed space allocation. */
    29482948                __( 'Sorry, you have used your space allocation of %s. Please delete some files to upload more files.' ),
    29492949                size_format( get_space_allowed() * MB_IN_BYTES )
     
    30683068                        <?php
    30693069                        printf(
    3070                                 /* translators: 1: link to tutorial, 2: additional link attributes, 3: accessibility text */
     3070                                /* translators: 1: Link to tutorial, 2: Additional link attributes, 3: Accessibility text. */
    30713071                                __( '<a href="%1$s" %2$s>Describe the purpose of the image%3$s</a>. Leave empty if the image is purely decorative.' ),
    30723072                                esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ),
     
    30743074                                sprintf(
    30753075                                        '<span class="screen-reader-text"> %s</span>',
    3076                                         /* translators: accessibility text */
     3076                                        /* translators: Accessibility text. */
    30773077                                        __( '(opens in a new tab)' )
    30783078                                )
Note: See TracChangeset for help on using the changeset viewer.