aboutsummaryrefslogtreecommitdiffstats
path: root/sanity/schemas/localized-string.ts
blob: 6ff74241ba1b54817f0d09617b3528d116f74d43 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { supportedLanguages } from "./_locales";

export default {
    title: 'Localized string',
    name: 'localizedString',
    type: 'object',
    fieldsets: [
        {
            title: 'Translations',
            name: 'translations',
            options: { collapsible: true }
        }
    ],
    fields: supportedLanguages.map(lang => ({
        title: lang.title,
        name: lang.id,
        type: 'string',
        fieldset: lang.isDefault ? null : 'translations'
    }))
}