jwikman / nab-al-tools

The code repository for NAB AL Tools, an AL tool for VS Code
https://marketplace.visualstudio.com/items?itemName=nabsolutions.nab-al-tools
MIT License
19 stars 7 forks source link

NAB: Replace Self Closing Xlf Tags -> This option creates an empty space #461

Closed dirkmass closed 5 months ago

dirkmass commented 5 months ago

This above mentioned option may needs an additional setting (or a fix?).

It creates a space character. This can cause merge issues with other translation tools:

image

Describe the solution you'd like This option should not create this space character.

Describe alternatives you've considered Or a new setting to explicit delete this whitespace.

This would increase compatibility with other programs.

jwikman commented 5 months ago

Hi @dirkmass,

There seem to be a lot of different behavior in different translation tools. :)

That is why we added the NAB.SearchReplaceBeforeSaveXliff setting.

Try this in your settings:

        "NAB.ReplaceSelfClosingXlfTags": false,
        "NAB.SearchReplaceBeforeSaveXliff": [
            {
                "searchFor": " />",
                "replaceWith": "/>"
            }
        ],
dirkmass commented 5 months ago

Awesome! That solved the issue (and some other issues, too ;) )

jwikman commented 5 months ago

@dirkmass great! :)