[wp-trac] [WordPress Trac] #31979: Improving i18n for "Continue reading" in twenty thirteen theme

WordPress Trac noreply at wordpress.org
Wed Apr 15 13:53:59 UTC 2015


#31979: Improving i18n for "Continue reading" in twenty thirteen theme
-------------------------+-----------------------------
 Reporter:  dregad       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Themes       |    Version:  4.1.1
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 When using French translation of 2013 theme, the "More" link is translated
 from "Continue reading ''title''" to "Continuer la lecture de ''title''".

 This is fine, except for the fact that ''title'' is wrapped in a span with
 ''screen-reader-text'' class that causes it to be hidden, leading to
 display of just "Continuer la lecture de" which is an incorrect
 translation - it should be "Continuer la lecture".

 I would like to suggest the following code change in content.php


 {{{
 --- content.php.orig    2015-04-15 15:34:44.186854600 +0200
 +++ content.php.new     2015-04-15 15:41:09.645854600 +0200
 @@ -41,8 +41,8 @@
                 <?php
                         /* translators: %s: Name of current post */
                         the_content( sprintf(
 -                               __( 'Continue reading %s <span class
 ="meta-nav">→</span>', 'twentythirteen' ),
 -                               the_title( '<span class="screen-reader-
 text">', '</span>', false )
 +                               __( 'Continue reading<span class="screen-
 reader-text"> %s</span> <span class="meta-nav">→</span>',
 'twentythirteen' ),
 +                               get_the_title()
                         ) );

                         wp_link_pages( array( 'before' => '<div class
 ="page-links"><span class="page-links-title">' . __( 'Pages:',
 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' =>
 '<span>', 'link_after' => '</span>' ) );
 }}}

 This would allow moving "de" within the span for the French translation
 (and maybe others languages too):

 {{{
 'Continuer la lecture<span class="screen-reader-text"> de
 %s</span> <span class="meta-nav">→</span>'
 }}}

 I am not sure whether it is correct to put the class name within the
 translation string. If not, maybe someone more qualified than I am can
 come up with a better solution for the problem.

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


More information about the wp-trac mailing list