Skip to content

Fix: Content Classification: Make character count locale-aware#577

Closed
hbhalodia wants to merge 3 commits into
WordPress:developfrom
hbhalodia:fix/issue-571
Closed

Fix: Content Classification: Make character count locale-aware#577
hbhalodia wants to merge 3 commits into
WordPress:developfrom
hbhalodia:fix/issue-571

Conversation

@hbhalodia
Copy link
Copy Markdown
Contributor

@hbhalodia hbhalodia commented May 19, 2026

What?

Closes #571

Why?

  • PR updates the content clasification experiment for suggestion to use dynamic wordCount based on user's locale.
  • It uses words, characters_excluding_spaces, or characters_including_spaces for wordCount.

How?

Use of AI Tools

  • None

Testing Instructions

  • Change the site language to Japanese.
  • Open a post.
  • Copy the following Japanese text multiple times to create content: こんにちは。
  • Confirm that the Suggest Categories button should enable now.

Screenshots or screencast

Before After
Screenshot 2026-05-19 at 2 33 21 PM Screenshot 2026-05-19 at 2 33 21 PM

Changelog Entry

Added - Determine wordCountType for content classification experiment to use words or characters based on users locale.

Open WordPress Playground Preview

@hbhalodia hbhalodia marked this pull request as ready for review May 19, 2026 09:08
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.41%. Comparing base (396fcc3) to head (e0c4bb4).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #577   +/-   ##
==========================================
  Coverage      71.41%   71.41%           
  Complexity      1158     1158           
==========================================
  Files             67       67           
  Lines           5584     5584           
==========================================
  Hits            3988     3988           
  Misses          1596     1596           
Flag Coverage Δ
unit 71.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dkotter dkotter mentioned this pull request May 19, 2026
42 tasks
@dkotter dkotter added this to the 1.0.0 milestone May 19, 2026
@dkotter
Copy link
Copy Markdown
Collaborator

dkotter commented May 19, 2026

Code looks good here but see my comment here. Thinking we may want to hold this pending that discussion as I'd love to be more consistent with how we handle this across the plugin.

@dkotter dkotter modified the milestones: 1.0.0, 1.1.0 May 19, 2026
@hbhalodia
Copy link
Copy Markdown
Contributor Author

I am closing this PR.

We can improve same in the PR - #581

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Content Classification: Make character count locale-aware

3 participants