Hello,
I’m looking for a way to export all the fields in a given schema, so they can be translated and then hopefully the translation imported. I found the bit about exporting to a CSV file, but it says “You have to specify the fields to export.” I have over a hundred fields in my schema. Do I really need to write a list of all of them? Could you please elaborate on the topic a bit? The documentation is a bit terse.
The problem with CSV is that there is no one-to-one mapping from and to JSON. Therefore you have to specify it. Of course I could improve the CLI to make some defaults.
But in your case it might make sense to write a custom tool. It is not that much effort to just use the API for that.
Thank you for the clarification. I have decided to go with JSON for now. I was able to export the contents of my schema like this: sq content export myschema --format=JSON
Then I edited the content of a single field in the json, just to test it. Then I tried to import:
This is what I got back: ’ImportArguments’ is invalid ’Fields’ should not be empty.
followed by the help page on content import.
The documentation has led me to believe that if I’m importing a JSON file, I don’t have to provide the list of fields. It’s also what I’d expect, considering the format of the JSON file is identical to what’s on the server. What am I missing?