I did not understand what you meant here at first, but when I tried manually deleting the field from the content file, then updating any other field and saving, the field is again written on the content file, just as shown in my initial post.
Is this a (known?) bug related to the writer field within the structure?
The structure field itself is NOT translate: false
All subfields are translate: false, EXCEPT for the writer field, which was the only subfield that could actually need translation, as it was a textual description, while all other subfields were numerical.
With this setup, when I update any other field in the non-default language page, the structure field is written as empty.
I’ve tested the plainkit and this seems to be the default/intended behaviour. If a page has several translatable fields, as long as one of the fields is modified, all are written to content file, even if empty.
I am not sure what to do here. The description field is needed per each structure item. But this behaviour messes the output on page update.
Is my only solution to workaround it on the front ? Perhaps checking if the field is empty on the current language, and reverting to default language, as duplicating what Kirby usually does?
After more thought, I think that this is flawed since the beggining.
Structure items are not supposed to be translated, as they don’t have correspondence on subsequent languages, as field themselves do.
It seems that updating a field in a non-default lang page that contains a translatable structure field, does not write the field as empty.
So I think I should set this structure field (and its subfields) as translatable, purge the non-default langs content files if necessary, and educate my users on the need to recreate each structure item manually if a translation is needed.
The main problem with the structure field is that number and order of items in one language may not be the same as in other languages and therefore as long as there are no items ids that might result in issues.