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/formatting.php

    r45929 r45932  
    9595        }
    9696
    97         /* translators: opening curly double quote */
     97        /* translators: Opening curly double quote. */
    9898        $opening_quote = _x( '“', 'opening curly double quote' );
    99         /* translators: closing curly double quote */
     99        /* translators: Closing curly double quote. */
    100100        $closing_quote = _x( '”', 'closing curly double quote' );
    101101
    102         /* translators: apostrophe, for example in 'cause or can't */
     102        /* translators: Apostrophe, for example in 'cause or can't. */
    103103        $apos = _x( '’', 'apostrophe' );
    104104
    105         /* translators: prime, for example in 9' (nine feet) */
     105        /* translators: Prime, for example in 9' (nine feet). */
    106106        $prime = _x( '′', 'prime' );
    107         /* translators: double prime, for example in 9" (nine inches) */
     107        /* translators: Double prime, for example in 9" (nine inches). */
    108108        $double_prime = _x( '″', 'double prime' );
    109109
    110         /* translators: opening curly single quote */
     110        /* translators: Opening curly single quote. */
    111111        $opening_single_quote = _x( '‘', 'opening curly single quote' );
    112         /* translators: closing curly single quote */
     112        /* translators: Closing curly single quote. */
    113113        $closing_single_quote = _x( '’', 'closing curly single quote' );
    114114
    115         /* translators: en dash */
     115        /* translators: En dash. */
    116116        $en_dash = _x( '–', 'en dash' );
    117         /* translators: em dash */
     117        /* translators: Em dash. */
    118118        $em_dash = _x( '—', 'em dash' );
    119119
     
    126126            $cockneyreplace = array_values( $wp_cockneyreplace );
    127127        } else {
    128             /* translators: This is a comma-separated list of words that defy the syntax of quotations in normal use,
     128            /*
     129             * translators: This is a comma-separated list of words that defy the syntax of quotations in normal use,
    129130             * for example...  'We do not have enough words yet' ... is a typical quoted phrase.  But when we write
    130131             * lines of code 'til we have enough of 'em, then we need to insert apostrophes instead of quotes.
     
    36393640            $secs = 1;
    36403641        }
    3641         /* translators: Time difference between two dates, in seconds. %s: Number of seconds */
     3642        /* translators: Time difference between two dates, in seconds. %s: Number of seconds. */
    36423643        $since = sprintf( _n( '%s second', '%s seconds', $secs ), $secs );
    36433644    } elseif ( $diff < HOUR_IN_SECONDS && $diff >= MINUTE_IN_SECONDS ) {
     
    36463647            $mins = 1;
    36473648        }
    3648         /* translators: Time difference between two dates, in minutes (min=minute). %s: Number of minutes */
     3649        /* translators: Time difference between two dates, in minutes (min=minute). %s: Number of minutes. */
    36493650        $since = sprintf( _n( '%s min', '%s mins', $mins ), $mins );
    36503651    } elseif ( $diff < DAY_IN_SECONDS && $diff >= HOUR_IN_SECONDS ) {
     
    36533654            $hours = 1;
    36543655        }
    3655         /* translators: Time difference between two dates, in hours. %s: Number of hours */
     3656        /* translators: Time difference between two dates, in hours. %s: Number of hours. */
    36563657        $since = sprintf( _n( '%s hour', '%s hours', $hours ), $hours );
    36573658    } elseif ( $diff < WEEK_IN_SECONDS && $diff >= DAY_IN_SECONDS ) {
     
    36603661            $days = 1;
    36613662        }
    3662         /* translators: Time difference between two dates, in days. %s: Number of days */
     3663        /* translators: Time difference between two dates, in days. %s: Number of days. */
    36633664        $since = sprintf( _n( '%s day', '%s days', $days ), $days );
    36643665    } elseif ( $diff < MONTH_IN_SECONDS && $diff >= WEEK_IN_SECONDS ) {
     
    36673668            $weeks = 1;
    36683669        }
    3669         /* translators: Time difference between two dates, in weeks. %s: Number of weeks */
     3670        /* translators: Time difference between two dates, in weeks. %s: Number of weeks. */
    36703671        $since = sprintf( _n( '%s week', '%s weeks', $weeks ), $weeks );
    36713672    } elseif ( $diff < YEAR_IN_SECONDS && $diff >= MONTH_IN_SECONDS ) {
     
    36743675            $months = 1;
    36753676        }
    3676         /* translators: Time difference between two dates, in months. %s: Number of months */
     3677        /* translators: Time difference between two dates, in months. %s: Number of months. */
    36773678        $since = sprintf( _n( '%s month', '%s months', $months ), $months );
    36783679    } elseif ( $diff >= YEAR_IN_SECONDS ) {
     
    36813682            $years = 1;
    36823683        }
    3683         /* translators: Time difference between two dates, in years. %s: Number of years */
     3684        /* translators: Time difference between two dates, in years. %s: Number of years. */
    36843685        $since = sprintf( _n( '%s year', '%s years', $years ), $years );
    36853686    }
     
    47004701            if ( 'permalink_structure' === $option && '' !== $value && ! preg_match( '/%[^\/%]+%/', $value ) ) {
    47014702                $error = sprintf(
    4702                     /* translators: %s: Documentation URL */
     4703                    /* translators: %s: Documentation URL. */
    47034704                    __( 'A structure tag is required when using custom permalinks. <a href="%s">Learn more</a>' ),
    47044705                    __( 'https://wordpress.org/support/article/using-permalinks/#choosing-your-permalink-structure' )
     
    49414942        'wp_sprintf_l',
    49424943        array(
    4943             /* translators: used to join items in a list with more than 2 items */
     4944            /* translators: Used to join items in a list with more than 2 items. */
    49444945            'between'          => sprintf( __( '%1$s, %2$s' ), '', '' ),
    4945             /* translators: used to join last two items in a list with more than 2 times */
     4946            /* translators: Used to join last two items in a list with more than 2 times. */
    49464947            'between_last_two' => sprintf( __( '%1$s, and %2$s' ), '', '' ),
    4947             /* translators: used to join items in a list with only 2 items */
     4948            /* translators: Used to join items in a list with only 2 items. */
    49484949            'between_only_two' => sprintf( __( '%1$s and %2$s' ), '', '' ),
    49494950        )
Note: See TracChangeset for help on using the changeset viewer.