<p dir="auto"><strong>I'm submitting a ...</strong>  (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1321938/18496190/4b29bc28-7a67-11e6-9e32-e1a7dd4fcf96.png"><img src="https://cloud.githubusercontent.com/assets/1321938/18496190/4b29bc28-7a67-11e6-9e32-e1a7dd4fcf96.png" alt="webpack_warning" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Current behavior</strong><br>
When compiling using webpack, in angular rc7 core libraries there are a couple of warnings.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
I guess no warnings... :-)</p>
<p dir="auto"><strong>Reproduction of the problem</strong><br>
Install a bare project, the simplest you like using webpack with the Angular2 rc7 revision and you will get the warnings.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
All the last versions of Angular2 rc7, typings, ts and webpack related dependencies. All of them on the latest versions npm has.</p>
<ul dir="auto">
<li><strong>Angular version:</strong><br>
2.0.0-rc.7</li>
</ul>
<p dir="auto">#<strong>I'm submitting a ...</strong>  (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
AoT works with simple translations, but does not seem to work with  ICU expressions.</p>
<p dir="auto">I successfully follow the same process with static translations, but with expressions it errors.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
Should work with ICU expressions</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
Here is my component:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { Component } from '@angular/core';

@Component({
  selector: 'redbox-dashboard',
  template: `
    &lt;span i18n=&quot;wolf count|describing how many wolves there are&quot;&gt;{wolves, plural, =0 {no wolves} =1 {one wolf} =2 {two wolves} other {a wolf pack}}&lt;/span&gt;
    ({{wolves}})`
})
export class DashboardComponent {
  wolves = 0;

  addWolfs() {
    this.wolves++;
  }

}"><pre class="notranslate"><code class="notranslate">import { Component } from '@angular/core';

@Component({
  selector: 'redbox-dashboard',
  template: `
    &lt;span i18n="wolf count|describing how many wolves there are"&gt;{wolves, plural, =0 {no wolves} =1 {one wolf} =2 {two wolves} other {a wolf pack}}&lt;/span&gt;
    ({{wolves}})`
})
export class DashboardComponent {
  wolves = 0;

  addWolfs() {
    this.wolves++;
  }

}
</code></pre></div>
<p dir="auto">I run <code class="notranslate">ng-xi18n --i18nFormat=xlf -p tsconfig-aot.json</code> to generate the base xlf</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
&lt;xliff version=&quot;1.2&quot; xmlns=&quot;urn:oasis:names:tc:xliff:document:1.2&quot;&gt;
  &lt;file source-language=&quot;en&quot; datatype=&quot;plaintext&quot; original=&quot;ng2.template&quot;&gt;
    &lt;body&gt;
      &lt;trans-unit id=&quot;ada0bafc6896b2d762094ae188738e8aeadfe1ec&quot; datatype=&quot;html&quot;&gt;
        &lt;source/&gt;
        &lt;target/&gt;
        &lt;note priority=&quot;1&quot; from=&quot;description&quot;&gt;describing how many wolves there are&lt;/note&gt;
        &lt;note priority=&quot;1&quot; from=&quot;meaning&quot;&gt;wolf count&lt;/note&gt;
      &lt;/trans-unit&gt;
    &lt;/body&gt;
  &lt;/file&gt;
&lt;/xliff&gt;
"><pre class="notranslate"><code class="notranslate">&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"&gt;
  &lt;file source-language="en" datatype="plaintext" original="ng2.template"&gt;
    &lt;body&gt;
      &lt;trans-unit id="ada0bafc6896b2d762094ae188738e8aeadfe1ec" datatype="html"&gt;
        &lt;source/&gt;
        &lt;target/&gt;
        &lt;note priority="1" from="description"&gt;describing how many wolves there are&lt;/note&gt;
        &lt;note priority="1" from="meaning"&gt;wolf count&lt;/note&gt;
      &lt;/trans-unit&gt;
    &lt;/body&gt;
  &lt;/file&gt;
&lt;/xliff&gt;

