Make WordPress Core

Changeset 38344


Ignore:
Timestamp:
08/23/2016 11:47:28 PM (8 years ago)
Author:
SergeyBiryukov
Message:

I18N: Add translator comments for strings in wp-includes/functions.php.

Props ramiy.
Fixes #37802.

File:
1 edited

Legend:

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

    r38334 r38344  
    14121412
    14131413        // Die with a DB error.
    1414         $wpdb->error = sprintf( __( 'One or more database tables are unavailable. The database may need to be <a href="%s">repaired</a>.' ), 'maint/repair.php?referrer=is_blog_installed' );
     1414        $wpdb->error = sprintf(
     1415            /* translators: %s: database repair URL */
     1416            __( 'One or more database tables are unavailable. The database may need to be <a href="%s">repaired</a>.' ),
     1417            'maint/repair.php?referrer=is_blog_installed'
     1418        );
     1419
    14151420        dead_db();
    14161421    }
     
    18961901                }
    18971902
    1898                 $uploads['error'] = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), esc_html( $error_path ) );
     1903                $uploads['error'] = sprintf(
     1904                    /* translators: %s: directory path */
     1905                    __( 'Unable to create directory %s. Is its parent directory writable by the server?' ),
     1906                    esc_html( $error_path )
     1907                );
    18991908            }
    19001909
     
    21582167            $error_path = basename( $upload['basedir'] ) . $upload['subdir'];
    21592168
    2160         $message = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), $error_path );
     2169        $message = sprintf(
     2170            /* translators: %s: directory path */
     2171            __( 'Unable to create directory %s. Is its parent directory writable by the server?' ),
     2172            $error_path
     2173        );
    21612174        return array( 'error' => $message );
    21622175    }
     
    25172530function wp_nonce_ays( $action ) {
    25182531    if ( 'log-out' == $action ) {
    2519         $html = sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'name' ) ) . '</p><p>';
     2532        $html = sprintf(
     2533            /* translators: %s: site name */
     2534            __( 'You are attempting to log out of %s' ),
     2535            get_bloginfo( 'name' )
     2536        );
     2537        $html .= '</p><p>';
    25202538        $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
    2521         $html .= sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url( $redirect_to ) );
     2539        $html .= sprintf(
     2540            /* translators: %s: logout URL */
     2541            __( 'Do you really want to <a href="%s">log out</a>?' ),
     2542            wp_logout_url( $redirect_to )
     2543        );
    25222544    } else {
    25232545        $html = __( 'Are you sure you want to do this?' );
    2524         if ( wp_get_referer() )
    2525             $html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>";
     2546        if ( wp_get_referer() ) {
     2547            $html .= '</p><p>';
     2548            $html .= sprintf( '<a href="%s">%s</a>',
     2549                esc_url( remove_query_arg( 'updated', wp_get_referer() ) ),
     2550                __( 'Please try again.' )
     2551            );
     2552        }
    25262553    }
    25272554
     
    39914018    if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) {
    39924019        if ( function_exists( '__' ) ) {
    3993             $version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version );
     4020            if ( is_null( $version ) ) {
     4021                $version = '';
     4022            } else {
     4023                /* translators: %s: version number */
     4024                $version = sprintf( __( '(This message was added in version %s.)' ), $version );
     4025            }
    39944026            /* translators: %s: Codex URL */
    39954027            $message .= ' ' . sprintf( __( 'Please see <a href="%s">Debugging in WordPress</a> for more information.' ),
     
    39984030            trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
    39994031        } else {
    4000             $version = is_null( $version ) ? '' : sprintf( '(This message was added in version %s.)', $version );
     4032            if ( is_null( $version ) ) {
     4033                $version = '';
     4034            } else {
     4035                $version = sprintf( '(This message was added in version %s.)', $version );
     4036            }
    40014037            $message .= sprintf( ' Please see <a href="%s">Debugging in WordPress</a> for more information.',
    40024038                'https://codex.wordpress.org/Debugging_in_WordPress'
Note: See TracChangeset for help on using the changeset viewer.