uwazi
uwazi copied to clipboard
Thesauri updates need some extra validations
There are cases that are not really clear how to solve on the translations side when updating thesauri values in specific ways, we think its better to add a specific validation for this cases and provide a semantic error to the user since this are or should be rare cases.
The scenarios to validate are:
1- Update 2 different values on a thesauri on different groups to the same value. 2- Update 2 values that are the same on different groups to be different values.
Is this only a problem for the Translations of these elements? Or is this a problem for the actual Thesaurus values?
If this is only a problem because of resulting matching translation keys, I believe the approach should really be that: if a language Key has changed, we delete existing keys. If, on the other hand, a new X key matches a previous one, well, it uses the previous translations.
Adding to this issue since I recently encountered a scenario that was really confusing:
On a thesaurus with this structure
- Item 1
- Item 2
- Group 1
- Item 1
- Item 2
- Item 3
where there are repeated items in the root and inside Group 1, the translations are the same for the repeated items. This means that when I want to translate this thesaurus I will find that I'm only able to translate Item 1
and Item 2
regardless of whether they are the root items or the grouped items.
I understand that Item 1
root and Item 1
inside Group 1
can be different things that might be translated differently. I'm not sure if forcing them to be translated in the same way is intended. @RafaPolit