iljapostnovs / VSCodeUI5Plugin

Visual Studio Code Extension for UI5 Development
Apache License 2.0
61 stars 6 forks source link

Possibility of duplicate i18n Texts #306

Closed mateusz-matyjaszczyk closed 1 year ago

mateusz-matyjaszczyk commented 1 year ago

Describe the bug If you use f4 to create i18n texts there are possibilities in which duplicate entries will be created.

To Reproduce Steps to reproduce the behavior: If you create any element with text and provide any text there

then use f4 to add it to i18n and then want to use the same string anywhere, like a column header so you put

and also press f4 on it.

Both of them will create new entry in i18n that will be identical.

Expected behavior I think there should be a warning/error message that text with given boundleResourceId already exist

Screenshots

Screenshot 2023-03-17 at 05 49 41

Then after I press F4 on second text it will hint to create text with the same Resource Bundle ID

Screenshot 2023-03-17 at 05 50 08

After I accept it:

Screenshot 2023-03-17 at 05 50 40 Screenshot 2023-03-17 at 05 50 49
iljapostnovs commented 1 year ago

Fixed in v1.0.0, please check. Now it will not add duplicate entry. In some time I will create additional linter for such issues.

mateusz-matyjaszczyk commented 1 year ago

I can confirm it is now fixed. Thanks!

iljapostnovs commented 1 year ago

@MateuszMatyjaszczyk , FYI, I've added Duplicate Translation linter in v1.1.0 :)