Skip to content

"Link to […]" should not lowercase post type label #49587

@tyrann0us

Description

@tyrann0us

Description

In #40378, the string "Link to %s" (e.g. "Link to page") of the "Post Featured Image" block was made translatable. To ensure proper English grammar and because the WordPress API does not include support for lowercase post type labels, the post type's singular name is passed to toLowerCase().

While this works for English, it causes incorrect Grammar for languages that capitalize nouns, e.g. German. There, this string becomes "Link zu seite" which is wrong. It should be "Link zu Seite".

Generally, capitalization should never be changed programmatically. It may work for English, but certainly not German and probably a couple of other languages.

Step-by-step reproduction instructions

  1. Switch the locale to German
  2. Insert the "Post Featured Image" to a page (not post)
  3. Open the block settings
  4. Verify that the setting incorrectly reads "Link zu seite"

Screenshots, screen recording, code snippet

Bildschirmfoto 2023-04-04 um 21 08 32

Environment info

WordPress 6.2
no Gutenberg plugin

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

Labels

Internationalization (i18n)Issues or PRs related to internationalization efforts[Block] Post Featured ImageAffects the Post Featured Image Block[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions