Skip to content

Fix translatable-field collection for repeater groups and tab-organized nested forms - #118

Merged
LukeTowers merged 1 commit into
wintercms:wip/auto-translate-copyfrom
AIC-BV:fix/auto-translate-field-collection
Aug 21, 2026
Merged

Fix translatable-field collection for repeater groups and tab-organized nested forms#118
LukeTowers merged 1 commit into
wintercms:wip/auto-translate-copyfrom
AIC-BV:fix/auto-translate-field-collection

Conversation

@AIC-BV

@AIC-BV AIC-BV commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Found while production-testing this branch as requested in #115. Two issues stopped translatable: true fields from being picked up with real-world field definitions:

  1. Repeater/blocks groups sharing a field name lose all but the first group. getAutoTranslatableFields() merged group fields with a keyed union (+=). Block groups routinely all wrap their content in an identically-named nestedform (e.g. data), so only the first group's fields were scanned and every other block silently fell back to plain copy. Groups are now scanned separately.
  2. form.tabs.fields / form.secondaryTabs.fields were not descended into, so nested forms that organize fields in tabs never had their fields collected.

Both verified end-to-end on our production field definitions (blocks repeater, nl-BEen via Google) and covered by regression tests (suite green: 18 tests, 27 assertions).

🤖 Generated with Claude Code

…ed nested forms

getAutoTranslatableFields() merged group fields with a keyed union, so
groups sharing a field name (e.g. blocks that all wrap their content in
a 'data' nestedform) only had the first group's fields scanned. Scan
each group separately instead.

collectTranslatableFieldNames() did not descend into form.tabs.fields /
form.secondaryTabs.fields, so nested forms that organize their fields
in tabs were never collected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: af85b791-13ac-402c-ab02-ad7416c49581

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@LukeTowers
LukeTowers merged commit fc7e87d into wintercms:wip/auto-translate-copy Aug 21, 2026
4 checks passed
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.

2 participants