focusreactive / focusreactive/payload-plugins

[translator] Support per-field (selective) translation within a run

Open
#48 0 comments 0 reactions 0 assignees View on GitHub
enhancement translator
Dominant language
TypeScript
Stars
19
Forks
0
Avg merge
16h 54m
Merged PRs (30d)
19

Description

## Summary

Translation operates on the whole document — every explicitly-localized leaf field is translated. Field exclusion (`withFieldTranslation({ exclude: true })`) is **static schema config**. Add the ability to translate only a **selected subset of fields** in a given run.

## Current behavior

- The pipeline walks and translates every explicitly-localized leaf field of the document.
- The only way to skip a field is the static `custom.translateKit` exclusion in the collection config; there is no per-run choice.

## Proposed change

- Accept an optional field-path **include/exclude set** on the enqueue input and thread it into the pipeline's field walk.
- Optionally expose a field picker in the document panel so an editor can translate just the fields they changed.

## Acceptance criteria

- [ ] `enqueue` accepts an optional field selection (include or exclude list of field paths).
- [ ] The pipeline sends only the selected fields to the provider; unselected localized fields are untouched.
- [ ] Backward compatible: no selection ⇒ translate all (current behavior).

## Notes

Listed under the plugin roadmap ("Field-level translation"). Static `withFieldTranslation` exclusion remains as-is and composes with the per-run selection.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the translator enqueue input and the pipeline's field-walking code. Trace how static custom.translateKit exclusions from withFieldTranslation are applied, then determine where a per-run include or exclude set can be threaded through. Done means selected fields alone reach the provider, unselected fields remain untouched, and no selection preserves current whole-document behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design, localization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.