For every language we need to add one page for each existing page.
Ex: index.liquid => index.fr.liquid
So basically if you want to have 4 langs you will have 4 pages
Also if you clone the official template and only want to use FR language you need to drop merge all .fr.liquid page in .liquid page and drop the useless *.fr.liquid page
Proposal behavior:
Instead of create a page per lang, the idea is to add a directory "page_translation" in the data directory and inside this directory one file per lang.
index:
title: Home page
slug: home
account:
title: Account
published: false
slug: my-account
...
And an header of an page will look like this
sections_dropzone_content:
-...
So basically the value will be
the default value
overridden by the header value of the page.liquid
overridden by the translation page
Note : For sure if you want you localize your sections_dropzone_content, but this make your translation file huge with not big added value (because the customer will modify it). So we recommand to keep the sections_dropszone_content is the page.liquid and use Lorem Ipsum.
Regarding slug, handle :
Currently user mix handle, slug and their have difficulty to understand what is what.
So I propose the following behavior:
the name of the file is the handle (so no more handle key) and explain that the name of the file matter and if you rename the page is will create a new one for the next deploy. Indeed locomotive will use the file name as external key
the default slug (if not slug have been define) will be the name of the file
Handle of directory :
When creating a directory (without any page with the same name) wagon will create a page on locomotive but the page do not have any handle. So if you create a page after with the same name it will create a new page and you will have 2 pages.
The idea is now to set as handle the name of the repository. So if you create a directory, deploy and latter create a page with the same name as the directory, the next deploy will update the page instead of creating a new one.
@thibaultrey I need your feedback, I already talk about it with @did
Context:
For the Shopinvader projet we want to share a community theme with a lot of translation. We want to translate the slug and the page name ...
current template is here : https://github.com/shopinvader/shopinvader-template/tree/master/app/views/pages
Current behavior:
For every language we need to add one page for each existing page. Ex: index.liquid => index.fr.liquid So basically if you want to have 4 langs you will have 4 pages
Also if you clone the official template and only want to use FR language you need to drop merge all .fr.liquid page in .liquid page and drop the useless *.fr.liquid page
Proposal behavior:
Instead of create a page per lang, the idea is to add a directory "page_translation" in the data directory and inside this directory one file per lang.
The file will look like this :
And an header of an page will look like this
So basically the value will be
Note : For sure if you want you localize your sections_dropzone_content, but this make your translation file huge with not big added value (because the customer will modify it). So we recommand to keep the sections_dropszone_content is the page.liquid and use Lorem Ipsum.
Regarding slug, handle :
Currently user mix handle, slug and their have difficulty to understand what is what.
So I propose the following behavior:
the name of the file is the handle (so no more handle key) and explain that the name of the file matter and if you rename the page is will create a new one for the next deploy. Indeed locomotive will use the file name as external key
the default slug (if not slug have been define) will be the name of the file
Handle of directory : When creating a directory (without any page with the same name) wagon will create a page on locomotive but the page do not have any handle. So if you create a page after with the same name it will create a new page and you will have 2 pages.
The idea is now to set as handle the name of the repository. So if you create a directory, deploy and latter create a page with the same name as the directory, the next deploy will update the page instead of creating a new one.
@thibaultrey I need your feedback, I already talk about it with @did