daniel-sc / ng-extract-i18n-merge

Extract and merge i18n xliff translation files for angular projects.
MIT License
170 stars 18 forks source link

`newTranslationTargetsBlank` ignored when using `omit` in translation files #74

Closed FrostKiwi closed 1 year ago

FrostKiwi commented 1 year ago

Describe the bug When using "newTranslationTargetsBlank": "omit" in combination with "trim": true, then omit is ignored when extract-i18n trims white space. It just pastes new <target>s with the state new applied.

Setup/Configuration

"extract-i18n": {
                    "builder": "ng-extract-i18n-merge:ng-extract-i18n-merge",
                    "options": {
                        "browserTarget": "<redacted>:build",
                        "outputPath": "src/locale",
                        "targetFiles": [
                            "messages.ja.xlf",
                            "messages.de.xlf",
                            "messages.ru.xlf"
                        ],
                        "sourceFile": "messages.xlf",
                        "includeContext": true,
                        "newTranslationTargetsBlank": "omit",
                        "collapseWhitespace": true,
                        "trim": true
                    }
                },

Expected behavior "newTranslationTargetsBlank": "omit" should be respected, even with "trim": true

Screenshots <target> added in the translation files, when trimming white space, but not everywhere else image

Version (please complete the following information):

daniel-sc commented 1 year ago

@FrostKiwi Please check out the latest version 2.7.1 and reach out if there are still issues! (Thanks for this issue!)

FrostKiwi commented 1 year ago

@FrostKiwi Please check out the latest version 2.7.1 and reach out if there are still issues! (Thanks for this issue!)

Can confirm this being xied with the update to 2.7.1 👍