Make WordPress Core

Changeset 31956


Ignore:
Timestamp:
04/01/2015 01:25:55 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Add translator comments for placeholders in network-related strings.

props ramiy.
fixes #31834.

Location:
trunk/src/wp-admin
Files:
4 edited

Legend:

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

    r31941 r31956  
    224224            <tr>
    225225                <th><label><input type="radio" name="subdomain_install" value="1"<?php checked( $subdomain_install ); ?> /> <?php _e( 'Sub-domains' ); ?></label></th>
    226                 <td><?php printf( _x( 'like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples' ), $hostname ); ?></td>
     226                <td><?php printf(
     227                    /* translators: 1: hostname */
     228                    _x( 'like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples' ),
     229                    $hostname
     230                ); ?></td>
    227231            </tr>
    228232            <tr>
    229233                <th><label><input type="radio" name="subdomain_install" value="0"<?php checked( ! $subdomain_install ); ?> /> <?php _e( 'Sub-directories' ); ?></label></th>
    230                 <td><?php printf( _x( 'like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples' ), $hostname ); ?></td>
     234                <td><?php printf(
     235                    /* translators: 1: hostname */
     236                    _x( 'like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples' ),
     237                    $hostname
     238                ); ?></td>
    231239            </tr>
    232240        </table>
  • trunk/src/wp-admin/network/site-new.php

    r31517 r31956  
    8686    $id = wpmu_create_blog( $newdomain, $path, $title, $user_id , array( 'public' => 1 ), $current_site->id );
    8787    $wpdb->show_errors();
    88     if ( !is_wp_error( $id ) ) {
    89         if ( !is_super_admin( $user_id ) && !get_user_option( 'primary_blog', $user_id ) )
     88    if ( ! is_wp_error( $id ) ) {
     89        if ( ! is_super_admin( $user_id ) && !get_user_option( 'primary_blog', $user_id ) ) {
    9090            update_user_option( $user_id, 'primary_blog', $id, true );
    91         $content_mail = sprintf( __( 'New site created by %1$s
     91        }
     92
     93        $content_mail = sprintf(
     94            /* translators: 1: user login, 2: site url, 3: site name/title */
     95            __( 'New site created by %1$s
    9296
    9397Address: %2$s
    94 Name: %3$s' ), $current_user->user_login , get_site_url( $id ), wp_unslash( $title ) );
     98Name: %3$s' ),
     99            $current_user->user_login,
     100            get_site_url( $id ),
     101            wp_unslash( $title )
     102        );
    95103        wp_mail( get_site_option('admin_email'), sprintf( __( '[%s] New Site Created' ), $current_site->site_name ), $content_mail, 'From: "Site Admin" <' . get_site_option( 'admin_email' ) . '>' );
    96104        wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) );
     
    105113    $messages = array();
    106114    if ( 'added' == $_GET['update'] )
    107         $messages[] = sprintf( __( 'Site added. <a href="%1$s">Visit Dashboard</a> or <a href="%2$s">Edit Site</a>' ), esc_url( get_admin_url( absint( $_GET['id'] ) ) ), network_admin_url( 'site-info.php?id=' . absint( $_GET['id'] ) ) );
     115        $messages[] = sprintf(
     116            /* translators: 1: dashboard url, 2: network admin edit url */
     117            __( 'Site added. <a href="%1$s">Visit Dashboard</a> or <a href="%2$s">Edit Site</a>' ),
     118            esc_url( get_admin_url( absint( $_GET['id'] ) ) ),
     119            network_admin_url( 'site-info.php?id=' . absint( $_GET['id'] ) )
     120        );
    108121}
    109122
  • trunk/src/wp-admin/network/upgrade.php

    r31658 r31956  
    6464            $upgrade_url = admin_url( 'upgrade.php?step=upgrade_db' );
    6565            restore_current_blog();
     66
    6667            echo "<li>$siteurl</li>";
     68
    6769            $response = wp_remote_get( $upgrade_url, array( 'timeout' => 120, 'httpversion' => '1.1' ) );
    68             if ( is_wp_error( $response ) )
    69                 wp_die( sprintf( __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: <em>%2$s</em>' ), $siteurl, $response->get_error_message() ) );
     70            if ( is_wp_error( $response ) ) {
     71                wp_die( sprintf(
     72                    /* translators: 1: site url, 2: server error message */
     73                    __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s' ),
     74                    $siteurl,
     75                    '<em>' . $response->get_error_message() . '</em>'
     76                ) );
     77            }
     78
    7079            /**
    7180             * Fires after the Multisite DB upgrade for each site is complete.
  • trunk/src/wp-admin/network/users.php

    r31941 r31956  
    5858            if ( ! empty( $blogs ) ) {
    5959                ?>
    60                 <td><fieldset><p><legend><?php printf( __( 'What should be done with content owned by %s?' ), '<em>' . $delete_user->user_login . '</em>' ); ?></legend></p>
     60                <td><fieldset><p><legend><?php printf(
     61                    /* translators: user login */
     62                    __( 'What should be done with content owned by %s?' ),
     63                    '<em>' . $delete_user->user_login . '</em>'
     64                ); ?></legend></p>
    6165                <?php
    6266                foreach ( (array) $blogs as $key => $details ) {
Note: See TracChangeset for help on using the changeset viewer.