#3586428 Fix TextExtractor to include all FieldConfig fields regardless of name prefix
Description
Replaces the hardcoded field-name pattern check in TextExtractor::shouldExtract() with an instanceof FieldConfigInterface check. Previously, only fields matching body, info, ^field_, or ^layout_builder_ were extracted for translation — silently skipping any custom field whose name does not follow the field_ convention. Since the field_ prefix is configurable (and can be emptied) via field_ui.settings.yml, this affected entire projects.
All FieldConfigInterface fields (custom configurable fields, regardless of name) now defer to the plugin's own shouldExtract() logic. Base fields continue through the existing label-key check.
Testing instructions
- Set
field_prefixto empty infield_ui.settings.yml. - Create a plain text field named
summaryon an Article node. - Populate the field and run AI translation on the node.
- Verify the
summaryfield content is translated.
Checklist
- I have linked the related issue in the MR title or description
- I have performed a self-review of my own code
- I have added or updated tests, or explained in the description why this change is not covered by tests
- I have updated documentation for any new or changed functionality
- I have written testing instructions and verified them locally
- I have noted any required post-merge steps (config imports, cache rebuilds, manual changes)
- This MR contains no breaking API or hook changes, or they are explicitly documented in the description
AI Compliance
Note
Check the one that best describes your usage, or leave all unchecked if AI was not significantly used.
-
AI Assisted Code
Mainly written by a human; AI used for autocomplete or partial generation under full human supervision. -
AI Generated Code
Mainly generated by AI, reviewed and approved by a human before this MR was created. -
Vibe Coded
Generated by AI and only functionally reviewed before this MR was created.
Closes #3586428