Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: data is not duplicated for default value setting #4356

Closed
blackb1rd opened this issue Sep 23, 2020 · 0 comments · Fixed by #4463
Closed

i18n: data is not duplicated for default value setting #4356

blackb1rd opened this issue Sep 23, 2020 · 0 comments · Fixed by #4463
Labels
area: i18n type: bug code to address defects in shipped code

Comments

@blackb1rd
Copy link
Contributor

Describe the bug
when setting i18n: duplicate in string widget, the value is not duplicated from the defalut locale if there is a default value setting

To Reproduce

  1. Setting:
backend:
  name: gitlab

i18n:
  structure:  multiple_files
  locales: [en, th]
  defaultLocale: en

collections:
- name: "test"
  folder: "content"
  path: "{{slug}}/index"
  media_folder: ''
  public_folder: ''
  create: true
  i18n: true
  fields:
  - {label: Author, name: author, widget: string, default: "tester", i18n: duplicate}
  1. create content without touching the "Author" field(if it was edited, the value will be duplicated).
  2. see the non-default locales, there is no "Author"field.

Expected behavior

when setting i18n: duplicate in any widgets, the value shall duplicated from the defalut locale.

Screenshots

Applicable Versions:

  • Netlify CMS version: [e.g. 2.0.4]
  • Git provider: [e.g. GitHub, BitBucket]
  • OS: [e.g. Windows 7]
  • Browser version [e.g. chrome 22, safari 11]

netlify-cms-app 2.12.24
netlify-cms-core 2.30.7
netlify-cms 2.10.60

CMS configuration

backend:
  name: gitlab

i18n:
  structure:  multiple_files
  locales: [en, th]
  defaultLocale: en

collections:
- name: "test"
  folder: "content"
  path: "{{slug}}/index"
  media_folder: ''
  public_folder: ''
  create: true
  i18n: true
  fields:
  - {label: Author, name: author, widget: string, default: "tester", i18n: duplicate}

Additional context

@blackb1rd blackb1rd added the type: bug code to address defects in shipped code label Sep 23, 2020
@blackb1rd blackb1rd changed the title i18n : the value is not duplicated if there is a default value setting i18n : the data is not duplicated for default value setting Oct 16, 2020
@blackb1rd blackb1rd changed the title i18n : the data is not duplicated for default value setting i18n: the data is not duplicated for default value setting Oct 16, 2020
@blackb1rd blackb1rd changed the title i18n: the data is not duplicated for default value setting i18n: data is not duplicated for default value setting Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: i18n type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants