Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tyrann0us opened this issue Apr 4, 2023 · 0 comments · Fixed by #49591
Closed

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

tyrann0us opened this issue Apr 4, 2023 · 0 comments · Fixed by #49591
Assignees
Labels
[Block] Post Featured Image Affects the Post Featured Image Block Internationalization (i18n) Issues or PRs related to internationalization efforts [Type] Bug An existing feature does not function as intended

Comments

@tyrann0us
Copy link
Contributor

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

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Apr 4, 2023
@kathrynwp kathrynwp added [Type] Bug An existing feature does not function as intended Internationalization (i18n) Issues or PRs related to internationalization efforts [Block] Post Featured Image Affects the Post Featured Image Block labels Apr 5, 2023
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Featured Image Affects the Post Featured Image Block Internationalization (i18n) Issues or PRs related to internationalization efforts [Type] Bug An existing feature does not function as intended
3 participants