daniel-sc/ng-extract-i18n-merge

Provide an option to disable ng-extract-i18n-merge's use of HTML Character Entities like "

FrostKiwi opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
ng-extract-i18n-merge handles certain characters as HTML Character Entities. Most prominent here is ng-extract-i18n-merge inserting " for ".
The translation platform we use, Weblate, uses the characters directly. So it inserts ". There is no need to use HTML Character Entities in Angular and Weblate replaces " with " automatically. This leads to an annoying back and forth, which fills up commit diffs.

  • Weblate removes " and inserts "
  • ng-extract-i18n-merge removes " and inserts "
  • Weblate removes " and inserts "
  • ... and so on ...

See screenshot below.

Describe the solution you'd like
A switch in angular.json to disable ng-extract-i18n-merge's use of HTML Character Entities for "builder": "ng-extract-i18n-merge:ng-extract-i18n-merge" would be nice.

Additional context
Also in the screen shot is seen ng-extract-i18n-merge misunderstanding <source> changes and resetting the translation to "new". This issue is unrelated to this one and reported in: #75

Screenshots
image

Version (please complete the following information):

  • Angular: [e.g. 13.3.0]
  • OS: [e.g. Win10]
  • nodejs: [e.g. 16.20.2]
  • ng-extract-i18n-merge version: [e.g. 2.7.1]

@FrostKiwi this is essentially the behavior of Angulars extract-i18n, which generally makes sense - see #7.

This library could only convert quoted entities back - but this seems brittle, as angular probably does not expect unquoted special chars in the translation files..

I'd suggest, this is rather a bug / feature request for Weblate, that it should keep quoted characters and do no conversion!?

please comment/reopen if there is further input!