Ensure external extensions are in the extensions project (#178283)
parent
792114a7ec
commit
0d5e948d86
File diff suppressed because one or more lines are too long
|
@ -843,9 +843,12 @@ export function prepareI18nPackFiles(resultingTranslationPaths: TranslationPath[
|
|||
const extensionsPacks: Record<string, I18nPack> = {};
|
||||
const errors: any[] = [];
|
||||
return through(function (this: ThroughStream, xlf: File) {
|
||||
const project = path.basename(path.dirname(path.dirname(xlf.relative)));
|
||||
let project = path.basename(path.dirname(path.dirname(xlf.relative)));
|
||||
// strip `-new` since vscode-extensions-loc uses the `-new` suffix to indicate that it's from the new loc pipeline
|
||||
const resource = path.basename(path.basename(xlf.relative, '.xlf'), '-new');
|
||||
if (EXTERNAL_EXTENSIONS.find(e => e === resource)) {
|
||||
project = extensionsProject;
|
||||
}
|
||||
const contents = xlf.contents.toString();
|
||||
log(`Found ${project}: ${resource}`);
|
||||
const parsePromise = getL10nFilesFromXlf(contents);
|
||||
|
|
|
@ -24,7 +24,7 @@ function update(options) {
|
|||
throw new Error(`${location} doesn't exist.`);
|
||||
}
|
||||
let externalExtensionsLocation = options.externalExtensionsLocation;
|
||||
if (externalExtensionsLocation !== undefined && !fs.existsSync(location)) {
|
||||
if (externalExtensionsLocation !== undefined && !fs.existsSync(externalExtensionsLocation)) {
|
||||
throw new Error(`${externalExtensionsLocation} doesn't exist.`);
|
||||
}
|
||||
let locExtFolder = idOrPath;
|
||||
|
|
Loading…
Reference in New Issue