Make WordPress Core

Changeset 35661


Ignore:
Timestamp:
11/18/2015 05:17:54 PM (9 years ago)
Author:
SergeyBiryukov
Message:

I18N: Add translator comments for strings in wp-admin/includes/class-wp-filesystem-ssh2.php.

Props ramiy.
See #34684.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php

    r35468 r35661  
    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                /* translators: %s: hostname:port */
     119                sprintf( __( 'Failed to connect to SSH2 Server %s' ),
     120                    $this->options['hostname'].':'.$this->options['port']
     121                )
     122            );
    118123            return false;
    119124        }
     
    121126        if ( !$this->keys ) {
    122127            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                );
    124134                return false;
    125135            }
    126136        } else {
    127137            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                );
    129144                return false;
    130145            }
     
    133148        $this->sftp_link = ssh2_sftp( $this->link );
    134149        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            );
    136156            return false;
    137157        }
     
    174194
    175195        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            );
    177202        } else {
    178203            stream_set_blocking( $stream, true );
Note: See TracChangeset for help on using the changeset viewer.