You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
i18n: The "Written by" byline can't be reordered for other languages #218
The single post templates build the byline from two blocks: a paragraph with esc_html_e( 'Written by ', 'ipsum' ), followed by a Post Author Name block.
In general, visible text shouldn't be built by concatenating translatable strings, because the word order is then fixed by the code rather than by the translation. Here, translators can only translate "Written by" and can't move the author name. Languages that put the name first, such as Japanese ({authorName} 著), can't produce a natural byline.
One way to fix this is a block binding, like the existing ipsum/comments-cta source. The paragraph would be bound to a new source that returns the whole byline as one translatable string, with a placeholder for the author name:
The trade-off is that the author name is no longer a separate block, so it can't be styled on its own. Today the byline and the name share the same font and weight, so the look wouldn't change.
Where does it happen?
On the site (front end)
Steps to reproduce
Open a single post.
See the byline "Written by" followed by the author name.
Look at patterns/hidden-single.php:47. See that only "Written by " is translatable and the author name is a separate block, so the order is fixed.
Activity
Keep the "Written by" label on one line with the author name
Treat "Written by" as a label before the author name (#246)