</code></pre></div>
<p dir="auto">I duplicate the base xlf and make a new, language specific version:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
&lt;xliff version=&quot;1.2&quot; xmlns=&quot;urn:oasis:names:tc:xliff:document:1.2&quot;&gt;
  &lt;file source-language=&quot;en&quot; datatype=&quot;plaintext&quot; original=&quot;ng2.template&quot;&gt;
    &lt;body&gt;
      &lt;trans-unit id=&quot;ada0bafc6896b2d762094ae188738e8aeadfe1ec&quot; datatype=&quot;html&quot;&gt;
        &lt;source/&gt;
        &lt;target&gt;{wolves, plural, =0 {ningún lobo} =1 {un lobo} =2 {dos lobos} other {una horda de lobos}}&lt;/target&gt;
        &lt;note priority=&quot;1&quot; from=&quot;description&quot;&gt;describing how many wolves there are&lt;/note&gt;
        &lt;note priority=&quot;1&quot; from=&quot;meaning&quot;&gt;wolf count&lt;/note&gt;
      &lt;/trans-unit&gt;
    &lt;/body&gt;
  &lt;/file&gt;
&lt;/xliff&gt;
"><pre class="notranslate"><code class="notranslate">&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"&gt;
  &lt;file source-language="en" datatype="plaintext" original="ng2.template"&gt;
    &lt;body&gt;
      &lt;trans-unit id="ada0bafc6896b2d762094ae188738e8aeadfe1ec" datatype="html"&gt;
        &lt;source/&gt;
        &lt;target&gt;{wolves, plural, =0 {ningún lobo} =1 {un lobo} =2 {dos lobos} other {una horda de lobos}}&lt;/target&gt;
        &lt;note priority="1" from="description"&gt;describing how many wolves there are&lt;/note&gt;
        &lt;note priority="1" from="meaning"&gt;wolf count&lt;/note&gt;
      &lt;/trans-unit&gt;
    &lt;/body&gt;
  &lt;/file&gt;
&lt;/xliff&gt;

</code></pre></div>
<p dir="auto">The language specific version contains the ICU expression.</p>
<p dir="auto">When compiling the language specific version using <code class="notranslate">ngc --i18nFile=ng-messages-es.xlf --locale=es --i18nFormat=xlf -p tsconfig-aot.json</code></p>
<p dir="auto">I get the error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: Missing translation for message 3a8b5c14d335fa003953a4c69a7785ea1eaa08e4 (&quot;
    &lt;span i18n=&quot;wolf count|describing how many wolves there are&quot;&gt;[ERROR -&gt;]{wolves, plural, =0 {no wolves} =1 {one wolf} =2 {two wolves} other {a wolf pack}}&lt;/span&gt;
    ({{wolv&quot;): DashboardComponent@1:65
    at TranslationBundle.get (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:8835:21)
    at _Visitor._translateMessage (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:7174:63)
    at _Visitor.visitElement (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:7045:37)
    at Element.visit (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:4953:78)
    at /Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:7066:60
    at Array.forEach (native)
    at _Visitor.visitElement (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:7065:31)
    at Element.visit (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:4953:78)
    at _Visitor.merge (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:6926:57)
    at mergeTranslations (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:6866:22)
Compilation failed
"><pre class="notranslate"><code class="notranslate">Error: Missing translation for message 3a8b5c14d335fa003953a4c69a7785ea1eaa08e4 ("
    &lt;span i18n="wolf count|describing how many wolves there are"&gt;[ERROR -&gt;]{wolves, plural, =0 {no wolves} =1 {one wolf} =2 {two wolves} other {a wolf pack}}&lt;/span&gt;
    ({{wolv"): DashboardComponent@1:65
    at TranslationBundle.get (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:8835:21)
    at _Visitor._translateMessage (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:7174:63)
    at _Visitor.visitElement (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:7045:37)
    at Element.visit (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:4953:78)
    at /Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:7066:60
    at Array.forEach (native)
    at _Visitor.visitElement (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:7065:31)
    at Element.visit (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:4953:78)
    at _Visitor.merge (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:6926:57)
    at mergeTranslations (/Users/helgevot/development/architecture/redbox_angular/node_modules/@angular/compiler/bundles/compiler.umd.js:6866:22)
Compilation failed

</code></pre></div>
<p dir="auto">The ids on the two files match, but the compiler is complaining about a second id <code class="notranslate">3a8b5c14d335fa003953a4c69a7785ea1eaa08e4</code> that is not defined anywhere.</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>

<ul dir="auto">
<li>
<p dir="auto"><strong>Angular version:</strong> 2.3.0</p>
</li>
<li>
<p dir="auto"><strong>Language:</strong> [TypeScript]</p>
</li>
<li>
<p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =   6.2.1</p>
</li>
</ul>