[wp-trac] [WordPress Trac] #52047: Twenty Twenty-One: Remove untranslatable post type names

WordPress Trac noreply at wordpress.org
Mon Dec 21 20:38:41 UTC 2020


#52047: Twenty Twenty-One: Remove untranslatable post type names
------------------------------+---------------------
 Reporter:  SergeyBiryukov    |       Owner:  (none)
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  5.6.1
Component:  Bundled Theme     |     Version:  5.6
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+---------------------

Comment (by SergeyBiryukov):

 Replying to [comment:14 poena]:
 > The context of where the navigation is shown, below the list of posts,
 should be enough for users to understand what the links are used for, even
 if it only says "Newer" and "Older".
 > Both the aria label and the screen reader text describes that it is the
 post navigation.
 > Has there been many reports about this being an issue in Twenty Twenty?

 It's more about the word "Newer" when used on its own requiring a
 different translation than in "Newer posts". In some languages, the form
 used for "Newer posts" does not look correct when shortened to "Newer",
 and another form should be used instead. I have just noticed now that it's
 the same in Twenty Twenty, so this can be addressed for both themes in a
 new ticket.

 > The escaping must not be removed. The themes team and contributors have
 discussed this thoroughly
 > and have worked towards the goal of having secure themes over the past
 several years.
 > Including discussions on GitHub during the development of this theme.
 https://github.com/WordPress/twentytwentyone/issues/479

 Thanks, I was not aware of that. In that case, I agree with reconsidering
 the previous decision and keeping the escaping. Having a  consistent
 standard for both bundled themes and any themes in the repo is indeed
 beneficial.

 [attachment:"52047.3.diff"] uses `wp_kses()` for escaping here instead,
 which is consistent with the existing code we have in `template-
 parts/content/content-none.php`:
 {{{
 printf(
         '<p>' . wp_kses(
                 /* translators: 1: link to WP admin new post page. */
                 __( 'Ready to publish your first post? <a href="%1$s">Get
 started here</a>.', 'twentytwentyone' ),
                 array(
                         'a' => array(
                                 'href' => array(),
                         ),
                 )
         ) . '</p>',
         esc_url( admin_url( 'post-new.php' ) )
 );
 }}}

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


More information about the wp-trac mailing list