From 29cddbeda9119c078877a4415c24ca69a474b565 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 1 Apr 2015 13:26:28 +0000 Subject: [PATCH] Add translator comments for placeholders in network-related strings. props ramiy. fixes #31834. Built from https://develop.svn.wordpress.org/trunk@31956 git-svn-id: http://core.svn.wordpress.org/trunk@31935 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network.php | 12 ++++++++++-- wp-admin/network/site-new.php | 23 ++++++++++++++++++----- wp-admin/network/upgrade.php | 13 +++++++++++-- wp-admin/network/users.php | 6 +++++- wp-includes/version.php | 2 +- 5 files changed, 45 insertions(+), 11 deletions(-) diff --git a/wp-admin/network.php b/wp-admin/network.php index 53cfe450eb..10453145bf 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -223,11 +223,19 @@ function network_step1( $errors = false ) { - + - +
site1.%1$s and site2.%1$s', 'subdomain examples' ), $hostname ); ?>site1.%1$s and site2.%1$s', 'subdomain examples' ), + $hostname + ); ?>
%1$s/site1 and %1$s/site2', 'subdirectory examples' ), $hostname ); ?>%1$s/site1 and %1$s/site2', 'subdirectory examples' ), + $hostname + ); ?>
diff --git a/wp-admin/network/site-new.php b/wp-admin/network/site-new.php index e194e8d3f9..4aebcf0272 100644 --- a/wp-admin/network/site-new.php +++ b/wp-admin/network/site-new.php @@ -85,13 +85,21 @@ if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) { $wpdb->hide_errors(); $id = wpmu_create_blog( $newdomain, $path, $title, $user_id , array( 'public' => 1 ), $current_site->id ); $wpdb->show_errors(); - if ( !is_wp_error( $id ) ) { - if ( !is_super_admin( $user_id ) && !get_user_option( 'primary_blog', $user_id ) ) + if ( ! is_wp_error( $id ) ) { + if ( ! is_super_admin( $user_id ) && !get_user_option( 'primary_blog', $user_id ) ) { update_user_option( $user_id, 'primary_blog', $id, true ); - $content_mail = sprintf( __( 'New site created by %1$s + } + + $content_mail = sprintf( + /* translators: 1: user login, 2: site url, 3: site name/title */ + __( 'New site created by %1$s Address: %2$s -Name: %3$s' ), $current_user->user_login , get_site_url( $id ), wp_unslash( $title ) ); +Name: %3$s' ), + $current_user->user_login, + get_site_url( $id ), + wp_unslash( $title ) + ); 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' ) . '>' ); wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) ); wp_redirect( add_query_arg( array( 'update' => 'added', 'id' => $id ), 'site-new.php' ) ); @@ -104,7 +112,12 @@ Name: %3$s' ), $current_user->user_login , get_site_url( $id ), wp_unslash( $tit if ( isset($_GET['update']) ) { $messages = array(); if ( 'added' == $_GET['update'] ) - $messages[] = sprintf( __( 'Site added. Visit Dashboard or Edit Site' ), esc_url( get_admin_url( absint( $_GET['id'] ) ) ), network_admin_url( 'site-info.php?id=' . absint( $_GET['id'] ) ) ); + $messages[] = sprintf( + /* translators: 1: dashboard url, 2: network admin edit url */ + __( 'Site added. Visit Dashboard or Edit Site' ), + esc_url( get_admin_url( absint( $_GET['id'] ) ) ), + network_admin_url( 'site-info.php?id=' . absint( $_GET['id'] ) ) + ); } $title = __('Add New Site'); diff --git a/wp-admin/network/upgrade.php b/wp-admin/network/upgrade.php index 5bb997dd39..719faad340 100644 --- a/wp-admin/network/upgrade.php +++ b/wp-admin/network/upgrade.php @@ -63,10 +63,19 @@ switch ( $action ) { $siteurl = site_url(); $upgrade_url = admin_url( 'upgrade.php?step=upgrade_db' ); restore_current_blog(); + echo "
  • $siteurl
  • "; + $response = wp_remote_get( $upgrade_url, array( 'timeout' => 120, 'httpversion' => '1.1' ) ); - if ( is_wp_error( $response ) ) - wp_die( sprintf( __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s' ), $siteurl, $response->get_error_message() ) ); + if ( is_wp_error( $response ) ) { + wp_die( sprintf( + /* translators: 1: site url, 2: server error message */ + __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s' ), + $siteurl, + '' . $response->get_error_message() . '' + ) ); + } + /** * Fires after the Multisite DB upgrade for each site is complete. * diff --git a/wp-admin/network/users.php b/wp-admin/network/users.php index 23871f6e79..bc9eddf450 100644 --- a/wp-admin/network/users.php +++ b/wp-admin/network/users.php @@ -57,7 +57,11 @@ function confirm_delete_users( $users ) { if ( ! empty( $blogs ) ) { ?> -

    ' . $delete_user->user_login . '' ); ?>

    +

    ' . $delete_user->user_login . '' + ); ?>

    $details ) { $blog_users = get_users( array( 'blog_id' => $details->userblog_id, 'fields' => array( 'ID', 'user_login' ) ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index d353d1462e..3e457347a3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-beta3-31955'; +$wp_version = '4.2-beta3-31956'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.