Make WordPress Core


Ignore:
Timestamp:
11/18/2015 05:22:34 PM (11 years ago)
Author:
SergeyBiryukov
Message:

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

Fixes #34684.

File:
1 edited

Legend:

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

    r34495 r35664  
    7070                $this->ftp->setTimeout(FS_CONNECT_TIMEOUT);
    7171
    72                 if ( ! $this->ftp->SetServer($this->options['hostname'], $this->options['port']) ) {
    73                         $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port']));
     72                if ( ! $this->ftp->SetServer( $this->options['hostname'], $this->options['port'] ) ) {
     73                        $this->errors->add( 'connect',
     74                                /* translators: %s: hostname:port */
     75                                sprintf( __( 'Failed to connect to FTP Server %s' ),
     76                                        $this->options['hostname'] . ':' . $this->options['port']
     77                                )
     78                        );
    7479                        return false;
    7580                }
    7681
    7782                if ( ! $this->ftp->connect() ) {
    78                         $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port']));
    79                         return false;
    80                 }
    81 
    82                 if ( ! $this->ftp->login($this->options['username'], $this->options['password']) ) {
    83                         $this->errors->add('auth', sprintf(__('Username/Password incorrect for %s'), $this->options['username']));
     83                        $this->errors->add( 'connect',
     84                                /* translators: %s: hostname:port */
     85                                sprintf( __( 'Failed to connect to FTP Server %s' ),
     86                                        $this->options['hostname'] . ':' . $this->options['port']
     87                                )
     88                        );
     89                        return false;
     90                }
     91
     92                if ( ! $this->ftp->login( $this->options['username'], $this->options['password'] ) ) {
     93                        $this->errors->add( 'auth',
     94                                /* translators: %s: username */
     95                                sprintf( __( 'Username/Password incorrect for %s' ),
     96                                        $this->options['username']
     97                                )
     98                        );
    8499                        return false;
    85100                }
Note: See TracChangeset for help on using the changeset viewer.