feat: i18n better locale error handling (#949)

This commit is contained in:
Daniel Lautzenheiser
2023-10-24 12:41:14 -04:00
committed by GitHub
parent f29a5f36c8
commit a31a47bc7f
10 changed files with 294 additions and 55 deletions

View File

@ -504,7 +504,7 @@ collections:
name: file
widget: file
- name: i18n_playground
label: i18n Playground
label: i18n (Multiple Files)
i18n: true
folder: packages/core/dev-test/backends/proxy/_i18n_playground
identifier_field: slug
@ -524,6 +524,54 @@ collections:
label: Date
widget: datetime
i18n: duplicate
- name: i18n_playground_multiple_folders
label: i18n (Multiple Folders)
i18n:
structure: multiple_folders
locales: [en, de, fr]
defaultLocale: en
folder: packages/core/dev-test/backends/proxy/_i18n_playground_multiple_folders
identifier_field: slug
create: true
fields:
# The slug field will be omitted from the translation.
- name: slug
label: Slug
widget: string
# same as 'i18n: translate'. Allows translation of the description field
- name: description
label: Description
widget: text
i18n: true
# The date field will be duplicated from the default locale.
- name: date
label: Date
widget: datetime
i18n: duplicate
- name: i18n_playground_single_file
label: i18n (Single File)
i18n:
structure: single_file
locales: [en, de, fr]
defaultLocale: en
folder: packages/core/dev-test/backends/proxy/_i18n_playground_multiple_folders
identifier_field: slug
create: true
fields:
# The slug field will be omitted from the translation.
- name: slug
label: Slug
widget: string
# same as 'i18n: translate'. Allows translation of the description field
- name: description
label: Description
widget: text
i18n: true
# The date field will be duplicated from the default locale.
- name: date
label: Date
widget: datetime
i18n: duplicate
- name: pages
label: Nested Pages
label_singular: 'Page'