Ticket #34684: 34684-text-change.patch
File 34684-text-change.patch, 2.6 KB (added by , 9 years ago) |
---|
-
wp-admin/includes/class-wp-filesystem-ssh2.php
114 114 } 115 115 116 116 if ( ! $this->link ) { 117 $this->errors->add('connect', sprintf(__('Failed to connect to SSH2 Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); 117 $this->errors->add( 'connect', 118 sprintf( 119 /* translators: %s: hostname:port */ 120 __( 'Failed to connect to SSH2 Server %s' ), 121 $this->options['hostname'].':'.$this->options['port'] 122 ) 123 ); 118 124 return false; 119 125 } 120 126 121 127 if ( !$this->keys ) { 122 128 if ( ! @ssh2_auth_password($this->link, $this->options['username'], $this->options['password']) ) { 123 $this->errors->add('auth', sprintf(__('Username/Password incorrect for %s'), $this->options['username'])); 129 $this->errors->add( 'auth', 130 sprintf( 131 /* translators: %s: user name */ 132 __( 'Username/Password incorrect for %s' ), 133 $this->options['username'] 134 ) 135 ); 124 136 return false; 125 137 } 126 138 } else { 127 139 if ( ! @ssh2_auth_pubkey_file($this->link, $this->options['username'], $this->options['public_key'], $this->options['private_key'], $this->options['password'] ) ) { 128 $this->errors->add('auth', sprintf(__('Public and Private keys incorrect for %s'), $this->options['username'])); 140 $this->errors->add( 'auth', 141 sprintf( 142 /* translators: %s: user name */ 143 __( 'Public and Private keys incorrect for %s' ), 144 $this->options['username'] 145 ) 146 ); 129 147 return false; 130 148 } 131 149 } … … 132 150 133 151 $this->sftp_link = ssh2_sftp( $this->link ); 134 152 if ( ! $this->sftp_link ) { 135 $this->errors->add( 'connect', sprintf( __( 'Failed to initialize a SFTP subsystem session with the SSH2 Server %1$s:%2$s' ), $this->options['hostname'], $this->options['port'] ) ); 153 $this->errors->add( 'connect', 154 sprintf( 155 /* translators: %s: hostname:port */ 156 __( 'Failed to initialize a SFTP subsystem session with the SSH2 Server %s' ), 157 $this->options['hostname'].':'.$this->options['port'] 158 ) 159 ); 136 160 return false; 137 161 } 138 162 … … 173 197 return false; 174 198 175 199 if ( ! ($stream = ssh2_exec($this->link, $command)) ) { 176 $this->errors->add('command', sprintf(__('Unable to perform command: %s'), $command)); 200 $this->errors->add( 'command', 201 sprintf( 202 /* translators: %s: command */ 203 __( 'Unable to perform command: %s'), 204 $command 205 ) 206 ); 177 207 } else { 178 208 stream_set_blocking( $stream, true ); 179 209 stream_set_timeout( $stream, FS_TIMEOUT );