Make WordPress Core

Opened 6 years ago

Last modified 2 months ago

#40486 new enhancement

Standard Themes: Logic for translated strings in connection with Screen Reader text can be improved

Reported by: presskopp's profile Presskopp Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords:
Focuses: Cc:

Description

There are 2 strings including:

screen-reader-text"> "%s"

1)

Continue reading<span class="screen-reader-text"> "%s"</span>

&

2)

Edit<span class="screen-reader-text"> "%s"</span>

In german (as an example, I assume this happens too in other languages) the syntax for 1) needs to be reversed like that:

<span class="screen-reader-text">"%s"</span> weiterlesen

2) gets:

<span class="screen-reader-text">&#8222;%s&#8220;</span> bearbeiten

which is correct for Screen Reader Users, but it should rather be capitalized in both cases so the button text doesn't start lowercase, see screenshot.

https://translate.wordpress.org/projects/wp-themes/twentyseventeen/de/default?filters%5Bterm%5D=screen-reader-text%22%3E+%22%25s%22

We could now capitalize the strings in translation, but there must be a better solution!?

PS:
Yes, the quotation marks in our translation also needs a little attention, but that's not part of the ticket ;-)

Attachments (1)

pasted_image_at_2017_04_19_04_42_pm.png (101.7 KB) - added by Presskopp 6 years ago.

Download all attachments as: .zip

Change History (5)

#1 @Presskopp
6 years ago

  • Component changed from I18N to Bundled Theme

#2 @joyously
5 years ago

Would this fix it?

the_content( sprintf(
  /* translators: %s: Name of current post for Continue link, only visible to screen readers, with space before and after */
  esc_html__( 'Continue reading%s', 'twentyseventeen' ),
    '<span class="screen-reader-text"> "' . wp_strip_all_tags( get_the_title() ) . '" </span>'
) );

and

edit_post_link(
  sprintf(
  /* translators: %s: Name of current post for edit link, only visible to screen readers, with space before and after */
    esc_html__( 'Edit%s', 'twentyseventeen' ),
      '<span class="screen-reader-text"> "' . wp_strip_all_tags( get_the_title() ) . '" </span>'
    ),
  ' <span class="edit-link">',
  '</span>'
);

It doesn't address the capitalization problem though.

#3 @Presskopp
12 months ago

  • Summary changed from Twenty Seventeen: Logic for translated strings in connection with Screen Reader text can be improved to Standard Themes: Logic for translated strings in connection with Screen Reader text can be improved

#4 @mrfoxtalbot
2 months ago

I can confirm that this is still happening. It came up in a support thread.

Note: See TracTickets for help on using tickets.