This topic started in another post but I think itâs an own topic.
Translation optional
About translation: optional
. Here is a pull request.
enter a translation for non-default languages but wonât pre-fill them with the fallback from the default language (so that they also can be saved as empty and stay empty in the panel)
We can just disable the translation âautocopyâ (what I call it), no more prefills of empty fields? It sounds great!
I would like to do that on all my fields in my site. That would require alot of work, or a new global option would be needed, something like c::set('translation', 'optional');
.
Confusion as default (the important part)
If I could decide, I would NOT show content from the default language when the content in a field is empty. Here is whyâŚ
It does not reflect content text file
If I look in the panel it has prefilled content from the default language. If I look in the content text file, the field content is empty. In a way the Panel is lying to us, presenting alternative facts like that.
Itâs already prefilled, false positives
When it pre-populates all the fields with content, I get the sense of that everything is already done. Itâs easy to forget to translate fields that already has content, much easier than if it would have been empty. I prefer empty, not prefilled.
It creates confusion
If two field contains the same text, itâs easy to get lost and not know on what language you are. Except from the two letters in the Panel menu, the two Panel language pages are identical. I donât know how many times Iâve saved a field in the wrong language and I only own one multi language site.
When I created my Kirby Keyword Map I could not understand why my keyword tags was not saved correctly. I removed them but they kept coming back. I thought it was a bug in my plugin for sure, but it was this âautocopyâ feature. I needed to do a nice little hack to get around this issue.
It creates new plugins
I built my Kirby Panel Flags because I often save things in the wrong language. Itâs because my current language page is a duplicate with the default language page, so I think Iâm on the default language when Iâm not. Thatâs the main reason for it, but I did not know that when I was making the plugin. Now I know.
(Iâm well aware of the reason for not mixing flags with translations, itâs another topic)
There is also Kirby Translations which might not be made because of this issue, but itâs still a good helper to solve the problem by manually check that every language does not contain an âautocopyâ text.
There is also an issue to make the language more simple to spot.
But I still think the main reason for confusion is that fields are prefilled with another language.
Kirby often doesnât try to be smart
I like that Kirby often does not try to be smart. In this case I think itâs tries to be. Kirby is guessing that I want to use my default text when I write a text in the new language. In many cases it might be good to have, but it also creates confusition. Which fields are uniquely translated and which are autocopied? Hard to tell.
My solution
Instead of using what I called the âautocopyâ feature above, I would leave untranslated fields empty as default. Then as a helper to translate these field, I would add a button with each field which says âGetâ or âPasteâ to get the content from the default language. Then instead I would get the content by demand only when I need it. Add content, instead of remove content.
Itâs not a breaking change even if it may seem like it. It would just change the behaviour for people working in the Panel. It would not affect the frontend.
distantnative solution
I think this could be a nice workaround, in case my solution are not approved.
Itâs better to have some cue than none at all. In that case I hope the Panel would still look clean. I think it would easily be messy if not careful.
@distantnative @bastianallgeier @texnixe @lukasbestle
I think I know you crew well and I bet that my solution is a too big turn for Kirby to take right now? At least now I got my thoughts out of the system. I hope that I at least gave some you some thought and maybe food for new ideas.
Thanks!