feat: adds ability to copy data from across locales (#8203)

### What?

Adds ability to copy data from one locale to another at a document
level.

### How?

For any localized collection, you will find a new option in the document
controls called `Copy to Locale`.

This option will open a drawer, from here you can select your origin and
destination locales.

If data already exists in the destination locale, you can choose to: 
1. Overwrite this data (this will copy any empty fields in your origin
locale)
2. Not overwrite existing data (this will only copy data into empty
fields in the destination locale)

---------

Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
This commit is contained in:
Jessica Chowdhury
2024-11-26 17:06:30 -05:00
committed by GitHub
parent 61d6614746
commit 601759d967
50 changed files with 1401 additions and 5 deletions

View File

@@ -31,5 +31,21 @@ export const NestedToArrayAndBlock: CollectionConfig = {
},
],
},
{
name: 'topLevelArray',
type: 'array',
localized: false,
fields: [
{
name: 'localizedText',
type: 'text',
localized: true,
},
{
name: 'notLocalizedText',
type: 'text',
},
],
},
],
}