-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi18n-options.d.ts
38 lines (38 loc) · 1.35 KB
/
i18n-options.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* @license
* Copyright Google LLC 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.dev/license
*/
import { DiagnosticHandlingStrategy } from '@angular/localize/tools';
import type { TranslationLoader } from './load-translations';
export interface LocaleDescription {
files: {
path: string;
integrity?: string;
format?: string;
}[];
translation?: Record<string, unknown>;
dataPath?: string;
baseHref?: string;
subPath: string;
}
export interface I18nOptions {
inlineLocales: Set<string>;
sourceLocale: string;
locales: Record<string, LocaleDescription>;
flatOutput?: boolean;
readonly shouldInline: boolean;
hasDefinedSourceLocale?: boolean;
i18nDuplicateTranslation?: DiagnosticHandlingStrategy;
}
export declare function createI18nOptions(projectMetadata: {
i18n?: unknown;
}, inline?: boolean | string[], logger?: {
warn(message: string): void;
}, ssrEnabled?: boolean): I18nOptions;
export declare function loadTranslations(locale: string, desc: LocaleDescription, workspaceRoot: string, loader: TranslationLoader, logger: {
warn: (message: string) => void;
error: (message: string) => void;
}, usedFormats?: Set<string>, duplicateTranslation?: 'ignore' | 'error' | 'warning'): void;