Make WordPress Core

Ticket #34684: 34684-text-change.patch

File 34684-text-change.patch, 2.6 KB (added by ramiy, 9 years ago)
  • wp-admin/includes/class-wp-filesystem-ssh2.php

     
    114114                }
    115115
    116116                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                        );
    118124                        return false;
    119125                }
    120126
    121127                if ( !$this->keys ) {
    122128                        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                                );
    124136                                return false;
    125137                        }
    126138                } else {
    127139                        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                                );
    129147                                return false;
    130148                        }
    131149                }
     
    132150
    133151                $this->sftp_link = ssh2_sftp( $this->link );
    134152                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                        );
    136160                        return false;
    137161                }
    138162
     
    173197                        return false;
    174198
    175199                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                        );
    177207                } else {
    178208                        stream_set_blocking( $stream, true );
    179209                        stream_set_timeout( $stream, FS_TIMEOUT );