[wp-trac] [WordPress Trac] #45473: Twenty Nineteen: Avoid html code in translatable strings

WordPress Trac noreply at wordpress.org
Fri Apr 28 04:05:03 UTC 2023


#45473: Twenty Nineteen: Avoid html code in translatable strings
-----------------------------------+-----------------------------
 Reporter:  Presskopp              |       Owner:  (none)
     Type:  defect (bug)           |      Status:  new
 Priority:  normal                 |   Milestone:  Future Release
Component:  Bundled Theme          |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+-----------------------------

Comment (by sabernhardt):

 HTML in a string is sometimes necessary for more accurate translations;
 [55655] specifically created two of them. Some languages
 [https://docs.google.com/spreadsheets/d/1wJuGu2vJO9FQcdNuDwGoZXzyTGn4XJB3kW6Ku3pJiIw/edit?usp=sharing
 add the title before "Published in"] in at least one of the bundled
 themes. And Kurdish (Kurmanji) includes text outside of either `span` tag:
 `<span class="meta-nav">Di nav</span><br><span class="post-
 title">%title</span> de hate weşandin`

 However, I do not like having two different translations for the parent
 post link, depending on whether the attachment is an image or another
 type. Both Twenty Nineteen and Twenty Twenty-One have multiple
 translations, and the styling breaks, too. [attachment:"45473.1.patch"]
 reuses the same string for non-image attachments in Twenty Nineteen,
 adding the `br` tag.

 Using `'Published in %s'` for non-image attachment pages in Twenty Twenty-
 One might require editing both the `single.php` template and
 `twenty_twenty_one_entry_meta_footer()`. That could be addressed on
 another ticket.

 I do not find much value in changing the other three themes now. Twenty
 Fourteen is also inconsistent for different attachment types, though
 without broken styling. Twenty Fifteen and Twenty Sixteen have consistent
 links for any attachment type, and the strings are even identical between
 both of those themes.

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


More information about the wp-trac mailing list