WordPress.org

Make WordPress Core

Changeset 40067


Ignore:
Timestamp:
02/17/17 02:22:40 (4 months ago)
Author:
SergeyBiryukov
Message:

I18N: Remove <code> tags from translatable strings in wp-includes/customize/class-wp-customize-custom-css-setting.php.

Fixes #39898.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-custom-css-setting.php

    r39559 r40067  
    176176        // Make sure that there is a closing brace for each opening brace. 
    177177        if ( ! $this->validate_balanced_characters( '{', '}', $css ) ) { 
    178             $validity->add( 'imbalanced_curly_brackets', __( 'Your curly brackets <code>{}</code> are imbalanced. Make sure there is a closing <code>}</code> for every opening <code>{</code>.' ) ); 
     178            $validity->add( 'imbalanced_curly_brackets', sprintf( 
     179                /* translators: 1: {}, 2: }, 3: { */ 
     180                __( 'Your curly brackets %1$s are imbalanced. Make sure there is a closing %2$s for every opening %3$s.' ), 
     181                '<code>{}</code>', 
     182                '<code>}</code>', 
     183                '<code>{</code>' 
     184            ) ); 
    179185            $imbalanced = true; 
    180186        } 
     
    182188        // Ensure brackets are balanced. 
    183189        if ( ! $this->validate_balanced_characters( '[', ']', $css ) ) { 
    184             $validity->add( 'imbalanced_braces', __( 'Your brackets <code>[]</code> are imbalanced. Make sure there is a closing <code>]</code> for every opening <code>[</code>.' ) ); 
     190            $validity->add( 'imbalanced_braces', sprintf( 
     191                /* translators: 1: [], 2: ], 3: [ */ 
     192                __( 'Your brackets %1$s are imbalanced. Make sure there is a closing %2$s for every opening %3$s.' ), 
     193                '<code>[]</code>', 
     194                '<code>]</code>', 
     195                '<code>[</code>' 
     196            ) ); 
    185197            $imbalanced = true; 
    186198        } 
     
    188200        // Ensure parentheses are balanced. 
    189201        if ( ! $this->validate_balanced_characters( '(', ')', $css ) ) { 
    190             $validity->add( 'imbalanced_parentheses', __( 'Your parentheses <code>()</code> are imbalanced. Make sure there is a closing <code>)</code> for every opening <code>(</code>.' ) ); 
     202            $validity->add( 'imbalanced_parentheses', sprintf( 
     203                /* translators: 1: (), 2: ), 3: ( */ 
     204                __( 'Your parentheses %1$s are imbalanced. Make sure there is a closing %2$s for every opening %3$s.' ), 
     205                '<code>()</code>', 
     206                '<code>)</code>', 
     207                '<code>(</code>' 
     208            ) ); 
    191209            $imbalanced = true; 
    192210        } 
     
    194212        // Ensure double quotes are equal. 
    195213        if ( ! $this->validate_equal_characters( '"', $css ) ) { 
    196             $validity->add( 'unequal_double_quotes', __( 'Your double quotes <code>"</code> are uneven. Make sure there is a closing <code>"</code> for every opening <code>"</code>.' ) ); 
     214            $validity->add( 'unequal_double_quotes', sprintf( 
     215                /* translators: %s: " */ 
     216                __( 'Your double quotes %s are uneven. Make sure there is a closing %s for every opening %s.' ), 
     217                '<code>"</code>' 
     218            ) ); 
    197219            $imbalanced = true; 
    198220        } 
     
    210232        $unclosed_comment_count = $this->validate_count_unclosed_comments( $css ); 
    211233        if ( 0 < $unclosed_comment_count ) { 
    212             $validity->add( 'unclosed_comment', sprintf( _n( 'There is %s unclosed code comment. Close each comment with <code>*/</code>.', 'There are %s unclosed code comments. Close each comment with <code>*/</code>.', $unclosed_comment_count ), $unclosed_comment_count ) ); 
     234            $validity->add( 'unclosed_comment', sprintf( 
     235                /* translators: 1: number of unclosed comments, 2: *​/ */ 
     236                _n( 
     237                    'There is %1$s unclosed code comment. Close each comment with %2$s.', 
     238                    'There are %1$s unclosed code comments. Close each comment with %2$s.', 
     239                    $unclosed_comment_count 
     240                ), 
     241                $unclosed_comment_count, 
     242                '<code>*/</code>' 
     243            ) ); 
    213244            $imbalanced = true; 
    214245        } elseif ( ! $this->validate_balanced_characters( '/*', '*/', $css ) ) { 
    215             $validity->add( 'imbalanced_comments', __( 'There is an extra <code>*/</code>, indicating an end to a comment.  Be sure that there is an opening <code>/*</code> for every closing <code>*/</code>.' ) ); 
     246            $validity->add( 'imbalanced_comments', sprintf( 
     247                /* translators: 1: *​/, 2: /​* */ 
     248                __( 'There is an extra %1$s, indicating an end to a comment. Be sure that there is an opening %2$s for every closing %1$s.' ), 
     249                '<code>*/</code>', 
     250                '<code>/*</code>' 
     251            ) ); 
    216252            $imbalanced = true; 
    217253        } 
    218254        if ( $imbalanced && $this->is_possible_content_error( $css ) ) { 
    219             $validity->add( 'possible_false_positive', __( 'Imbalanced/unclosed character errors can be caused by <code>content: "";</code> declarations. You may need to remove this or add it to a custom CSS file.' ) ); 
     255            $validity->add( 'possible_false_positive', sprintf( 
     256                /* translators: %s: content: ""; */ 
     257                __( 'Imbalanced/unclosed character errors can be caused by %s declarations. You may need to remove this or add it to a custom CSS file.' ), 
     258                '<code>content: "";</code>' 
     259            ) ); 
    220260        } 
    221261 
Note: See TracChangeset for help on using the changeset viewer.