Skip to content

Content Resizing: The "shorten" action does not detect the character length of Japanese text #578

@t-hamano

Description

@t-hamano

Description

Similar to #571

The "shorten" action requires that a paragraph contain more than 5 words. However, CJK languages like Japanese and Chinese do not use spaces between words. Consequently, this feature cannot be utilized even with sufficient content.

We should adopt a locale-aware approach rather than hard-coding the words. So, as the word count type, we should use the translated text.

https://github.com/WordPress/gutenberg/blob/1ecc3d2fe9c819af35ef312563805bc16a103036/packages/block-library/src/post-time-to-read/edit.js#L51-L61

'Add more content to enable AI suggestions (approximately 150 words).',

Step-by-step reproduction instructions

  1. Change the site language to Japanese.
  2. Open a post.
  3. Copy the following text and paste it multiple times inside a paragraph block: あああああああああああ
  4. Execute the Shorten action
  5. Confirm that an error notice is displayed.

Screenshots, screen recording, code snippet

Recording.2026-05-19.182908.mp4

Environment info

No response

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

  • Yes

Please confirm that you have tested with all plugins deactivated except the AI plugin.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Needs review

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions