WordPress.org

Make WordPress Core

Changeset 39323


Ignore:
Timestamp:
11/21/16 01:21:01 (5 months ago)
Author:
johnbillion
Message:

I18n: Begin introducing translator comments for strings which include placeholders but no accompanying translator comment.

Adds context to one string used in two different contexts for the new user and new site signup email notification.

More to come.

See #38882

Location:
trunk/src
Files:
16 edited

Legend:

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

    r38470 r39323  
    201201    switch ( $cur->response ) { 
    202202    case 'development' : 
     203        /* translators: 1: WordPress version number, 2: WordPress updates admin screen URL */ 
    203204        return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), get_bloginfo( 'version', 'display' ), network_admin_url( 'update-core.php' ) ); 
    204205 
  • trunk/src/wp-admin/includes/upgrade.php

    r39076 r39323  
    376376    $name = $user->user_login; 
    377377    $login_url = wp_login_url(); 
     378    /* translators: New site notification email. 1: New site URL, 2: User login, 3: User password or password reset link, 4: Login URL */ 
    378379    $message = sprintf( __( "Your new WordPress site has been successfully set up at: 
    379380 
  • trunk/src/wp-admin/install.php

    r38672 r39323  
    233233$mysql_compat   = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); 
    234234 
    235 if ( !$mysql_compat && !$php_compat ) 
     235if ( !$mysql_compat && !$php_compat ) { 
     236    /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number */ 
    236237    $compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ); 
    237 elseif ( !$php_compat ) 
     238} elseif ( !$php_compat ) { 
     239    /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */ 
    238240    $compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version ); 
    239 elseif ( !$mysql_compat ) 
     241} elseif ( !$mysql_compat ) { 
     242    /* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */ 
    240243    $compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version ); 
     244} 
    241245 
    242246if ( !$mysql_compat || !$php_compat ) { 
  • trunk/src/wp-admin/nav-menus.php

    r39098 r39323  
    519519if ( ! $locations_screen ) : // Main tab 
    520520    $overview  = '<p>' . __( 'This screen is used for managing your custom navigation menus.' ) . '</p>'; 
     521    /* translators: 1: Widgets admin screen URL, 2 and 3: The name of the default themes */ 
    521522    $overview .= '<p>' . sprintf( __( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a &#8220;Custom Menu&#8221; widget on the <a href="%1$s">Widgets</a> screen. If your theme does not support the custom menus feature (the default themes, %2$s and %3$s, do), you can learn about adding this support by following the Documentation link to the side.' ), admin_url( 'widgets.php' ), 'Twenty Sixteen', 'Twenty Seventeen' ) . '</p>'; 
    522523    $overview .= '<p>' . __( 'From this screen you can:' ) . '</p>'; 
  • trunk/src/wp-admin/options-discussion.php

    r38720 r39323  
    108108$default_comments_page .= '>' . __('first') . '</option></select>'; 
    109109 
     110/* translators: 1: Form field control for number of top level comments per page, 2: Form field control for the 'first' or 'last' page */ 
    110111printf( __('Break comments into pages with %1$s top level comments per page and the %2$s page displayed by default'), '</label><label for="comments_per_page"><input name="comments_per_page" type="number" step="1" min="0" id="comments_per_page" value="' . esc_attr(get_option('comments_per_page')) . '" class="small-text" />', $default_comments_page ); 
    111112 
  • trunk/src/wp-admin/revision.php

    r38722 r39323  
    7575    $post_edit_link = get_edit_post_link(); 
    7676    $post_title     = '<a href="' . $post_edit_link . '">' . _draft_or_post_title() . '</a>'; 
     77    /* translators: 1: Post title */ 
    7778    $h1             = sprintf( __( 'Compare Revisions of &#8220;%1$s&#8221;' ), $post_title ); 
    7879    $return_to_post = '<a href="' . $post_edit_link . '">' . __( '&larr; Return to editor' ) . '</a>'; 
  • trunk/src/wp-admin/update-core.php

    r38827 r39323  
    6969 
    7070            if ( !$mysql_compat && !$php_compat ) 
     71                /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number */ 
    7172                $message = sprintf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version ); 
    7273            elseif ( !$php_compat ) 
     74                /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */ 
    7375                $message = sprintf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version ); 
    7476            elseif ( !$mysql_compat ) 
     77                /* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */ 
    7578                $message = sprintf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version ); 
    7679            else 
     80                /* translators: 1: WordPress version number, 2: WordPress version number including locale if necessary */ 
    7781                $message =  sprintf(__('You can update to <a href="https://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> automatically:'), $update->current, $version_string); 
    7882            if ( !$mysql_compat || !$php_compat ) 
     
    659663        wp_die( __( 'Sorry, you are not allowed to update this site.' ) ); 
    660664 
     665    // @TODO 
     666 
    661667    check_admin_referer('upgrade-core'); 
    662668 
  • trunk/src/wp-includes/feed-atom-comments.php

    r38925 r39323  
    2929> 
    3030    <title type="text"><?php 
    31         if ( is_singular() ) 
     31        if ( is_singular() ) { 
     32            /* translators: Comments feed title. 1: Post title */ 
    3233            printf( ent2ncr( __( 'Comments on %s' ) ), get_the_title_rss() ); 
    33         elseif ( is_search() ) 
     34        } elseif ( is_search() ) { 
     35            /* translators: Comments feed title. 1: Site name, 2: Search query */ 
    3436            printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() ); 
    35         else 
     37        } else { 
     38            /* translators: Comments feed title. 1: Site name */ 
    3639            printf( ent2ncr( __( 'Comments for %s' ) ), get_wp_title_rss() ); 
     40        } 
    3741    ?></title> 
    3842    <subtitle type="text"><?php bloginfo_rss('description'); ?></subtitle> 
     
    7478                /** This filter is documented in wp-includes/feed.php */ 
    7579                $title = apply_filters( 'the_title_rss', $title ); 
     80                /* translators: Individual comment title. 1: Post title, 2: Comment author name */ 
    7681                printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss()); 
    7782            } else { 
     83                /* translators: Comment author title. 1: Comment author name */ 
    7884                printf(ent2ncr(__('By: %s')), get_comment_author_rss()); 
    7985            } 
  • trunk/src/wp-includes/feed-rss2-comments.php

    r38925 r39323  
    3434<channel> 
    3535    <title><?php 
    36         if ( is_singular() ) 
     36        if ( is_singular() ) { 
     37            /* translators: Comments feed title. 1: Post title */ 
    3738            printf( ent2ncr( __( 'Comments on: %s' ) ), get_the_title_rss() ); 
    38         elseif ( is_search() ) 
     39        } elseif ( is_search() ) { 
     40            /* translators: Comments feed title. 1: Site name, 2: Search query */ 
    3941            printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() ); 
    40         else 
     42        } else { 
     43            /* translators: Comments feed title. 1: Site name */ 
    4144            printf( ent2ncr( __( 'Comments for %s' ) ), get_wp_title_rss() ); 
     45        } 
    4246    ?></title> 
    4347    <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> 
     
    7377                /** This filter is documented in wp-includes/feed.php */ 
    7478                $title = apply_filters( 'the_title_rss', $title ); 
     79                /* translators: Individual comment title. 1: Post title, 2: Comment author name */ 
    7580                printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss()); 
    7681            } else { 
     82                /* translators: Comment author title. 1: Comment author name */ 
    7783                printf(ent2ncr(__('By: %s')), get_comment_author_rss()); 
    7884            } 
  • trunk/src/wp-includes/functions.php

    r39316 r39323  
    40884088                __( 'https://codex.wordpress.org/Debugging_in_WordPress' ) 
    40894089            ); 
     4090            /* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Version information message */ 
    40904091            trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) ); 
    40914092        } else { 
  • trunk/src/wp-includes/load.php

    r39130 r39323  
    129129        header( sprintf( '%s 500 Internal Server Error', $protocol ), true, 500 ); 
    130130        header( 'Content-Type: text/html; charset=utf-8' ); 
     131        /* translators: 1: Current PHP version number, 2: WordPress version number, 3: Minimum required PHP version number */ 
    131132        die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) ); 
    132133    } 
  • trunk/src/wp-includes/ms-functions.php

    r39203 r39323  
    847847         */ 
    848848        apply_filters( 'wpmu_signup_blog_notification_subject', 
    849             __( '[%1$s] Activate %2$s' ), 
     849            /* translators: New site notification email subject. 1: Network name, 2: New site URL */ 
     850            _x( '[%1$s] Activate %2$s', 'New site notification email subject' ), 
    850851            $domain, $path, $title, $user_login, $user_email, $key, $meta 
    851852        ), 
     
    940941         */ 
    941942        apply_filters( 'wpmu_signup_user_notification_subject', 
    942             __( '[%1$s] Activate %2$s' ), 
     943            /* translators: New user notification email subject. 1: Network name, 2: New user login */ 
     944            _x( '[%1$s] Activate %2$s', 'New user notification email subject' ), 
    943945            $user_login, $user_email, $key, $meta 
    944946        ), 
     
    12031205    restore_current_blog(); 
    12041206 
     1207    /* translators: New site notification email. 1: Site URL, 2: User IP address, 3: Settings screen URL */ 
    12051208    $msg = sprintf( __( 'New Site: %1$s 
    12061209URL: %2$s 
     
    12451248 
    12461249    $options_site_url = esc_url(network_admin_url('settings.php')); 
     1250    /* translators: New user notification email. 1: User login, 2: User IP address, 3: Settings screen URL */ 
    12471251    $msg = sprintf(__('New User: %1$s 
    12481252Remote IP: %2$s 
     
    15241528        $current_network->site_name = 'WordPress'; 
    15251529 
     1530    /* translators: New site notification email subject. 1: Network name, 2: New site name */ 
     1531    $subject = __( 'New %1$s Site: %2$s' ); 
     1532 
    15261533    /** 
    15271534     * Filters the subject of the welcome email after site activation. 
     
    15311538     * @param string $subject Subject of the email. 
    15321539     */ 
    1533     $subject = apply_filters( 'update_welcome_subject', sprintf( __( 'New %1$s Site: %2$s' ), $current_network->site_name, wp_unslash( $title ) ) ); 
     1540    $subject = apply_filters( 'update_welcome_subject', sprintf( $subject, $current_network->site_name, wp_unslash( $title ) ) ); 
    15341541    wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers ); 
    15351542 
     
    16091616        $current_network->site_name = 'WordPress'; 
    16101617 
     1618    /* translators: New user notification email subject. 1: Network name, 2: New user login */ 
     1619    $subject = __( 'New %1$s User: %2$s' ); 
     1620 
    16111621    /** 
    16121622     * Filters the subject of the welcome email after user activation. 
     
    16161626     * @param string $subject Subject of the email. 
    16171627     */ 
    1618     $subject = apply_filters( 'update_welcome_user_subject', sprintf( __( 'New %1$s User: %2$s' ), $current_network->site_name, $user->user_login) ); 
     1628    $subject = apply_filters( 'update_welcome_user_subject', sprintf( $subject, $current_network->site_name, $user->user_login) ); 
    16191629    wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers ); 
    16201630 
  • trunk/src/wp-includes/pluggable.php

    r39086 r39323  
    16271627    $notify_message .= admin_url( "edit-comments.php?comment_status=moderated#wpbody-content" ) . "\r\n"; 
    16281628 
     1629    /* translators: Comment moderation notification email subject. 1: Site name, 2: Post title */ 
    16291630    $subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), $blogname, $post->post_title ); 
    16301631    $message_headers = ''; 
  • trunk/src/wp-includes/script-loader.php

    r39278 r39323  
    290290        'http_error' => __('HTTP error.'), 
    291291        'upload_failed' => __('Upload failed.'), 
     292        /* translators: 1: Opening link tag, 2: Closing link tag */ 
    292293        'big_upload_failed' => __('Please try uploading this file with the %1$sbrowser uploader%2$s.'), 
    293294        'big_upload_queued' => __('%s exceeds the maximum upload size for the multi-file uploader when used in your browser.'), 
  • trunk/src/wp-includes/wp-db.php

    r39275 r39323  
    13651365        wp_load_translations_early(); 
    13661366 
    1367         if ( $caller = $this->get_caller() ) 
     1367        if ( $caller = $this->get_caller() ) { 
     1368            /* translators: 1: Database error message, 2: SQL query, 3: Name of the calling function */ 
    13681369            $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s made by %3$s' ), $str, $this->last_query, $caller ); 
    1369         else 
     1370        } else { 
     1371            /* translators: 1: Database error message, 2: SQL query */ 
    13701372            $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s' ), $str, $this->last_query ); 
     1373        } 
    13711374 
    13721375        error_log( $error_str ); 
     
    32143217        global $wp_version, $required_mysql_version; 
    32153218        // Make sure the server has the required MySQL version 
    3216         if ( version_compare($this->db_version(), $required_mysql_version, '<') ) 
     3219        if ( version_compare($this->db_version(), $required_mysql_version, '<') ) { 
     3220            /* translators: 1: WordPress version number, 2: Minimum required MySQL version number */ 
    32173221            return new WP_Error('database_version', sprintf( __( '<strong>ERROR</strong>: WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version )); 
     3222        } 
    32183223    } 
    32193224 
  • trunk/src/wp-login.php

    r38814 r39323  
    788788    if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) { 
    789789        if ( headers_sent() ) { 
     790            /* translators: 1: Browser cookie documentation URL, 2: Support forums URL */ 
    790791            $user = new WP_Error( 'test_cookie', sprintf( __( '<strong>ERROR</strong>: Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ), 
    791792                __( 'https://codex.wordpress.org/Cookies' ), __( 'https://wordpress.org/support/' ) ) ); 
    792793        } elseif ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) { 
    793794            // If cookies are disabled we can't log in even with a valid user+pass 
     795            /* translators: 1: Browser cookie documentation URL */ 
    794796            $user = new WP_Error( 'test_cookie', sprintf( __( '<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ), 
    795797                __( 'https://codex.wordpress.org/Cookies' ) ) ); 
Note: See TracChangeset for help on using the changeset viewer.