WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/01/2019 05:12:43 PM (7 weeks ago)
Author:
SergeyBiryukov
Message:

I18N: Improve translator comments.

  • Add missing translator comments.
  • Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various .pot file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.

File:
1 edited

Legend:

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

    r45899 r45926  
    165165function wp_protect_special_option( $option ) {
    166166    if ( 'alloptions' === $option || 'notoptions' === $option ) {
    167         wp_die( sprintf( __( '%s is a protected WP option and may not be modified' ), esc_html( $option ) ) );
     167        wp_die(
     168            sprintf(
     169                /* translators: %s: option name */
     170                __( '%s is a protected WP option and may not be modified' ),
     171                esc_html( $option )
     172            )
     173        );
    168174    }
    169175}
     
    21372143            __FUNCTION__,
    21382144            '3.0.0',
    2139             /* translators: %s: misc */
    21402145            sprintf(
     2146                /* translators: %s: misc */
    21412147                __( 'The "%s" options group has been removed. Use another settings group.' ),
    21422148                'misc'
     
    21502156            __FUNCTION__,
    21512157            '3.5.0',
    2152             /* translators: %s: privacy */
    21532158            sprintf(
     2159                /* translators: %s: privacy */
    21542160                __( 'The "%s" options group has been removed. Use another settings group.' ),
    21552161                'privacy'
     
    21902196            __FUNCTION__,
    21912197            '3.0.0',
    2192             /* translators: %s: misc */
    21932198            sprintf(
     2199                /* translators: %s: misc */
    21942200                __( 'The "%s" options group has been removed. Use another settings group.' ),
    21952201                'misc'
     
    22032209            __FUNCTION__,
    22042210            '3.5.0',
    2205             /* translators: %s: privacy */
    22062211            sprintf(
     2212                /* translators: %s: privacy */
    22072213                __( 'The "%s" options group has been removed. Use another settings group.' ),
    22082214                'privacy'
     
    22202226            __FUNCTION__,
    22212227            '4.7.0',
    2222             /* translators: 1: $sanitize_callback, 2: register_setting() */
    22232228            sprintf(
     2229                /* translators: 1: $sanitize_callback, 2: register_setting() */
    22242230                __( '%1$s is deprecated. The callback from %2$s is used instead.' ),
    22252231                '<code>$sanitize_callback</code>',
Note: See TracChangeset for help on using the changeset viewer.