anmolgkv / sfdx-labelizer-vscode

This extension enables Visual Studio Code to easily generate custom labels from static text in an sfdx project.
MIT License
0 stars 0 forks source link

[BUG] Duplicate Custom Label fullName not created but bypassing not known #18

Closed tschug closed 7 months ago

tschug commented 7 months ago

Describe the bug When testing the addition of a duplicate Custom Label, it's good that the existing Custom Label is not overwritten. However, the duplication is not alerted to the user.

To Reproduce

  1. Create a file that has two sets of completely different text that will be converted to labels.
    • DEBUG MESSAGE ONE
    • DEBUG MESSAGE TWO
  2. Convert the first label with the fullName = DEBUG_LABEL
  3. Convert the second label with the same fullName = DEBUG_LABEL

The Custom Label is only created for the first. It is not duplicated or overwritten for the second. This is good. However, the user is not alerted that it did not create the second label due to avoiding a conflict.

However, it WILL replace the text with the label syntax. (See #19 for other issue about duplicate import syntax)

Providing a VS Code alert notification would be ideal and not doing the conversion as well -- or prompting the user if they would like to overwrite the existing label.