## Description 1. Adds ability to publish a specific individual locale (collections and globals) 2. Shows published locale in versions list and version comparison 3. Adds new int tests to `versions` test suite - [X] I have read and understand the [CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md) document in this repository. ## Type of change - [X] New feature (non-breaking change which adds functionality) - [ ] This change requires a documentation update ## Checklist: - [X] I have added tests that prove my fix is effective or that my feature works - [X] Existing test suite passes locally with my changes - [ ] I have made corresponding changes to the documentation --------- Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
25 lines
409 B
TypeScript
25 lines
409 B
TypeScript
import type { GlobalConfig } from 'payload'
|
|
|
|
import { localizedGlobalSlug } from '../slugs.js'
|
|
|
|
const LocalizedGlobal: GlobalConfig = {
|
|
slug: localizedGlobalSlug,
|
|
fields: [
|
|
{
|
|
name: 'title',
|
|
type: 'text',
|
|
localized: true,
|
|
},
|
|
{
|
|
name: 'content',
|
|
type: 'text',
|
|
localized: true,
|
|
},
|
|
],
|
|
versions: {
|
|
drafts: true,
|
|
},
|
|
}
|
|
|
|
export default LocalizedGlobal
|