2017-07-21 13:49:45 -04:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
|
|
|
import {NgLocalization} from '@angular/common';
|
|
|
|
import {ResourceLoader} from '@angular/compiler';
|
|
|
|
import {MessageBundle} from '@angular/compiler/src/i18n/message_bundle';
|
|
|
|
import {Xliff2} from '@angular/compiler/src/i18n/serializers/xliff2';
|
|
|
|
import {HtmlParser} from '@angular/compiler/src/ml_parser/html_parser';
|
|
|
|
import {DEFAULT_INTERPOLATION_CONFIG} from '@angular/compiler/src/ml_parser/interpolation_config';
|
|
|
|
import {DebugElement, TRANSLATIONS, TRANSLATIONS_FORMAT} from '@angular/core';
|
|
|
|
import {ComponentFixture, TestBed, async} from '@angular/core/testing';
|
|
|
|
import {expect} from '@angular/platform-browser/testing/src/matchers';
|
|
|
|
|
|
|
|
import {SpyResourceLoader} from '../spies';
|
|
|
|
|
|
|
|
import {FrLocalization, HTML, I18nComponent, validateHtml} from './integration_common';
|
|
|
|
|
2017-12-16 17:42:55 -05:00
|
|
|
{
|
2017-07-21 13:49:45 -04:00
|
|
|
describe('i18n XLIFF 2.0 integration spec', () => {
|
|
|
|
|
|
|
|
beforeEach(async(() => {
|
|
|
|
TestBed.configureCompiler({
|
|
|
|
providers: [
|
perf: switch angular to use StaticInjector instead of ReflectiveInjector
This change allows ReflectiveInjector to be tree shaken resulting
in not needed Reflect polyfil and smaller bundles.
Code savings for HelloWorld using Closure:
Reflective: bundle.js: 105,864(34,190 gzip)
Static: bundle.js: 154,889(33,555 gzip)
645( 2%)
BREAKING CHANGE:
`platformXXXX()` no longer accepts providers which depend on reflection.
Specifically the method signature when from `Provider[]` to
`StaticProvider[]`.
Example:
Before:
```
[
MyClass,
{provide: ClassA, useClass: SubClassA}
]
```
After:
```
[
{provide: MyClass, deps: [Dep1,...]},
{provide: ClassA, useClass: SubClassA, deps: [Dep1,...]}
]
```
NOTE: This only applies to platform creation and providers for the JIT
compiler. It does not apply to `@Compotent` or `@NgModule` provides
declarations.
Benchpress note: Previously Benchpress also supported reflective
provides, which now require static providers.
DEPRECATION:
- `ReflectiveInjector` is now deprecated as it will be remove. Use
`Injector.create` as a replacement.
closes #18496
2017-08-03 15:33:29 -04:00
|
|
|
SpyResourceLoader.PROVIDE,
|
|
|
|
FrLocalization.PROVIDE,
|
2017-07-21 13:49:45 -04:00
|
|
|
{provide: TRANSLATIONS, useValue: XLIFF2_TOMERGE},
|
|
|
|
{provide: TRANSLATIONS_FORMAT, useValue: 'xlf2'},
|
|
|
|
]
|
|
|
|
});
|
|
|
|
|
|
|
|
TestBed.configureTestingModule({declarations: [I18nComponent]});
|
|
|
|
}));
|
|
|
|
|
|
|
|
it('should extract from templates', () => {
|
|
|
|
const catalog = new MessageBundle(new HtmlParser, [], {});
|
|
|
|
const serializer = new Xliff2();
|
|
|
|
catalog.updateFromTemplate(HTML, 'file.ts', DEFAULT_INTERPOLATION_CONFIG);
|
|
|
|
|
|
|
|
expect(catalog.write(serializer)).toContain(XLIFF2_EXTRACTED);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should translate templates', () => {
|
|
|
|
const tb: ComponentFixture<I18nComponent> =
|
|
|
|
TestBed.overrideTemplate(I18nComponent, HTML).createComponent(I18nComponent);
|
|
|
|
const cmp: I18nComponent = tb.componentInstance;
|
|
|
|
const el: DebugElement = tb.debugElement;
|
|
|
|
|
|
|
|
validateHtml(tb, cmp, el);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
const XLIFF2_TOMERGE = `
|
|
|
|
<unit id="615790887472569365">
|
|
|
|
<segment>
|
|
|
|
<source>i18n attribute on tags</source>
|
|
|
|
<target>attributs i18n sur les balises</target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="3707494640264351337">
|
|
|
|
<segment>
|
|
|
|
<source>nested</source>
|
|
|
|
<target>imbriqué</target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="5539162898278769904">
|
|
|
|
<segment>
|
|
|
|
<source>nested</source>
|
|
|
|
<target>imbriqué</target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="3780349238193953556">
|
|
|
|
<segment>
|
|
|
|
<source><pc id="0" equivStart="START_ITALIC_TEXT" equivEnd="CLOSE_ITALIC_TEXT" type="fmt" dispStart="<i>" dispEnd="</i>">with placeholders</pc></source>
|
|
|
|
<target><pc id="0" equivStart="START_ITALIC_TEXT" equivEnd="CLOSE_ITALIC_TEXT" type="fmt" dispStart="<i>" dispEnd="</i>">avec des espaces réservés</pc></target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="5415448997399451992">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:11</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source><pc id="0" equivStart="START_TAG_DIV" equivEnd="CLOSE_TAG_DIV" type="other" dispStart="<div>" dispEnd="</div>">with <pc id="1" equivStart="START_TAG_DIV" equivEnd="CLOSE_TAG_DIV" type="other" dispStart="<div>" dispEnd="</div>">nested</pc> placeholders</pc></source>
|
|
|
|
<target><pc id="0" equivStart="START_TAG_DIV" equivEnd="CLOSE_TAG_DIV" type="other" dispStart="<div>" dispEnd="</div>">avec <pc id="1" equivStart="START_TAG_DIV" equivEnd="CLOSE_TAG_DIV" type="other" dispStart="<div>" dispEnd="</div>">espaces réservés</pc> imbriqués</pc></target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="5525133077318024839">
|
|
|
|
<segment>
|
|
|
|
<source>on not translatable node</source>
|
|
|
|
<target>sur des balises non traductibles</target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="8670732454866344690">
|
|
|
|
<segment>
|
|
|
|
<source>on translatable node</source>
|
|
|
|
<target>sur des balises traductibles</target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="4593805537723189714">
|
|
|
|
<segment>
|
|
|
|
<source>{VAR_PLURAL, plural, =0 {zero} =1 {one} =2 {two} other {<pc id="0" equivStart="START_BOLD_TEXT" equivEnd="CLOSE_BOLD_TEXT" type="fmt" dispStart="<b>" dispEnd="</b>">many</pc>} }</source>
|
|
|
|
<target>{VAR_PLURAL, plural, =0 {zero} =1 {un} =2 {deux} other {<pc id="0" equivStart="START_BOLD_TEXT" equivEnd="CLOSE_BOLD_TEXT" type="fmt" dispStart="<b>" dispEnd="</b>">beaucoup</pc>} }</target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
2018-01-22 15:23:10 -05:00
|
|
|
<unit id="703464324060964421">
|
2017-07-21 13:49:45 -04:00
|
|
|
<segment>
|
|
|
|
<source>
|
2018-01-22 15:23:10 -05:00
|
|
|
<ph id="0" equiv="ICU" disp="{sex, select, other {...} male {...} female {...}}"/>
|
2017-07-21 13:49:45 -04:00
|
|
|
</source>
|
2018-01-22 15:23:10 -05:00
|
|
|
<target><ph id="0" equiv="ICU" disp="{sex, select, other {...} male {...} female {...}}"/></target>
|
2017-07-21 13:49:45 -04:00
|
|
|
</segment>
|
|
|
|
</unit>
|
2018-01-22 15:23:10 -05:00
|
|
|
<unit id="5430374139308914421">
|
2017-07-21 13:49:45 -04:00
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:23</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
2018-01-22 15:23:10 -05:00
|
|
|
<source>{VAR_SELECT, select, other {other} male {m} female {female} }</source>
|
|
|
|
<target>{VAR_SELECT, select, other {autre} male {homme} female {femme} }</target>
|
2017-07-21 13:49:45 -04:00
|
|
|
</segment>
|
|
|
|
</unit>
|
2018-01-22 15:23:10 -05:00
|
|
|
<unit id="1300564767229037107">
|
2017-07-21 13:49:45 -04:00
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:25,27</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>
|
2018-01-22 15:23:10 -05:00
|
|
|
<ph id="0" equiv="ICU" disp="{sexB, select, male {...} female {...}}"/>
|
2017-07-21 13:49:45 -04:00
|
|
|
</source>
|
2018-01-22 15:23:10 -05:00
|
|
|
<target><ph id="0" equiv="ICU" disp="{sexB, select, male {...} female {...}}"/></target>
|
2017-07-21 13:49:45 -04:00
|
|
|
</segment>
|
|
|
|
</unit>
|
2018-01-22 15:23:10 -05:00
|
|
|
<unit id="2500580913783245106">
|
2017-07-21 13:49:45 -04:00
|
|
|
<segment>
|
2018-01-22 15:23:10 -05:00
|
|
|
<source>{VAR_SELECT, select, male {m} female {f} }</source>
|
|
|
|
<target>{VAR_SELECT, select, male {homme} female {femme} }</target>
|
2017-07-21 13:49:45 -04:00
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="4851788426695310455">
|
|
|
|
<segment>
|
|
|
|
<source><ph id="0" equiv="INTERPOLATION" disp="{{ "count = " + count }}"/></source>
|
|
|
|
<target><ph id="0" equiv="INTERPOLATION" disp="{{ "count = " + count }}"/></target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="9013357158046221374">
|
|
|
|
<segment>
|
|
|
|
<source>sex = <ph id="0" equiv="INTERPOLATION" disp="{{ sex }}"/></source>
|
|
|
|
<target>sexe = <ph id="0" equiv="INTERPOLATION" disp="{{ sex }}"/></target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="8324617391167353662">
|
|
|
|
<segment>
|
|
|
|
<source><ph id="0" equiv="CUSTOM_NAME" disp="{{ "custom name" //i18n(ph="CUSTOM_NAME") }}"/></source>
|
|
|
|
<target><ph id="0" equiv="CUSTOM_NAME" disp="{{ "custom name" //i18n(ph="CUSTOM_NAME") }}"/></target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="7685649297917455806">
|
|
|
|
<segment>
|
|
|
|
<source>in a translatable section</source>
|
|
|
|
<target>dans une section traductible</target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
2018-01-22 15:23:10 -05:00
|
|
|
<unit id="2329001734457059408">
|
2017-07-21 13:49:45 -04:00
|
|
|
<segment>
|
|
|
|
<source>
|
2018-01-22 15:23:10 -05:00
|
|
|
<pc id="0" equivStart="START_HEADING_LEVEL1" equivEnd="CLOSE_HEADING_LEVEL1" type="other" dispStart="<h1>" dispEnd="</h1>">Markers in html comments</pc>
|
2017-07-21 13:49:45 -04:00
|
|
|
<pc id="1" equivStart="START_TAG_DIV" equivEnd="CLOSE_TAG_DIV" type="other" dispStart="<div>" dispEnd="</div>"></pc>
|
|
|
|
<pc id="2" equivStart="START_TAG_DIV_1" equivEnd="CLOSE_TAG_DIV" type="other" dispStart="<div>" dispEnd="</div>"><ph id="3" equiv="ICU" disp="{count, plural, =0 {...} =1 {...} =2 {...} other {...}}"/></pc>
|
|
|
|
</source>
|
|
|
|
<target>
|
2018-01-22 15:23:10 -05:00
|
|
|
<pc id="0" equivStart="START_HEADING_LEVEL1" equivEnd="CLOSE_HEADING_LEVEL1" type="other" dispStart="<h1>" dispEnd="</h1>">Balises dans les commentaires html</pc>
|
2017-07-21 13:49:45 -04:00
|
|
|
<pc id="1" equivStart="START_TAG_DIV" equivEnd="CLOSE_TAG_DIV" type="other" dispStart="<div>" dispEnd="</div>"></pc>
|
|
|
|
<pc id="2" equivStart="START_TAG_DIV_1" equivEnd="CLOSE_TAG_DIV" type="other" dispStart="<div>" dispEnd="</div>"><ph id="3" equiv="ICU" disp="{count, plural, =0 {...} =1 {...} =2 {...} other {...}}"/></pc>
|
|
|
|
</target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="1491627405349178954">
|
|
|
|
<segment>
|
|
|
|
<source>it <pc id="0" equivStart="START_BOLD_TEXT" equivEnd="CLOSE_BOLD_TEXT" type="fmt" dispStart="<b>" dispEnd="</b>">should</pc> work</source>
|
|
|
|
<target>ca <pc id="0" equivStart="START_BOLD_TEXT" equivEnd="CLOSE_BOLD_TEXT" type="fmt" dispStart="<b>" dispEnd="</b>">devrait</pc> marcher</target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="i18n16">
|
|
|
|
<segment>
|
|
|
|
<source>with an explicit ID</source>
|
|
|
|
<target>avec un ID explicite</target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="i18n17">
|
|
|
|
<segment>
|
|
|
|
<source>{VAR_PLURAL, plural, =0 {zero} =1 {one} =2 {two} other {<pc id="0" equivStart="START_BOLD_TEXT" equivEnd="CLOSE_BOLD_TEXT" type="fmt" dispStart="<b>" dispEnd="</b>">many</pc>} }</source>
|
|
|
|
<target>{VAR_PLURAL, plural, =0 {zero} =1 {un} =2 {deux} other {<pc id="0" equivStart="START_BOLD_TEXT" equivEnd="CLOSE_BOLD_TEXT" type="fmt" dispStart="<b>" dispEnd="</b>">beaucoup</pc>} }</target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="4085484936881858615">
|
|
|
|
<segment>
|
|
|
|
<source>{VAR_PLURAL, plural, =0 {Found no results} =1 {Found one result} other {Found <ph id="0" equiv="INTERPOLATION" disp="{{response.getItemsList().length}}"/> results} }</source>
|
|
|
|
<target>{VAR_PLURAL, plural, =0 {Pas de réponse} =1 {une réponse} other {Trouvé <ph id="0" equiv="INTERPOLATION" disp="{{response.getItemsList().length}}"/> réponses} }</target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="4035252431381981115">
|
|
|
|
<segment>
|
|
|
|
<source>foo<pc id="0" equivStart="START_LINK" equivEnd="CLOSE_LINK" type="link" dispStart="<a>" dispEnd="</a>">bar</pc></source>
|
|
|
|
<target>FOO<pc id="0" equivStart="START_LINK" equivEnd="CLOSE_LINK" type="link" dispStart="<a>" dispEnd="</a>">BAR</pc></target>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="5339604010413301604">
|
|
|
|
<segment>
|
|
|
|
<source><ph id="0" equiv="MAP NAME" disp="{{ 'test' //i18n(ph="map name") }}"/></source>
|
|
|
|
<target><ph id="0" equiv="MAP NAME" disp="{{ 'test' //i18n(ph="map name") }}"/></target>
|
|
|
|
</segment>
|
|
|
|
</unit>`;
|
|
|
|
|
|
|
|
const XLIFF2_EXTRACTED = `
|
|
|
|
<unit id="615790887472569365">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:3</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>i18n attribute on tags</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="3707494640264351337">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:5</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>nested</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="5539162898278769904">
|
|
|
|
<notes>
|
|
|
|
<note category="meaning">different meaning</note>
|
|
|
|
<note category="location">file.ts:7</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>nested</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="3780349238193953556">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:9</note>
|
|
|
|
<note category="location">file.ts:10</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source><pc id="0" equivStart="START_ITALIC_TEXT" equivEnd="CLOSE_ITALIC_TEXT" type="fmt" dispStart="<i>" dispEnd="</i>">with placeholders</pc></source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="5415448997399451992">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:11</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source><pc id="0" equivStart="START_TAG_DIV" equivEnd="CLOSE_TAG_DIV" type="other" dispStart="<div>" dispEnd="</div>">with <pc id="1" equivStart="START_TAG_DIV" equivEnd="CLOSE_TAG_DIV" type="other" dispStart="<div>" dispEnd="</div>">nested</pc> placeholders</pc></source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="5525133077318024839">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:14</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>on not translatable node</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="8670732454866344690">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:15</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>on translatable node</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="4593805537723189714">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:20</note>
|
|
|
|
<note category="location">file.ts:37</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>{VAR_PLURAL, plural, =0 {zero} =1 {one} =2 {two} other {<pc id="0" equivStart="START_BOLD_TEXT" equivEnd="CLOSE_BOLD_TEXT" type="fmt" dispStart="<b>" dispEnd="</b>">many</pc>} }</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
2018-01-22 15:23:10 -05:00
|
|
|
<unit id="703464324060964421">
|
2017-07-21 13:49:45 -04:00
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:22,24</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>
|
2018-01-22 15:23:10 -05:00
|
|
|
<ph id="0" equiv="ICU" disp="{sex, select, male {...} female {...} other {...}}"/>
|
2017-07-21 13:49:45 -04:00
|
|
|
</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
2018-01-22 15:23:10 -05:00
|
|
|
<unit id="5430374139308914421">
|
2017-07-21 13:49:45 -04:00
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:23</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
2018-01-22 15:23:10 -05:00
|
|
|
<source>{VAR_SELECT, select, male {m} female {f} other {other} }</source>
|
2017-07-21 13:49:45 -04:00
|
|
|
</segment>
|
|
|
|
</unit>
|
2018-01-22 15:23:10 -05:00
|
|
|
<unit id="1300564767229037107">
|
2017-07-21 13:49:45 -04:00
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:25,27</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>
|
2018-01-22 15:23:10 -05:00
|
|
|
<ph id="0" equiv="ICU" disp="{sexB, select, male {...} female {...}}"/>
|
2017-07-21 13:49:45 -04:00
|
|
|
</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
2018-01-22 15:23:10 -05:00
|
|
|
<unit id="2500580913783245106">
|
2017-07-21 13:49:45 -04:00
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:26</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
2018-01-22 15:23:10 -05:00
|
|
|
<source>{VAR_SELECT, select, male {m} female {f} }</source>
|
2017-07-21 13:49:45 -04:00
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="4851788426695310455">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:29</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source><ph id="0" equiv="INTERPOLATION" disp="{{ "count = " + count }}"/></source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="9013357158046221374">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:30</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>sex = <ph id="0" equiv="INTERPOLATION" disp="{{ sex }}"/></source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="8324617391167353662">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:31</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source><ph id="0" equiv="CUSTOM_NAME" disp="{{ "custom name" //i18n(ph="CUSTOM_NAME") }}"/></source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="7685649297917455806">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:36</note>
|
|
|
|
<note category="location">file.ts:54</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>in a translatable section</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
2018-01-22 15:23:10 -05:00
|
|
|
<unit id="2329001734457059408">
|
2017-07-21 13:49:45 -04:00
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:34,38</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>
|
2018-01-22 15:23:10 -05:00
|
|
|
<pc id="0" equivStart="START_HEADING_LEVEL1" equivEnd="CLOSE_HEADING_LEVEL1" type="other" dispStart="<h1>" dispEnd="</h1>">Markers in html comments</pc>
|
2017-07-21 13:49:45 -04:00
|
|
|
<pc id="1" equivStart="START_TAG_DIV" equivEnd="CLOSE_TAG_DIV" type="other" dispStart="<div>" dispEnd="</div>"></pc>
|
|
|
|
<pc id="2" equivStart="START_TAG_DIV_1" equivEnd="CLOSE_TAG_DIV" type="other" dispStart="<div>" dispEnd="</div>"><ph id="3" equiv="ICU" disp="{count, plural, =0 {...} =1 {...} =2 {...} other {...}}"/></pc>
|
|
|
|
</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="1491627405349178954">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:40</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>it <pc id="0" equivStart="START_BOLD_TEXT" equivEnd="CLOSE_BOLD_TEXT" type="fmt" dispStart="<b>" dispEnd="</b>">should</pc> work</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="i18n16">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:42</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>with an explicit ID</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="i18n17">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:43</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>{VAR_PLURAL, plural, =0 {zero} =1 {one} =2 {two} other {<pc id="0" equivStart="START_BOLD_TEXT" equivEnd="CLOSE_BOLD_TEXT" type="fmt" dispStart="<b>" dispEnd="</b>">many</pc>} }</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="4085484936881858615">
|
|
|
|
<notes>
|
|
|
|
<note category="description">desc</note>
|
|
|
|
<note category="location">file.ts:46,52</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>{VAR_PLURAL, plural, =0 {Found no results} =1 {Found one result} other {Found <ph id="0" equiv="INTERPOLATION" disp="{{response.getItemsList().length}}"/> results} }</source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="4035252431381981115">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:54</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source>foo<pc id="0" equivStart="START_LINK" equivEnd="CLOSE_LINK" type="link" dispStart="<a>" dispEnd="</a>">bar</pc></source>
|
|
|
|
</segment>
|
|
|
|
</unit>
|
|
|
|
<unit id="5339604010413301604">
|
|
|
|
<notes>
|
|
|
|
<note category="location">file.ts:56</note>
|
|
|
|
</notes>
|
|
|
|
<segment>
|
|
|
|
<source><ph id="0" equiv="MAP NAME" disp="{{ 'test' //i18n(ph="map name") }}"/></source>
|
|
|
|
</segment>
|
|
|
|
</unit>`;
|