@ -8,7 +8,7 @@
|
||||
|
||||
import {computeMsgId, digest, sha1} from '../../src/i18n/digest';
|
||||
|
||||
export function main(): void {
|
||||
{
|
||||
describe('digest', () => {
|
||||
describe('digest', () => {
|
||||
it('must return the ID if it\'s explicit', () => {
|
||||
|
@ -16,7 +16,7 @@ import {TranslationBundle} from '../../src/i18n/translation_bundle';
|
||||
import * as html from '../../src/ml_parser/ast';
|
||||
import {serializeNodes as serializeHtmlNodes} from '../ml_parser/ast_serializer_spec';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('Extractor', () => {
|
||||
describe('elements', () => {
|
||||
it('should extract from elements', () => {
|
||||
|
@ -11,7 +11,7 @@ import {TranslationBundle} from '@angular/compiler/src/i18n/translation_bundle';
|
||||
import {HtmlParser} from '@angular/compiler/src/ml_parser/html_parser';
|
||||
import {ParseTreeResult} from '@angular/compiler/src/ml_parser/parser';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('I18N html parser', () => {
|
||||
// https://github.com/angular/angular/issues/14322
|
||||
it('should parse the translations only once', () => {
|
||||
|
@ -12,7 +12,7 @@ import {Message} from '@angular/compiler/src/i18n/i18n_ast';
|
||||
import {HtmlParser} from '@angular/compiler/src/ml_parser/html_parser';
|
||||
import {DEFAULT_INTERPOLATION_CONFIG} from '@angular/compiler/src/ml_parser/interpolation_config';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('I18nParser', () => {
|
||||
|
||||
describe('elements', () => {
|
||||
|
@ -20,7 +20,7 @@ import {SpyResourceLoader} from '../spies';
|
||||
|
||||
import {FrLocalization, HTML, I18nComponent, validateHtml} from './integration_common';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('i18n XLIFF 2.0 integration spec', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
|
@ -20,7 +20,7 @@ import {SpyResourceLoader} from '../spies';
|
||||
|
||||
import {FrLocalization, HTML, I18nComponent, validateHtml} from './integration_common';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('i18n XLIFF integration spec', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
|
@ -20,7 +20,7 @@ import {SpyResourceLoader} from '../spies';
|
||||
|
||||
import {FrLocalization, HTML, I18nComponent, validateHtml} from './integration_common';
|
||||
|
||||
export function main() {
|
||||
{
|
||||
describe('i18n XMB/XTB integration spec', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
|
@ -13,7 +13,7 @@ import {Serializer} from '../../src/i18n/serializers/serializer';
|
||||
import {HtmlParser} from '../../src/ml_parser/html_parser';
|
||||
import {DEFAULT_INTERPOLATION_CONFIG} from '../../src/ml_parser/interpolation_config';
|
||||
|
||||
export function main(): void {
|
||||
{
|
||||
describe('MessageBundle', () => {
|
||||
describe('Messages', () => {
|
||||
let messages: MessageBundle;
|
||||
|
@ -11,7 +11,7 @@ import * as i18n from '@angular/compiler/src/i18n/i18n_ast';
|
||||
import {serializeNodes} from '../../../src/i18n/digest';
|
||||
import {_extractMessages} from '../i18n_parser_spec';
|
||||
|
||||
export function main(): void {
|
||||
{
|
||||
describe('i18n AST', () => {
|
||||
describe('CloneVisitor', () => {
|
||||
it('should clone an AST', () => {
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import {PlaceholderRegistry} from '../../../src/i18n/serializers/placeholder';
|
||||
|
||||
export function main(): void {
|
||||
{
|
||||
describe('PlaceholderRegistry', () => {
|
||||
let reg: PlaceholderRegistry;
|
||||
|
||||
|
@ -242,7 +242,7 @@ lignes</target>
|
||||
</xliff>
|
||||
`;
|
||||
|
||||
export function main(): void {
|
||||
(function(){
|
||||
const serializer = new Xliff2();
|
||||
|
||||
function toXliff(html: string, locale: string | null = null): string {
|
||||
@ -413,4 +413,4 @@ lignes`
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
@ -226,7 +226,7 @@ lignes</target>
|
||||
</xliff>
|
||||
`;
|
||||
|
||||
export function main(): void {
|
||||
(function(){
|
||||
const serializer = new Xliff();
|
||||
|
||||
function toXliff(html: string, locale: string | null = null): string {
|
||||
@ -381,4 +381,4 @@ lignes`
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
@ -11,7 +11,7 @@ import {Xmb} from '@angular/compiler/src/i18n/serializers/xmb';
|
||||
import {HtmlParser} from '@angular/compiler/src/ml_parser/html_parser';
|
||||
import {DEFAULT_INTERPOLATION_CONFIG} from '@angular/compiler/src/ml_parser/interpolation_config';
|
||||
|
||||
export function main(): void {
|
||||
{
|
||||
describe('XMB serializer', () => {
|
||||
const HTML = `
|
||||
<p>not translatable</p>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import * as xml from '../../../src/i18n/serializers/xml_helper';
|
||||
|
||||
export function main(): void {
|
||||
{
|
||||
describe('XML helper', () => {
|
||||
it('should serialize XML declaration', () => {
|
||||
expect(xml.serialize([new xml.Declaration({version: '1.0'})]))
|
||||
|
@ -12,7 +12,7 @@ import * as i18n from '../../../src/i18n/i18n_ast';
|
||||
import {Xtb} from '../../../src/i18n/serializers/xtb';
|
||||
|
||||
|
||||
export function main(): void {
|
||||
{
|
||||
describe('XTB serializer', () => {
|
||||
const serializer = new Xtb();
|
||||
|
||||
|
@ -14,7 +14,7 @@ import {ParseLocation, ParseSourceFile, ParseSourceSpan} from '../../src/parse_u
|
||||
import {serializeNodes} from '../ml_parser/ast_serializer_spec';
|
||||
import {_extractMessages} from './i18n_parser_spec';
|
||||
|
||||
export function main(): void {
|
||||
{
|
||||
describe('TranslationBundle', () => {
|
||||
const file = new ParseSourceFile('content', 'url');
|
||||
const startLocation = new ParseLocation(file, 0, 0, 0);
|
||||
|
Reference in New Issue
Block a user