From 91dd672aa459cfe2306c1af401b31fbd3b721d02 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Thu, 11 Aug 2016 14:49:53 -0700 Subject: [PATCH] style(xmb): add a space after ICU message cases --- modules/@angular/compiler/src/i18n/serializers/xmb.ts | 2 +- modules/@angular/compiler/test/i18n/integration_spec.ts | 1 - modules/@angular/compiler/test/i18n/serializers/xmb_spec.ts | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/@angular/compiler/src/i18n/serializers/xmb.ts b/modules/@angular/compiler/src/i18n/serializers/xmb.ts index a0b26e0c87..e19391fd4b 100644 --- a/modules/@angular/compiler/src/i18n/serializers/xmb.ts +++ b/modules/@angular/compiler/src/i18n/serializers/xmb.ts @@ -89,7 +89,7 @@ class _Visitor implements i18n.Visitor { const nodes = [new xml.Text(`{${icu.expression}, ${icu.type}, `)]; Object.keys(icu.cases).forEach((c: string) => { - nodes.push(new xml.Text(`${c} {`), ...icu.cases[c].visit(this), new xml.Text(`}`)); + nodes.push(new xml.Text(`${c} {`), ...icu.cases[c].visit(this), new xml.Text(`} `)); }); nodes.push(new xml.Text(`}`)); diff --git a/modules/@angular/compiler/test/i18n/integration_spec.ts b/modules/@angular/compiler/test/i18n/integration_spec.ts index 641dec05c6..a7a60bf40f 100644 --- a/modules/@angular/compiler/test/i18n/integration_spec.ts +++ b/modules/@angular/compiler/test/i18n/integration_spec.ts @@ -13,7 +13,6 @@ import {TestBed, TestComponentBuilder, fakeAsync} from '@angular/core/testing'; import {beforeEach, beforeEachProviders, ddescribe, describe, iit, inject, it, xdescribe, xit,} from '@angular/core/testing/testing_internal'; import {expect} from '@angular/platform-browser/testing/matchers'; import {By} from '@angular/platform-browser/src/dom/debug/by'; -import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter'; import {SpyXHR} from '../spies'; import {NgLocalization} from '@angular/common'; import {stringifyElement} from '@angular/platform-browser/testing/browser_util'; diff --git a/modules/@angular/compiler/test/i18n/serializers/xmb_spec.ts b/modules/@angular/compiler/test/i18n/serializers/xmb_spec.ts index 0c49bbf951..36d1302d32 100644 --- a/modules/@angular/compiler/test/i18n/serializers/xmb_spec.ts +++ b/modules/@angular/compiler/test/i18n/serializers/xmb_spec.ts @@ -46,9 +46,9 @@ export function main(): void { ]> translatable element <b>with placeholders</b> - { count, plural, =0 {<p>test</p>}} + { count, plural, =0 {<p>test</p>} } foo - { count, plural, =0 {{ sex, gender, other {<p>deeply nested</p>}} }} + { count, plural, =0 {{ sex, gender, other {<p>deeply nested</p>} } } } `; it('should write a valid xmb file', () => { expect(toXmb(HTML)).toEqual(XMB); });