Closed MartinWahnschaffe closed 5 years ago
Can you test this build? Debug.zip It appears to be working correctly, but don't use it on important files. Please check to make sure that nothing more than necessary is removed.
Just tested it. It doesn't have duplicates anymore đź‘Ť
Unfortunately, it now reorders all the keys, so its a bit difficult to say for sure if something is missing. For most files it just seems to have the entries in reverse alphabetic order. In some files (I couldn't find a clear pattern) only part of the entries are affected.
Is the ordering the only issue? You can order everything by key to make it easier to compare.
It was ordered by key. I just opened the directory, changed one file and when saving the key order of many files was changed.
@Klocman Can you provide a branch with the changes you made? I could look into it and find out why the ordering of the keys is disrupted.
Here you go https://github.com/HakanL/resxtranslator/tree/removeTest , check the last commit for the change. It looks like the entire _deletedKeys logic can be removed if the only side effect is wrong ordering. It should be possible to preserve it in some different way.
Thanks, that helped a lot to understand the way the ResourceHolder works. I have created a pull request that will fix the problem and keep the order of the keys.
Steps to reproduce:
This does not happen for newly created keys.
My settings (if relevant)