WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/03/2019 12:39:13 AM (2 months 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/functions.php

    r45928 r45932  
    327327    }
    328328
    329     /* translators: If months in your language require a genitive case,
     329    /*
     330     * translators: If months in your language require a genitive case,
    330331     * translate this to 'on'. Do not translate into your own language.
    331332     */
     
    500501    // Add the hour part to the string.
    501502    if ( is_numeric( $hour ) ) {
    502         /* translators: Time duration in hour or hours. */
     503        /* translators: %s: Time duration in hour or hours. */
    503504        $human_readable_duration[] = sprintf( _n( '%s hour', '%s hours', $hour ), (int) $hour );
    504505    }
     
    506507    // Add the minute part to the string.
    507508    if ( is_numeric( $minute ) ) {
    508         /* translators: Time duration in minute or minutes. */
     509        /* translators: %s: Time duration in minute or minutes. */
    509510        $human_readable_duration[] = sprintf( _n( '%s minute', '%s minutes', $minute ), (int) $minute );
    510511    }
     
    512513    // Add the second part to the string.
    513514    if ( is_numeric( $second ) ) {
    514         /* translators: Time duration in second or seconds. */
     515        /* translators: %s: Time duration in second or seconds. */
    515516        $human_readable_duration[] = sprintf( _n( '%s second', '%s seconds', $second ), (int) $second );
    516517    }
     
    16961697        // Die with a DB error.
    16971698        $wpdb->error = sprintf(
    1698             /* translators: %s: database repair URL */
     1699            /* translators: %s: Database repair URL. */
    16991700            __( 'One or more database tables are unavailable. The database may need to be <a href="%s">repaired</a>.' ),
    17001701            'maint/repair.php?referrer=is_blog_installed'
     
    22302231
    22312232                $uploads['error'] = sprintf(
    2232                     /* translators: %s: directory path */
     2233                    /* translators: %s: Directory path. */
    22332234                    __( 'Unable to create directory %s. Is its parent directory writable by the server?' ),
    22342235                    esc_html( $error_path )
     
    25162517
    25172518        $message = sprintf(
    2518             /* translators: %s: directory path */
     2519            /* translators: %s: Directory path. */
    25192520            __( 'Unable to create directory %s. Is its parent directory writable by the server?' ),
    25202521            $error_path
     
    25262527    if ( ! $ifp ) {
    25272528        return array(
    2528             /* translators: %s: file name */
     2529            /* translators: %s: File name. */
    25292530            'error' => sprintf( __( 'Could not write file %s' ), $new_file ),
    25302531        );
     
    30343035    if ( 'log-out' == $action ) {
    30353036        $html = sprintf(
    3036             /* translators: %s: site name */
     3037            /* translators: %s: Site title. */
    30373038            __( 'You are attempting to log out of %s' ),
    30383039            get_bloginfo( 'name' )
     
    30413042        $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
    30423043        $html       .= sprintf(
    3043             /* translators: %s: logout URL */
     3044            /* translators: %s: Logout URL. */
    30443045            __( 'Do you really want to <a href="%s">log out</a>?' ),
    30453046            wp_logout_url( $redirect_to )
     
    45714572        if ( function_exists( '__' ) ) {
    45724573            if ( ! is_null( $replacement ) ) {
    4573                 /* translators: 1: PHP function name, 2: version number, 3: alternative function name */
     4574                /* translators: 1: PHP function name, 2: Version number, 3: Alternative function name. */
    45744575                trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $function, $version, $replacement ) );
    45754576            } else {
    4576                 /* translators: 1: PHP function name, 2: version number */
     4577                /* translators: 1: PHP function name, 2: Version number. */
    45774578                trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $function, $version ) );
    45784579            }
     
    46354636                trigger_error(
    46364637                    sprintf(
    4637                         /* translators: 1: PHP class name, 2: PHP parent class name, 3: version number, 4: __construct() method */
     4638                        /* translators: 1: PHP class name, 2: PHP parent class name, 3: Version number, 4: __construct() method. */
    46384639                        __( 'The called constructor method for %1$s in %2$s is <strong>deprecated</strong> since version %3$s! Use %4$s instead.' ),
    46394640                        $class,
     
    46464647                trigger_error(
    46474648                    sprintf(
    4648                         /* translators: 1: PHP class name, 2: version number, 3: __construct() method */
     4649                        /* translators: 1: PHP class name, 2: Version number, 3: __construct() method. */
    46494650                        __( 'The called constructor method for %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ),
    46504651                        $class,
     
    47254726        if ( function_exists( '__' ) ) {
    47264727            if ( ! is_null( $replacement ) ) {
    4727                 /* translators: 1: PHP file name, 2: version number, 3: alternative file name */
     4728                /* translators: 1: PHP file name, 2: Version number, 3: Alternative file name. */
    47284729                trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $file, $version, $replacement ) . $message );
    47294730            } else {
    4730                 /* translators: 1: PHP file name, 2: version number */
     4731                /* translators: 1: PHP file name, 2: Version number. */
    47314732                trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $file, $version ) . $message );
    47324733            }
     
    47884789        if ( function_exists( '__' ) ) {
    47894790            if ( ! is_null( $message ) ) {
    4790                 /* translators: 1: PHP function name, 2: version number, 3: optional message regarding the change */
     4791                /* translators: 1: PHP function name, 2: Version number, 3: Optional message regarding the change. */
    47914792                trigger_error( sprintf( __( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s' ), $function, $version, $message ) );
    47924793            } else {
    4793                 /* translators: 1: PHP function name, 2: version number */
     4794                /* translators: 1: PHP function name, 2: Version number. */
    47944795                trigger_error( sprintf( __( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $function, $version ) );
    47954796            }
     
    48474848        $message = empty( $message ) ? '' : ' ' . $message;
    48484849        if ( ! is_null( $replacement ) ) {
    4849             /* translators: 1: WordPress hook name, 2: version number, 3: alternative hook name */
     4850            /* translators: 1: WordPress hook name, 2: Version number, 3: Alternative hook name. */
    48504851            trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $hook, $version, $replacement ) . $message );
    48514852        } else {
    4852             /* translators: 1: WordPress hook name, 2: version number */
     4853            /* translators: 1: WordPress hook name, 2: Version number. */
    48534854            trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $hook, $version ) . $message );
    48544855        }
     
    49014902                $version = '';
    49024903            } else {
    4903                 /* translators: %s: version number */
     4904                /* translators: %s: Version number. */
    49044905                $version = sprintf( __( '(This message was added in version %s.)' ), $version );
    49054906            }
    49064907            $message .= ' ' . sprintf(
    4907                 /* translators: %s: Documentation URL */
     4908                /* translators: %s: Documentation URL. */
    49084909                __( 'Please see <a href="%s">Debugging in WordPress</a> for more information.' ),
    49094910                __( 'https://wordpress.org/support/article/debugging-in-wordpress/' )
    49104911            );
    4911             /* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Version information message */
     4912            /* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Version information message. */
    49124913            trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
    49134914        } else {
     
    67546755    $email_change_email = array(
    67556756        'to'      => $old_email,
    6756         /* translators: Site admin email change notification email subject. %s: Site title */
     6757        /* translators: Site admin email change notification email subject. %s: Site title. */
    67576758        'subject' => __( '[%s] Admin Email Changed' ),
    67586759        'message' => $email_change_text,
     
    68976898            break;
    68986899        case 'text':
    6899             /* translators: deleted text */
     6900            /* translators: Deleted text. */
    69006901            $anonymous = __( '[deleted]' );
    69016902            break;
    69026903        case 'longtext':
    6903             /* translators: deleted long text */
     6904            /* translators: Deleted long text. */
    69046905            $anonymous = __( 'This content was deleted by the author.' );
    69056906            break;
     
    71177118
    71187119    $annotation = sprintf(
    7119         /* translators: %s: default Update PHP page URL */
     7120        /* translators: %s: Default Update PHP page URL. */
    71207121        __( 'This resource is provided by your web host, and is specific to your site. For more information, <a href="%s" target="_blank">see the official WordPress documentation</a>.' ),
    71217122        esc_url( $default_url )
     
    71767177        esc_url( $direct_update_url ),
    71777178        __( 'Update PHP' ),
    7178         /* translators: accessibility text */
     7179        /* translators: Accessibility text. */
    71797180        __( '(opens in a new tab)' )
    71807181    );
Note: See TracChangeset for help on using the changeset viewer.