S392/featue/31918 display translation keys without duplicates in the translation key #439
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the updated translations file messages+intl-icu.en_GB.yml is used in the translation tool and we run the app/console lexik:translations:import command we can see that in the translation tool UI we have duplicate values for the same translation key (old and updated one) as can be seen in the screenshot bellow:
It's because the translation file has the s+intl-icu suffix compared to the old file name and is treated as a new file in the translation tool DB
For the import commande, each file is identified by the triplet: domain, locale, extention
for exemple:
- messages.fr_FR.yml
domain: messages
locale: fr_FR
extention: yml
- messages+intl-icu.fr_FR.yml
domain: messages+intl-icu
locale: fr_FR
extention: yml
as a consequence the translation for the two files is imported twice
if we delete the keys andnupdate the domaines for both files, in order to have the same domain for both of them, the import command will create one translation key, but the old one (first i serted in the DB) is the one saved as a translation for the key
what to do:
what is left to do:
update the commande to delete all keys in the case of messages+intl-icu files