Comments (15)
Itβs an open issue in Netlify/Decap CMS and on my todo list π
I was wondering how to solve this without breaking backward compatibility, but itβs probably not hard to do it.
- Allow developers to use the
{{locale}}
template tag in the file pathfile
path, e.g.src/locales/{{locale}}/shared.json
- Sveltia CMS enables multiple files/folders mode only if
{{locale}}
is used - Sveltia CMS will parse and generate files for all the locales while replacing
{{locale}}
Letβs see if this works.
from sveltia-cms.
A workaround is suggested in the Netlify/Decap CMS issue, btw. You can use a folder collection with create: false
and delete: false
options, create a set of files, then it looks like a file collection.
from sveltia-cms.
Thank you for the workaround tip; it would work for most cases. However, in my situation, the footerData.json and header.json structures are different. :/
Actually, I'm using the same workaround for the Studio Pages YAML file:
a folder collection with the create: false and delete: false options. All the page text is stored in single yaml file.
It works perfectly for this case. I will do the same for all pages. That way, I can translate an entire page using a single well-defined YAML file, and it will look well-structured for the client.
from sveltia-cms.
Done in v0.29.0 π’
from sveltia-cms.
whoah! Thanks a lot! It was the last barrier to building a functional fully i18n web personal stack. π―
from sveltia-cms.
Yeah, something strange is happening. There are over 500 open issues, and most of them with bug tags concern me.
I think I have tried almost all the CMSs on the market, from closed-source Contentful to open-source Fresh Star Payload CMS. Most of them were overkill for my needs, so I narrowed my search to Git-based CMSs to avoid running a server for the CMS or being at the mercy of corporations that might pull the plug. In my humble opinion, the Keystatic CMS is great option, I liked the keystatic.cloud, but I didn't like the UX; it is too dev-centric with all the Git functions. Pages CMS is great too; I liked the UI a lot, but the i18n is non-existent and it lacks some advance features.
After some testing, I thought I would stick with the half-decent Decap until I found your CMS. This is all I need, and the i18n is perfect. In Europe, i18n is a must. I'm glad I found your CMS. π
from sveltia-cms.
Will check.
from sveltia-cms.
Fixed in v0.29.1 ππΌ Two unrelated issues were involved.
from sveltia-cms.
that was fast! It's now working π
from sveltia-cms.
Yeah, something strange is happening. There are over 500 open issues, and most of them with bug tags concern me.
I was checking the numbers last night. Sveltia CMS has already solved at least 90 (or 120 if you count duplicates) of these Netlify/Decap CMS issues. Will soon reach a milestone π―
from sveltia-cms.
That's a crazy number for a single dev, especially considering that I constantly distract you from the 100-number goal :)
from sveltia-cms.
Yes, I was thinking about a solution too that does not break the existing workflow, but your src/locales/{{locale}}/shared.json idea looks more logical and it's an elegant solution. {{locale}} does not break any existing logic. π and it's easy for the developer to follow.
from sveltia-cms.
@kyoshino,
serious question:
how are you so productive with this project? Decap CMS has 500+ contributors, but their last commit was one month ago with a single feature. You added 4 features in the past 2 days.
from sveltia-cms.
I just want to ship a much better product than Decap CMS π The i18n support is my particular concern since my own clients usually require a multilingual setup. A new client wants to have content in Japanese, English and French.
Not sure whatβs happening with Decap. There are even no maintainer responses to new issues and PRs these days. Perhaps some of them have been laid off, or the company has strictly limited their time working on the project π€
Most of the contributors are from the Netlify CMS era, btw.
from sveltia-cms.
@kyoshino, I think I encountered a bug when I try to upload an image with a localized file structure. It doesn't matter whether it is an md, yaml, or json file. The image won't upload when there is a localized file structure, but I can pick the existing image from the "All Asset" though.
Additionally, I can't see my local images in the "All Asset" window.
To recreate, run this schema:
collections:
- label: 'Test'
name: 'test'
create: true
format: json
extension: json
i18n: duplicate
editor:
preview: false
files:
- file: 'src/content/{{locale}}/test.json'
label: Test Data
name: testData
i18n: duplicate
editor:
preview: false
fields:
- label: Test Image
name: testImage
widget: object
i18n: duplicate
fields:
- {label: Image, name: src, widget: image, i18n: duplicate}
image_upload_error_file_locale.mp4
from sveltia-cms.
Related Issues (20)
- Missing Github Login Button on Login Page in Firefox HOT 7
- Suggestion: hidden list field with current item index HOT 5
- [Feature Request] Option to disable local backend (filesystem) when developing locally HOT 2
- Suggestion: simple list field on summary HOT 4
- Local backend breaks and gets notification when remote backend "is experiencing a major incident" HOT 6
- GraphQL complexity error on large site HOT 3
- [Question/Request] Custom Page On Admin Panel HOT 10
- Float gets truncated in widget "number" HOT 2
- Cannot use repositories with more than two path elements HOT 1
- widget relationwith a single collection file HOT 18
- UI not loading as part of Hugo module HOT 1
- Missing entry in `.gitignore` (`.pnpm-store`). HOT 2
- Unable to unselect relation widget with multiple: false & required: false HOT 2
- Relation field does not seem to work when inside a Variable Type Widgets HOT 3
- regression 0.37.1 Markdown content disappear HOT 1
- The image files with the same filename are overridden HOT 7
- Correction for Local Development HOT 3
- Publish source maps HOT 13
- Add support for gitea/forgejo backed HOT 1
- Uncaught Error: effect_update_depth_exceeded HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sveltia-cms.