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 - single_file error #6353

Open
michael-proulx opened this issue Mar 28, 2022 · 5 comments
Open

i18n - single_file error #6353

michael-proulx opened this issue Mar 28, 2022 · 5 comments
Assignees
Labels
area: i18n good first issue type: bug code to address defects in shipped code

Comments

@michael-proulx
Copy link

Describe the bug
I have setup i18n in a single_file, need to test some feature, but I'll need a specific setup, but I encounter an issue while testing that.
Folder collection does work very good, but when I'm trying to save a single_file, I got the following error.

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'get')

Screenshots
https://user-images.githubusercontent.com/23478544/160468575-5aa9e718-b27c-4a9f-8f1c-e74785a7fe5f.mp4

Applicable Versions:
I'm using the unpkg link and 11ty as SSG

CMS configuration

backend:
  ...
  squash_merges: true

local_backend:
  url: http://localhost:8089/api/v1

publish_mode: editorial_workflow

media_folder: 'packages/_data/images'

i18n:
  structure: single_file
  locales: [en, fr, de]
  default_locale: en

collections:
  - name: 'pages'
    label: 'Pages'
    i18n:
      structure: single_file
    files:
      - name: 'about'
        label: 'About Page'
        file: packages/_data/pages/about.yml
        i18n: true
        fields:
          - { label: 'Title', name: 'title', widget: 'string', i18n: true }
@michael-proulx michael-proulx added the type: bug code to address defects in shipped code label Mar 28, 2022
@solidevolution
Copy link

Same here

@dfdez
Copy link
Contributor

dfdez commented Apr 19, 2022

Same issue as #5122 and #4480.

The main problem is that right now the code is trying to update all translations, so if there is no data in some of the translations this will create the error.

As mentioned in this issue #4480 (comment) I think that having to fill all translation doesn't have a lot of sense making this a limitation of i18n.

Right now I'm working on my fork to fix this issue

@preetamslot
Copy link

is there a fix? or is it that i18n just won't work with files for now?

@VISHESH0932
Copy link

@michael-proulx hey, can i work on this issue?

@michael-proulx
Copy link
Author

@VISHESH0932 sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: i18n good first issue type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

6 participants