-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 suggestion always displays post type in english #21377
Comments
Confirmed this by setting my site language to French, adding a link in a paragraph, and typing words from a post title. As you surmised, the problem is because the request is returning a post type, not a display name. The post type is set here: This is then displayed as-is by https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/link-control/search-item.js#L55 I imagine the API should return a post type display name, or the link control changed to map between type and display name. |
Noting that this is still present in WP 6.3 |
…omponent (WordPress#21377) - Add a new media search handler to standardize the response shape for all search request in the editor - Add a new REST field `label` in the search-result schema. This field contains the localized post type name of each item in the response. - Update `getVisualTypeName` function to use the new `label` field when displaying suggestions in `LinkControl`
…omponent (WordPress#21377) - Add a new media search handler to standardize the response shape for all search request in the editor - Add a new REST field `label` in the search-result schema. This field contains the localized post type name of each item in the response. - Update `getVisualTypeName` function to use the new `label` field when displaying suggestions in `LinkControl`
…omponent (WordPress#21377) - Add a new media search handler to standardize the response shape for all search request in the editor - Add a new REST field `label` in the search-result schema. This field contains the localized post type name of each item in the response. - Update `getVisualTypeName` function to use the new `label` field when displaying suggestions in `LinkControl`
Hi!
The new link modal in WP5.4 is very neat!
I was missing the post type in the suggestions.
So, the issue is in the fact than the post type is always displayed in english : post, page...
I'm from France, the translation is complete so I don't think it's a missing translation (and those terms are on the core for decades). Maybe the slug is used instead of the real name?
The text was updated successfully, but these errors were encountered: