Uploading YAML with changed source strings recreates existing strings

I’m using the Update or Restore File to update YAML files and noticed that Crowdin doesn’t update an existing string when there’s a copy edit in the uploaded YAML file. Instead it deletes the string and adds a new one. Because of this, all comments get lost.

That behavior is quite bad and might be a bug. When I’m setting the updateOption to “keep_translations_and_approvals” nothing gets deleted. After an update with that option, the comments are still there. Unfortunately I can’t set that flag all the time, because usually I want to remove existing translations when the source string changes.

Ideally strings should not get recreated when the source string changes in the uploaded YAML file. So, the string ID should stay the same and comments shouldn’t get deleted.

1 Like

In case there were changes to source string, the translation and comments would be lost, because if changed, it receives another unique under-the-hood ID.

Let’s say, you have source “hello worlds” + translation “bonjour bonjour”. If update source to “hello, worlds!” translation comments and all related staff would be lost.

It’s in case I get you right. Also, I know in some file format each file editing changes the internal ID, like you changed 10/100 stings, but during “save” system rebuilds the whole file, so all of 'em were changed.

1 Like

Hmm, I get what you are saying and that makes perfectly sense for some file types. But it doesn’t really make sense for YAML files where each string as a unique key. Let’s say I have this YAML file:

en:
  greeting: "Hello!"

The key of that string in Crowdin is root.greeting. Now, lets update that file.

en:
  greeting: "Good morning!"

The key is still the same, so I’d expect that Crowdin simply updates the source string, but doesn’t delete the comments. And it even works that way when I set the updateOption to “keep_translations_and_approvals”, but I usually don’t want to keep translations. Just the comments.

Anyway, that shows me that Crowdin has the ability to match the string by key, but for some reason it doesn’t do that unless we keep translations. Instead it deletes the old string and adds a new string. My request is to always keep the string if it matches the key.

Hello @gerhard

I have a strong assumption that this is more workflow-based behavior rather than a system logic one. I will contact you directly in private messages.