Problem/Motivation
Currently is not possible to specify which file field values get synced over translations meaning that the user has to replace all values (file, description, display) if the field is translable.
Proposed resolution
Add column_groups to \Drupal\file\Plugin\Field\FieldType\FileItem so it behaves in a the same way as \Drupal\image\Plugin\Field\FieldType\ImageItem
Remaining tasks
Review
User interface changes
Before

After

API changes
N/A
Data model changes
N/A
Release notes snippet
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | Screenshot 2024-04-29 at 10.04.15 AM.png | 26.25 KB | smustgrave |
| #24 | Screenshot 2024-04-29 at 10.03.06 AM.png | 9.71 KB | smustgrave |
Issue fork drupal-3101552
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3101552-make-fileitem-translations
changes, plain diff MR !7795
Comments
Comment #2
primsi commentedInitial patch.
Comment #4
primsi commentedDefault stays as it is.
Comment #11
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #12
nikhil_110 commentedAttached patch against Drupal 10.1.x
Comment #13
nikhil_110 commentedFixed Cc Issue..
Comment #14
nikhil_110 commentedComment #15
smustgrave commentedThis will need a change record.
Comment #17
mathilde_dumond commentedHere is a link to the change record https://www.drupal.org/node/3376175
Comment #18
smustgrave commentedNo longer applies to 11.x
Also a test-only patch would be useful please.
Comment #19
_utsavsharma commentedPatch for 11.x.
Please review.
Comment #20
sleitner commentedComment #23
berdirCreated a merge request.
Comment #24
smustgrave commentedHid patches as fix is in MR now.
Updated issue summary with before/after to show the changes. Also added the same to the change record.
Added 1 small nitpicky change to the MR.
Testing the MR and I was able to parts of the file field.
Comment #25
catchCommitted/pushed to 11.x and cherry-picked to 10.3.x, thanks!