[wp-trac] [WordPress Trac] #34684: Add translators comments to wp-admin/includes/class-wp-filesystem-ssh2.php

WordPress Trac noreply at wordpress.org
Sun Nov 15 02:11:17 UTC 2015


#34684: Add translators comments to wp-admin/includes/class-wp-filesystem-ssh2.php
--------------------------+------------------------------
 Reporter:  ramiy         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  I18N          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by ramiy):

 Also, It would be smart to replace both `%1$s:%2$s` strings with a simple
 `%s`, moving the logic from the translation string to the code.

 Old:
 {{{
 sprintf(
         /* translators: 1: hostname 2: port */
         __( 'Failed to connect to SSH2 Server %1$s:%2$s' ),
         $this->options['hostname'],
         $this->options['port']
 )
 }}}

 New:
 {{{
 sprintf(
         /* translators: %s: hostname:port */
         __( 'Failed to connect to SSH2 Server %s' ),
         $this->options['hostname'].':'.$this->options['port']
 )
 }}}

 See the attached patch.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34684#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list