From 7ce972bb3323cb4f8ebdc4c371ebc6c2e8f335e4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 18 Nov 2015 17:22:34 +0000 Subject: [PATCH] I18N: Add translator comments for strings in `wp-admin/includes/class-wp-filesystem-ftpsockets.php`. Fixes #34684. git-svn-id: https://develop.svn.wordpress.org/trunk@35664 602fd350-edb4-49c9-b593-d223f7449a82 --- .../class-wp-filesystem-ftpsockets.php | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php index a7a9002c6d..29ac7888ab 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -69,18 +69,33 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { $this->ftp->setTimeout(FS_CONNECT_TIMEOUT); - if ( ! $this->ftp->SetServer($this->options['hostname'], $this->options['port']) ) { - $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); + if ( ! $this->ftp->SetServer( $this->options['hostname'], $this->options['port'] ) ) { + $this->errors->add( 'connect', + /* translators: %s: hostname:port */ + sprintf( __( 'Failed to connect to FTP Server %s' ), + $this->options['hostname'] . ':' . $this->options['port'] + ) + ); return false; } if ( ! $this->ftp->connect() ) { - $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); + $this->errors->add( 'connect', + /* translators: %s: hostname:port */ + sprintf( __( 'Failed to connect to FTP Server %s' ), + $this->options['hostname'] . ':' . $this->options['port'] + ) + ); return false; } - if ( ! $this->ftp->login($this->options['username'], $this->options['password']) ) { - $this->errors->add('auth', sprintf(__('Username/Password incorrect for %s'), $this->options['username'])); + if ( ! $this->ftp->login( $this->options['username'], $this->options['password'] ) ) { + $this->errors->add( 'auth', + /* translators: %s: username */ + sprintf( __( 'Username/Password incorrect for %s' ), + $this->options['username'] + ) + ); return false; }