Skip to content

Content Translation: Integrate Guidelines/Knowledge support - #987

Open
wprashed wants to merge 6 commits into
WordPress:developfrom
wprashed:add/content-translation-guidelines
Open

Content Translation: Integrate Guidelines/Knowledge support#987
wprashed wants to merge 6 commits into
WordPress:developfrom
wprashed:add/content-translation-guidelines

Conversation

@wprashed

@wprashed wprashed commented Aug 30, 2026

Copy link
Copy Markdown

Fixes #980

Description

Integrates WordPress Guidelines/Knowledge support into the Content_Translation Ability by implementing the guideline_categories() method declaring support for site, copy, and additional guidelines.

This allows site-wide guidelines, copy style rules, and translation glossaries to be passed to LLMs when requesting content translations.

Changes Included

  • Implemented guideline_categories() in includes/Abilities/Content_Translation/Content_Translation.php returning array( 'site', 'copy', 'additional' ).
  • Added unit test test_guideline_categories() in tests/Integration/Includes/Abilities/Content_TranslationTest.php.

Testing Instructions

  1. Enable Guidelines / Knowledge and Content Translation experiments.
  2. Verify wpai_content_translation Ability includes declared guideline categories (site, copy, additional) in its metadata.
  3. Test executing Content Translation with guidelines enabled.
Open WordPress Playground Preview

@wprashed
wprashed requested a review from a team August 30, 2026 07:26
@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: wprashed <wprashed@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

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.38%. Comparing base (813c81d) to head (3df0aa5).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #987   +/-   ##
==========================================
  Coverage      75.37%   75.38%           
- Complexity      3357     3358    +1     
==========================================
  Files            138      138           
  Lines          12976    12978    +2     
==========================================
+ Hits            9781     9783    +2     
  Misses          3195     3195           
Flag Coverage Δ
unit 75.38% <100.00%> (+<0.01%) ⬆️

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.

@dkotter dkotter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple minor things that need updated. In addition, we have a standard PR template that we want each contributor to follow. It looks like the PR description here doesn't completely follow that (for instance, the Use of AI Tools is missing among a few other things)

/**
* {@inheritDoc}
*
* @since 1.4.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to our contributing guide. These should be set to x.x.x

Comment thread tests/Integration/Includes/Abilities/Content_TranslationTest.php Outdated
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.

Integrate Guidelines/Knowledge into the Content Translation experiment

2 participants