Changeset 35661
- Timestamp:
- 11/18/2015 05:17:54 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php
r35468 r35661 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 /* translators: %s: hostname:port */ 119 sprintf( __( 'Failed to connect to SSH2 Server %s' ), 120 $this->options['hostname'].':'.$this->options['port'] 121 ) 122 ); 118 123 return false; 119 124 } … … 121 126 if ( !$this->keys ) { 122 127 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'])); 128 $this->errors->add( 'auth', 129 /* translators: %s: username */ 130 sprintf( __( 'Username/Password incorrect for %s' ), 131 $this->options['username'] 132 ) 133 ); 124 134 return false; 125 135 } 126 136 } else { 127 137 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'])); 138 $this->errors->add( 'auth', 139 /* translators: %s: username */ 140 sprintf( __( 'Public and Private keys incorrect for %s' ), 141 $this->options['username'] 142 ) 143 ); 129 144 return false; 130 145 } … … 133 148 $this->sftp_link = ssh2_sftp( $this->link ); 134 149 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'] ) ); 150 $this->errors->add( 'connect', 151 /* translators: %s: hostname:port */ 152 sprintf( __( 'Failed to initialize a SFTP subsystem session with the SSH2 Server %s' ), 153 $this->options['hostname'] . ':' . $this->options['port'] 154 ) 155 ); 136 156 return false; 137 157 } … … 174 194 175 195 if ( ! ($stream = ssh2_exec($this->link, $command)) ) { 176 $this->errors->add('command', sprintf(__('Unable to perform command: %s'), $command)); 196 $this->errors->add( 'command', 197 /* translators: %s: command */ 198 sprintf( __( 'Unable to perform command: %s'), 199 $command 200 ) 201 ); 177 202 } else { 178 203 stream_set_blocking( $stream, true );
Note: See TracChangeset
for help on using the changeset viewer.