[wp-trac] [WordPress Trac] #47655: Consolidate broken up strings for better localization

WordPress Trac noreply at wordpress.org
Fri Jul 5 22:51:13 UTC 2019


#47655: Consolidate broken up strings for better localization
-----------------------------+-----------------------------
 Reporter:  garrett-eclipse  |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  I18N             |    Version:
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 This ticket is branching from #47651 to address these comments;
 @garrett-eclipse - https://core.trac.wordpress.org/ticket/47651#comment:7
 > "Also I moved the translator comment for the Learn more link into it's
 sprintf block. But I'm wondering if the two strings for this should be
 merged into one. Currently 'Learn more about updating PHP' is separate and
 appended so I wonder for i18N if that'll be an issue for RTL languages and
 should be one large sprintf string?"
 @afragen - https://core.trac.wordpress.org/ticket/47651#comment:8
 > @garrett-eclipse there are probably 2-3 other locations in core where
 this same/similar tract is used, core-update page, plugin page, and
 possibly View Details iframe.
 > This would need to be changed in all locations but I would work towards
 a consensus on the new text first.

 Example where the string is split in two;
 https://github.com/WordPress/WordPress/blob/5.2-branch/wp-admin/update-
 core.php#L309-L322
 {{{#!php
 <?php
                 if ( ! $compatible_php && current_user_can( 'update_php' )
 ) {
                         $compat .= '<br>' . __( 'This update doesn’t
 work with your version of PHP.' ) . ' ';
                         /* translators: %s: Update PHP page URL */
                         $compat .= sprintf(
                                 __( '<a href="%s">Learn more about
 updating PHP</a>.' ),
                                 esc_url( wp_get_update_php_url() )
                         );
                         $annotation = wp_get_update_php_annotation();
                         if ( $annotation ) {
                                 $compat .= '</p><p><em>' . $annotation .
 '</em>';
                         }
                 }
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47655>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list