sveltia / sveltia-cms

Alternative to Netlify/Decap CMS. Fast, lightweight, Git-based headless CMS. Modern UX, first-class i18n support, open source & free. Made with Svelte.
MIT License
905 stars 45 forks source link

Cannot update file localization #205

Closed trietng closed 3 weeks ago

trietng commented 3 weeks ago

I was doing some localization on a md file and I think I encountered some weird behavior. Not sure if it was due to my incorrect config file or a bug, but I can only save the non-default localizations and not when I opened the file for updates.

image

image

This happened on the latest version (v0.39.10). Astro version is 4.8.2.

i18n:
  structure: multiple_folders
  locales: [en, vi]
  default_locale: en
collections:
  - label: Pages
    name: pages
    i18n: true
    files:
      - label: Home
        name: home
        file: src/pages/{{locale}}/index.md
        i18n: true
        format: markdown
        fields:
          - { label: Layout, name: layout, widget: hidden, default: ../../layouts/IndexLayout.astro, i18n: duplicate }
          - label: Title
            name: title
            widget: object
            i18n: duplicate
            fields:
              - { label: Greeting, name: greeting, widget: string, i18n: true }
              - { label: Name, name: name, widget: string, i18n: true }
          - { label: Summary, name: summary, widget: string, i18n: true }
kyoshino commented 3 weeks ago

Thanks for the heads-up! Will check what’s happening.

kyoshino commented 3 weeks ago

It was a fallout from #201. Fixed in v0.39.11 🙇🏼

trietng commented 3 weeks ago

Oh, so it was a bug. Thank you for the quick fix, was scratching my head all afternoon. It is working as expected now.

kyoshino commented 3 weeks ago

It was indeed a bug. I should be writing automated tests for everything 😅