Issue 1:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When compiling using webpack, in angular rc7 core libraries there are a couple of warnings.

Expected behavior

I guess no warnings... :-)

Reproduction of the problem

Install a bare project, the simplest you like using webpack with the Angular2 rc7 revision and you will get the warnings.

Please tell us about your environment:

All the last versions of Angular2 rc7, typings, ts and webpack related dependencies. All of them on the latest versions npm has.

Angular version:

2.0.0-rc.7

Issue 2:
#I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

AoT works with simple translations, but does not seem to work with ICU expressions.

I successfully follow the same process with static translations, but with expressions it errors.

Expected behavior

Should work with ICU expressions

Minimal reproduction of the problem with instructions

Here is my component:

import { Component } from '@angular/core';

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

addWolfs() {
this.wolves++;
}

}

I run ng-xi18n --i18nFormat=xlf -p tsconfig-aot.json to generate the base xlf

<?xml version="1.0" encoding="UTF-8" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="ng2.template">
<body>
<trans-unit id="ada0bafc6896b2d762094ae188738e8aeadfe1ec" datatype="html">
<source/>
<target/>
<note priority="1" from="description">describing how many wolves there are</note>
<note priority="1" from="meaning">wolf count</note>
</trans-unit>
</body>
</file>
</xliff>

I duplicate the base xlf and make a new, language specific version:

<?xml version="1.0" encoding="UTF-8" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="ng2.template">
<body>
<trans-unit id="ada0bafc6896b2d762094ae188738e8aeadfe1ec" datatype="html">
<source/>
<target>{wolves, plural, =0 {ningún lobo} =1 {un lobo} =2 {dos lobos} other {una horda de lobos}}</target>
<note priority="1" from="description">describing how many wolves there are</note>
<note priority="1" from="meaning">wolf count</note>
</trans-unit>
</body>
</file>
</xliff>

The language specific version contains the ICU expression.

When compiling the language specific version using ngc --i18nFile=ng-messages-es.xlf --locale=es --i18nFormat=xlf -p tsconfig-aot.json

I get the error:

Error: Missing translation for message 3a8b5c14d335fa003953a4c69a7785ea1eaa08e4 ("
<span i18n="wolf count|describing how many wolves there are">[ERROR ->]{wolves, plural, =0 {no wolves} =1 {one wolf} =2 {two wolves} other {a wolf pack}}</span>
({{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

The ids on the two files match, but the compiler is complaining about a second id 3a8b5c14d335fa003953a4c69a7785ea1eaa08e4 that is not defined anywhere.

What is the motivation / use case for changing the behavior?

Angular version: 2.3.0

Language: [TypeScript]

Node (for AoT issues): node --version = 6.2.1