1
>
/*---------------------------------------------------------------------------------------------
extensionNls.ts
2
>
* Copyright (c) Microsoft Corporation. All rights reserved.
3
>
* Licensed under the MIT License. See License.txt in the project root for license information.
4
>
*--------------------------------------------------------------------------------------------*/
5
>
6
>
import { isObject, isString } from '../../../base/common/types.js';
7
>
import { ILocalizedString } from '../../action/common/action.js';
8
>
import { IExtensionManifest } from '../../extensions/common/extensions.js';
9
>
import { localize } from '../../../nls.js';
10
>
import { ILogger } from '../../log/common/log.js';
11
>
12
>
export interface ITranslations {
13
>
[key: string]: string | { message: string; comment: string[] } | undefined;
14
>
}
15
>
16
>
export function localizeManifest(logger: ILogger, extensionManifest: IExtensionManifest, translations: ITranslations, fallbackTranslations?: ITranslations): IExtensionManifest {
17
try {
18
replaceNLStrings(logger, extensionManifest, translations, fallbackTranslations);