Skip to content

Feat[Experiment]: Add AI-Powered Content Translation#747

Open
yogeshbhutkar wants to merge 23 commits into
WordPress:developfrom
yogeshbhutkar:add/ai-translation
Open

Feat[Experiment]: Add AI-Powered Content Translation#747
yogeshbhutkar wants to merge 23 commits into
WordPress:developfrom
yogeshbhutkar:add/ai-translation

Conversation

@yogeshbhutkar

@yogeshbhutkar yogeshbhutkar commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

What, Why, and How?

Closes #187

This PR adds a new Content Translation experiment that lets users translate post content directly from the editor. It introduces a backend ability, ai/content-translation, to achieve this.

The feature is needed so editors can generate translations without leaving the post editing flow. It supports common target languages, gates access through the experiment settings, checks provider support for text generation, validates the selected language, and requires the user to have edit permissions for the post being translated.

Future explorations:

  • Add a dedicated action for translating the post title independently.
  • Add per-block translation controls through the Content Resize toolbar.
  • Extend the support to multiple content blocks.

Use of AI Tools

AI assistance: Yes
Tool(s): Codex
Model(s): GPT-5.5
Used for: Test suggestions and frequent AI-assisted code reviews.

Testing Instructions

  1. Enable the Content Translation experiment in Settings > AI.
  2. Confirm that an AI Connector with text generation support is configured.
  3. Create or open a post that contains translatable paragraph or heading content.
  4. In the post sidebar, click Generate Translation, choose a target language, and start the translation.
  5. Verify that the translated content is applied to the expected blocks.

Screencast

screencast.mov

Changelog Entry

Added - AI-Powered Content Translation

Open WordPress Playground Preview

@yogeshbhutkar yogeshbhutkar marked this pull request as ready for review June 22, 2026 10:23
@github-actions

Copy link
Copy Markdown

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: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>

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

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.45729% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.80%. Comparing base (27e202b) to head (e4504fe).

Files with missing lines Patch % Lines
...lities/Content_Translation/Content_Translation.php 91.81% 9 Missing ⚠️
...iments/Content_Translation/Content_Translation.php 90.69% 4 Missing ⚠️
...cludes/Abilities/Content_Translation/Languages.php 92.10% 3 Missing ⚠️
...ilities/Content_Translation/system-instruction.php 87.50% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #747      +/-   ##
=============================================
+ Coverage      76.41%   76.80%   +0.38%     
- Complexity      1828     1863      +35     
=============================================
  Files             87       91       +4     
  Lines           7764     7963     +199     
=============================================
+ Hits            5933     6116     +183     
- Misses          1831     1847      +16     
Flag Coverage Δ
unit 76.80% <91.45%> (+0.38%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

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.

Support multilingual rewriting and translation via AI

1 participant