Make WordPress Core

Changeset 39315


Ignore:
Timestamp:
11/19/2016 02:38:16 AM (8 years ago)
Author:
SergeyBiryukov
Message:

I18N: Add translator comments for strings in _deprecated_*() functions.

See #38862.

File:
1 edited

Legend:

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

    r39068 r39315  
    37793779    if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
    37803780        if ( function_exists( '__' ) ) {
    3781             if ( ! is_null( $replacement ) )
     3781            if ( ! is_null( $replacement ) ) {
     3782                /* translators: 1: PHP function name, 2: version number, 3: alternative function name */
    37823783                trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
    3783             else
     3784            } else {
     3785                /* translators: 1: PHP function name, 2: version number */
    37843786                trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
     3787            }
    37853788        } else {
    3786             if ( ! is_null( $replacement ) )
     3789            if ( ! is_null( $replacement ) ) {
    37873790                trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $function, $version, $replacement ) );
    3788             else
     3791            } else {
    37893792                trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) );
     3793            }
    37903794        }
    37913795    }
     
    39033907        $message = empty( $message ) ? '' : ' ' . $message;
    39043908        if ( function_exists( '__' ) ) {
    3905             if ( ! is_null( $replacement ) )
     3909            if ( ! is_null( $replacement ) ) {
     3910                /* translators: 1: PHP file name, 2: version number, 3: alternative file name */
    39063911                trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) . $message );
    3907             else
     3912            } else {
     3913                /* translators: 1: PHP file name, 2: version number */
    39083914                trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $file, $version ) . $message );
     3915            }
    39093916        } else {
    3910             if ( ! is_null( $replacement ) )
     3917            if ( ! is_null( $replacement ) ) {
    39113918                trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $file, $version, $replacement ) . $message );
    3912             else
     3919            } else {
    39133920                trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $file, $version ) . $message );
     3921            }
    39143922        }
    39153923    }
     
    39633971    if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
    39643972        if ( function_exists( '__' ) ) {
    3965             if ( ! is_null( $message ) )
     3973            if ( ! is_null( $message ) ) {
     3974                /* translators: 1: PHP function name, 2: version number, 3: optional message regarding the change */
    39663975                trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message ) );
    3967             else
     3976            } else {
     3977                /* translators: 1: PHP function name, 2: version number */
    39683978                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 ) );
     3979            }
    39693980        } else {
    3970             if ( ! is_null( $message ) )
     3981            if ( ! is_null( $message ) ) {
    39713982                trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message ) );
    3972             else
     3983            } else {
    39733984                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 ) );
     3985            }
    39743986        }
    39753987    }
     
    40194031        $message = empty( $message ) ? '' : ' ' . $message;
    40204032        if ( ! is_null( $replacement ) ) {
     4033            /* translators: 1: PHP hook name, 2: version number, 3: alternative hook name */
    40214034            trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $hook, $version, $replacement ) . $message );
    40224035        } else {
     4036            /* translators: 1: PHP hook name, 2: version number */
    40234037            trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $hook, $version ) . $message );
    40244038        }
Note: See TracChangeset for help on using the changeset viewer.