Skip to content

Commit 5e7a8d9

Browse files
Ensure external extensions are in the extensions project (microsoft#178285)
1 parent 1e63f01 commit 5e7a8d9

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

build/lib/i18n.js

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/lib/i18n.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,9 +843,12 @@ export function prepareI18nPackFiles(resultingTranslationPaths: TranslationPath[
843843
const extensionsPacks: Record<string, I18nPack> = {};
844844
const errors: any[] = [];
845845
return through(function (this: ThroughStream, xlf: File) {
846-
const project = path.basename(path.dirname(path.dirname(xlf.relative)));
846+
let project = path.basename(path.dirname(path.dirname(xlf.relative)));
847847
// strip `-new` since vscode-extensions-loc uses the `-new` suffix to indicate that it's from the new loc pipeline
848848
const resource = path.basename(path.basename(xlf.relative, '.xlf'), '-new');
849+
if (EXTERNAL_EXTENSIONS.find(e => e === resource)) {
850+
project = extensionsProject;
851+
}
849852
const contents = xlf.contents.toString();
850853
log(`Found ${project}: ${resource}`);
851854
const parsePromise = getL10nFilesFromXlf(contents);

build/npm/update-localization-extension.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function update(options) {
2424
throw new Error(`${location} doesn't exist.`);
2525
}
2626
let externalExtensionsLocation = options.externalExtensionsLocation;
27-
if (externalExtensionsLocation !== undefined && !fs.existsSync(location)) {
27+
if (externalExtensionsLocation !== undefined && !fs.existsSync(externalExtensionsLocation)) {
2828
throw new Error(`${externalExtensionsLocation} doesn't exist.`);
2929
}
3030
let locExtFolder = idOrPath;

0 commit comments

Comments
 (0)