Skip to content

i18n Ivy extactor: missing type="fmt" inside <source>  #38791

@mstawick

Description

@mstawick

🐞 bug report

Is this a regression?

Kind of. Makes translation system (Crowdin in my case) treat the extracted text as a new string

Description

Given following HTML:
<div i18n>You're using a web browser<br/>that we don't support.</div>

Old extractor would produce:
<source>You&apos;re using a web browser<ph id="0" equiv="LINE_BREAK" type="fmt" disp="&lt;br/&gt;"/>that we don&apos;t support.</source>

But with the --ivy flag it produces:
<source>You&apos;re using a web browser<ph id="0" equiv="LINE_BREAK" disp="&lt;br/&gt;"/>that we don&apos;t support.</source>

so the type="fmt" is missing, changing into a new string.

🌍 Your Environment

Angular Version:


Angular CLI: 10.1.0
Node: 14.10.0
OS: linux x64

Angular: 10.1.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1001.0
@angular-devkit/build-angular      0.1001.0
@angular-devkit/build-optimizer    0.1001.0
@angular-devkit/build-webpack      0.1001.0
@angular-devkit/core               10.1.0
@angular-devkit/schematics         10.1.0
@angular/cdk                       10.2.0
@angular/cli                       10.1.0
@angular/material                  10.2.0
@angular/material-moment-adapter   10.2.0
@ngtools/webpack                   10.1.0
@schematics/angular                10.1.0
@schematics/update                 0.1001.0
rxjs                               6.6.3
typescript                         4.0.2
webpack                            4.44.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2The issue is important to a large percentage of users, with a workaroundarea: i18nIssues related to localization and internationalizationfreq2: mediumregressionIndicates than the issue relates to something that worked in a previous versionstate: has PRtype: bug/fix

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions