WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/03/2019 12:39:13 AM (6 weeks 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/wp-db.php

    r45926 r45932  
    11051105
    11061106                $message .= '<p>' . sprintf(
    1107                     /* translators: %s: database name */
     1107                    /* translators: %s: Database name. */
    11081108                    __( 'We were able to connect to the database server (which means your username and password is okay) but not able to select the %s database.' ),
    11091109                    '<code>' . htmlspecialchars( $db, ENT_QUOTES ) . '</code>'
     
    11141114
    11151115                $message .= '<li>' . sprintf(
    1116                     /* translators: 1: database user, 2: database name */
     1116                    /* translators: 1: Database user, 2: Database name. */
    11171117                    __( 'Does the user %1$s have permission to use the %2$s database?' ),
    11181118                    '<code>' . htmlspecialchars( $this->dbuser, ENT_QUOTES ) . '</code>',
     
    11211121
    11221122                $message .= '<li>' . sprintf(
    1123                     /* translators: %s: database name */
     1123                    /* translators: %s: Database name. */
    11241124                    __( 'On some systems the name of your database is prefixed with your username, so it would be like <code>username_%1$s</code>. Could that be the problem?' ),
    11251125                    htmlspecialchars( $db, ENT_QUOTES )
     
    11291129
    11301130                $message .= '<p>' . sprintf(
    1131                     /* translators: %s: support forums URL */
     1131                    /* translators: %s: Support forums URL. */
    11321132                    __( 'If you don&#8217;t know how to set up a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="%s">WordPress Support Forums</a>.' ),
    11331133                    __( 'https://wordpress.org/support/forums/' )
     
    11791179            $class = get_class( $this );
    11801180            if ( function_exists( '__' ) ) {
    1181                 /* translators: %s: database access abstraction class, usually wpdb or a class extending wpdb */
     1181                /* translators: %s: Database access abstraction class, usually wpdb or a class extending wpdb. */
    11821182                _doing_it_wrong( $class, sprintf( __( '%s must set a database connection for use with escaping.' ), $class ), '3.6.0' );
    11831183            } else {
     
    13321332                    'wpdb::prepare',
    13331333                    sprintf(
    1334                         /* translators: %s: value type */
     1334                        /* translators: %s: Value type. */
    13351335                        __( 'Unsupported value type (%s).' ),
    13361336                        gettype( $arg )
     
    13901390                    'wpdb::prepare',
    13911391                    sprintf(
    1392                         /* translators: 1: number of placeholders, 2: number of arguments passed */
     1392                        /* translators: 1: Number of placeholders, 2: Number of arguments passed. */
    13931393                        __( 'The query does not contain the correct number of placeholders (%1$d) for the number of arguments passed (%2$d).' ),
    13941394                        $placeholders,
     
    14651465        $caller = $this->get_caller();
    14661466        if ( $caller ) {
    1467             /* translators: 1: Database error message, 2: SQL query, 3: Name of the calling function */
     1467            /* translators: 1: Database error message, 2: SQL query, 3: Name of the calling function. */
    14681468            $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s made by %3$s' ), $str, $this->last_query, $caller );
    14691469        } else {
    1470             /* translators: 1: Database error message, 2: SQL query */
     1470            /* translators: 1: Database error message, 2: SQL query. */
    14711471            $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s' ), $str, $this->last_query );
    14721472        }
     
    16881688
    16891689            $message .= '<p>' . sprintf(
    1690                 /* translators: 1: wp-config.php, 2: database host */
     1690                /* translators: 1: wp-config.php, 2: Database host. */
    16911691                __( 'This either means that the username and password information in your %1$s file is incorrect or we can&#8217;t contact the database server at %2$s. This could mean your host&#8217;s database server is down.' ),
    16921692                '<code>wp-config.php</code>',
     
    17011701
    17021702            $message .= '<p>' . sprintf(
    1703                 /* translators: %s: support forums URL */
     1703                /* translators: %s: Support forums URL. */
    17041704                __( 'If you&#8217;re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href="%s">WordPress Support Forums</a>.' ),
    17051705                __( 'https://wordpress.org/support/forums/' )
     
    18481848
    18491849        $message .= '<p>' . sprintf(
    1850             /* translators: %s: database host */
     1850            /* translators: %s: Database host. */
    18511851            __( 'This means that we lost contact with the database server at %s. This could mean your host&#8217;s database server is down.' ),
    18521852            '<code>' . htmlspecialchars( $this->dbhost, ENT_QUOTES ) . '</code>'
     
    18591859
    18601860        $message .= '<p>' . sprintf(
    1861             /* translators: %s: support forums URL */
     1861            /* translators: %s: Support forums URL. */
    18621862            __( 'If you&#8217;re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href="%s">WordPress Support Forums</a>.' ),
    18631863            __( 'https://wordpress.org/support/forums/' )
     
    35073507        // Make sure the server has the required MySQL version
    35083508        if ( version_compare( $this->db_version(), $required_mysql_version, '<' ) ) {
    3509             /* translators: 1: WordPress version number, 2: Minimum required MySQL version number */
     3509            /* translators: 1: WordPress version number, 2: Minimum required MySQL version number. */
    35103510            return new WP_Error( 'database_version', sprintf( __( '<strong>ERROR</strong>: WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ) );
    35113511        }
Note: See TracChangeset for help on using the changeset viewer.