For source files that are already in the normal json format, directly uploading the source file in the new format (JSON with context) recognises “crowdinContext” as the new identifier and recognises its contents as a string.
The only way I know of to correctly recognise the new format is to delete the source file and re-upload it. Usually we can do this, but many of the existing comments are lost.
I’m wondering if there is a way to correctly update the source file to the new format while retaining the history of the original annotations, etc.
After that I uploaded the following file using the “JSON with context” format. (It didn’t prompt me to use the “keep translation button”, and I don’t think it affected the results)
{
"name": {
"text": "Alice",
"crowdinContext": "The main character's name in a fictional story."
},
"city": {
"text": "Wonderland",
"crowdinContext": "A fictional place where the character Alice explores."
},
"occupation": {
"text": "Explorer",
"crowdinContext": "Alice's role as she navigates through Wonderland."
},
"hobby": {
"text": "Reading",
"crowdinContext": "Alice's favorite pastime activity."
},
"favorite_food": {
"text": "Mushrooms",
"crowdinContext": "A type of food Alice encounters in Wonderland."
}
}
Will be happy to help you with your case! Unfortunately, the only option to change JSON > JSONС is to upload a new file. But don’t worry, there is a solution to transfer all contributions from one file to another The option for duplicates will help you with this
The way will be like this:
you have old JSON with translation (with contributions) in your project;
in the project settings > Import section > select the option for duplicates, for example, “Hide (regular detection) – all duplicates will share the same translation”;
upload a new JSONC file to the project. As a result, there will be master strings in JSON, and duplicate hidden strings in JSONC;
delete the master JSON file from the project and the master file becomes JSONC and all translations migrate to it