Make WordPress Core


Ignore:
Timestamp:
09/03/2019 12:39:13 AM (5 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-includes/general-template.php

    r45928 r45932  
    709709                '2.2.0',
    710710                sprintf(
    711                     /* translators: 1: 'siteurl'/'home' argument, 2: bloginfo() function name, 3: 'url' argument */
     711                    /* translators: 1: 'siteurl'/'home' argument, 2: bloginfo() function name, 3: 'url' argument. */
    712712                    __( 'The %1$s option is deprecated for the family of %2$s functions. Use the %3$s option instead.' ),
    713713                    '<code>' . $show . '</code>',
     
    774774            break;
    775775        case 'language':
    776             /* translators: Translate this to the correct language tag for your locale,
     776            /*
     777             * translators: Translate this to the correct language tag for your locale,
    777778             * see https://www.w3.org/International/articles/language-tags/ for reference.
    778779             * Do not translate into your own language.
     
    789790                '2.2.0',
    790791                sprintf(
    791                     /* translators: 1: 'text_direction' argument, 2: bloginfo() function name, 3: is_rtl() function name */
     792                    /* translators: 1: 'text_direction' argument, 2: bloginfo() function name, 3: is_rtl() function name. */
    792793                    __( 'The %1$s option is deprecated for the family of %2$s functions. Use the %3$s function instead.' ),
    793794                    '<code>' . $show . '</code>',
     
    10541055        // If it's a search, use a dynamic search results title.
    10551056    } elseif ( is_search() ) {
    1056         /* translators: %s: search phrase */
     1057        /* translators: %s: Search query. */
    10571058        $title['title'] = sprintf( __( 'Search Results for &#8220;%s&#8221;' ), get_search_query() );
    10581059
     
    10981099    // Add a page number if necessary.
    10991100    if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
    1100         /* translators: %s: page number */
     1101        /* translators: %s: Page number. */
    11011102        $title['page'] = sprintf( __( 'Page %s' ), max( $paged, $page ) );
    11021103    }
     
    12611262    // If it's a search
    12621263    if ( is_search() ) {
    1263         /* translators: 1: separator, 2: search phrase */
     1264        /* translators: 1: Separator, 2: Search query. */
    12641265        $title = sprintf( __( 'Search Results %1$s %2$s' ), $t_sep, strip_tags( $search ) );
    12651266    }
     
    15591560
    15601561    if ( is_category() ) {
    1561         /* translators: Category archive title. %s: Category name */
     1562        /* translators: Category archive title. %s: Category name. */
    15621563        $title = sprintf( __( 'Category: %s' ), single_cat_title( '', false ) );
    15631564    } elseif ( is_tag() ) {
    1564         /* translators: Tag archive title. %s: Tag name */
     1565        /* translators: Tag archive title. %s: Tag name. */
    15651566        $title = sprintf( __( 'Tag: %s' ), single_tag_title( '', false ) );
    15661567    } elseif ( is_author() ) {
    1567         /* translators: Author archive title. %s: Author name */
     1568        /* translators: Author archive title. %s: Author name. */
    15681569        $title = sprintf( __( 'Author: %s' ), '<span class="vcard">' . get_the_author() . '</span>' );
    15691570    } elseif ( is_year() ) {
    1570         /* translators: Yearly archive title. %s: Year */
     1571        /* translators: Yearly archive title. %s: Year. */
    15711572        $title = sprintf( __( 'Year: %s' ), get_the_date( _x( 'Y', 'yearly archives date format' ) ) );
    15721573    } elseif ( is_month() ) {
    1573         /* translators: Monthly archive title. %s: Month name and year */
     1574        /* translators: Monthly archive title. %s: Month name and year. */
    15741575        $title = sprintf( __( 'Month: %s' ), get_the_date( _x( 'F Y', 'monthly archives date format' ) ) );
    15751576    } elseif ( is_day() ) {
    1576         /* translators: Daily archive title. %s: Date */
     1577        /* translators: Daily archive title. %s: Date. */
    15771578        $title = sprintf( __( 'Day: %s' ), get_the_date( _x( 'F j, Y', 'daily archives date format' ) ) );
    15781579    } elseif ( is_tax( 'post_format' ) ) {
     
    15971598        }
    15981599    } elseif ( is_post_type_archive() ) {
    1599         /* translators: Post type archive title. %s: Post type name */
     1600        /* translators: Post type archive title. %s: Post type name. */
    16001601        $title = sprintf( __( 'Archives: %s' ), post_type_archive_title( '', false ) );
    16011602    } elseif ( is_tax() ) {
     
    16031604        if ( $queried_object ) {
    16041605            $tax = get_taxonomy( $queried_object->taxonomy );
    1605             /* translators: Taxonomy term archive title. 1: Taxonomy singular name, 2: Current taxonomy term */
     1606            /* translators: Taxonomy term archive title. 1: Taxonomy singular name, 2: Current taxonomy term. */
    16061607            $title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) );
    16071608        }
     
    18951896                    $url = add_query_arg( 'post_type', $parsed_args['post_type'], $url );
    18961897                }
    1897                 /* translators: 1: month name, 2: 4-digit year */
     1898                /* translators: 1: Month name, 2: 4-digit year. */
    18981899                $text = sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $result->month ), $result->year );
    18991900                if ( $parsed_args['show_post_count'] ) {
     
    21382139    );
    21392140
    2140     /* translators: Calendar caption: 1: month name, 2: 4-digit year */
     2141    /* translators: Calendar caption: 1: Month name, 2: 4-digit year. */
    21412142    $calendar_caption = _x( '%1$s %2$s', 'calendar caption' );
    21422143    $calendar_output  = '<table id="wp-calendar">
     
    22352236            // any posts today?
    22362237            $date_format = gmdate( _x( 'F j, Y', 'daily archives date format' ), strtotime( "{$thisyear}-{$thismonth}-{$day}" ) );
    2237             /* translators: Post calendar label. %s: Date */
     2238            /* translators: Post calendar label. %s: Date. */
    22382239            $label            = sprintf( __( 'Posts published on %s' ), $date_format );
    22392240            $calendar_output .= sprintf(
     
    28192820
    28202821    $defaults = array(
    2821         /* translators: Separator between blog name and feed type in feed links */
     2822        /* translators: Separator between blog name and feed type in feed links. */
    28222823        'separator' => _x( '&raquo;', 'feed link' ),
    2823         /* translators: 1: blog title, 2: separator (raquo) */
     2824        /* translators: 1: Blog title, 2: Separator (raquo). */
    28242825        'feedtitle' => __( '%1$s %2$s Feed' ),
    2825         /* translators: 1: blog title, 2: separator (raquo) */
     2826        /* translators: 1: Blog title, 2: Separator (raquo). */
    28262827        'comstitle' => __( '%1$s %2$s Comments Feed' ),
    28272828    );
     
    28612862function feed_links_extra( $args = array() ) {
    28622863    $defaults = array(
    2863         /* translators: Separator between blog name and feed type in feed links */
     2864        /* translators: Separator between blog name and feed type in feed links. */
    28642865        'separator'     => _x( '&raquo;', 'feed link' ),
    2865         /* translators: 1: blog name, 2: separator(raquo), 3: post title */
     2866        /* translators: 1: Blog name, 2: Separator (raquo), 3: Post title. */
    28662867        'singletitle'   => __( '%1$s %2$s %3$s Comments Feed' ),
    2867         /* translators: 1: blog name, 2: separator(raquo), 3: category name */
     2868        /* translators: 1: Blog name, 2: Separator (raquo), 3: Category name. */
    28682869        'cattitle'      => __( '%1$s %2$s %3$s Category Feed' ),
    2869         /* translators: 1: blog name, 2: separator(raquo), 3: tag name */
     2870        /* translators: 1: Blog name, 2: Separator (raquo), 3: Tag name. */
    28702871        'tagtitle'      => __( '%1$s %2$s %3$s Tag Feed' ),
    2871         /* translators: 1: blog name, 2: separator(raquo), 3: term name, 4: taxonomy singular name */
     2872        /* translators: 1: Blog name, 2: Separator (raquo), 3: Term name, 4: Taxonomy singular name. */
    28722873        'taxtitle'      => __( '%1$s %2$s %3$s %4$s Feed' ),
    2873         /* translators: 1: blog name, 2: separator(raquo), 3: author name */
     2874        /* translators: 1: Blog name, 2: Separator (raquo), 3: Author name. */
    28742875        'authortitle'   => __( '%1$s %2$s Posts by %3$s Feed' ),
    2875         /* translators: 1: blog name, 2: separator(raquo), 3: search phrase */
     2876        /* translators: 1: Blog name, 2: Separator (raquo), 3: Search query. */
    28762877        'searchtitle'   => __( '%1$s %2$s Search Results for &#8220;%3$s&#8221; Feed' ),
    2877         /* translators: 1: blog name, 2: separator(raquo), 3: post type name */
     2878        /* translators: 1: Blog name, 2: Separator (raquo), 3: Post type name. */
    28782879        'posttypetitle' => __( '%1$s %2$s %3$s Feed' ),
    28792880    );
Note: See TracChangeset for help on using the changeset viewer.