Would be nice to not loose metadata from downloading source file, like this translator can modify English source as well and on our side we can override safely the source language without loosing anything.
Hello,
What exactly do you mean by loosing metadata? Could you give us an example?
Sure, let’s say I’m uploading this:
{
"@@locale": "en",
"test": "test",
"@test": {
"type": "text",
"placeholders": {}
},
"testAndAge": "Test have {age} years old",
"@testAndAge": {
"type": "text",
"placeholders": {
"age": {}
}
},
"testAndGender": "{gender,select, female{Test is female}male{Test is male}other{Test is unknown}}",
"@testAndGender": {
"type": "text",
"placeholders": {
"gender": {}
}
},
"testAndPlural": "{number,plural, =1{Test is alone}few{Test is few}many{Test is a lot}other{Test is other}}",
"@testAndPlural": {
"type": "text",
"placeholders": {
"number": {}
}
}
}
When I download back this is what I’m getting:
{
"@@locale": "en",
"test": "test",
"testAndAge": "Test have {age} years old",
"testAndGender": "{gender,select, female{Test is female}male{Test is male}other{Test is unknown}}",
"testAndPlural": "{number,plural, =1{Test is alone}few{Test is few}many{Test is a lot}other{Test is other}}",
}
}
All the meta data have disappeared once downloaded from localazy, which make difficult for non tech people to change source sentences.
At the moment, we don’t store all the metadata - technically, we don’t store your files, but parse them and turn them into the list of phrases along with some additional information so we are able to rebuild the correct output format. But it’s not necessary to keep everything to generate the valid output files.
We use certain metadata from ARB as a context information for the translators.
This is also the reason why our CLI never overwrites your source language files by default, so you can have any arbitrary information there.