Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,25 @@ if (! $?)
Write-Host "`nBuild failed!" -ForegroundColor $errorColor
exit 1
}
Write-Host "Creating Localization Files" -ForegroundColor $successColor
npx @vscode/l10n-dev export --outDir ./l10n ./src
popd

#################### Compile runtime extension ####################
pushd vscode-dotnet-runtime-extension

if (Test-Path node_modules) { rm -r -force node_modules }
npm ci
npm run compile

if (! $?)
{
Write-Host "`nBuild failed!" -ForegroundColor $errorColor
exit 1
}

Write-Host "Creating Localization Files" -ForegroundColor $successColor
npx @vscode/l10n-dev export --outDir ./l10n ./src

popd

#################### Compile SDK extension ####################
Expand Down
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pushd vscode-dotnet-runtime-library
rm -rf node_modules
npm ci
npm run compile
npx @vscode/l10n-dev export --outDir ./l10n ./src

if [ $? -ne 0 ];
then
Expand All @@ -41,6 +42,7 @@ pushd vscode-dotnet-runtime-extension
rm -rf node_modules
npm ci
npm run compile
npx @vscode/l10n-dev export --outDir ./l10n ./src

if [ $? -ne 0 ];
then
Expand Down
2 changes: 2 additions & 0 deletions pipeline-templates/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
artifactName: '${{ parameters.pool.os }} SDK logs'
steps:
- template: install-node.yaml
- bash: |
npm install -g @vscode/l10n-dev
- ${{ if eq(parameters.pool.os, 'windows') }}:
- script: build.cmd
displayName: 💻 Build Windows
Expand Down
2 changes: 1 addition & 1 deletion sample/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2207,7 +2207,7 @@ uuid@^8.3.0:
fsevents "^2.3.3"

"vscode-dotnet-runtime@file:../vscode-dotnet-runtime-extension":
version "2.2.3"
version "2.2.4"
resolved "file:../vscode-dotnet-runtime-extension"
dependencies:
"@types/chai-as-promised" "^7.1.8"
Expand Down
1 change: 1 addition & 0 deletions vscode-dotnet-runtime-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"engines": {
"vscode": "^1.81.1"
},
"l10n": "./l10n",
"categories": [
"Other"
],
Expand Down
3 changes: 3 additions & 0 deletions vscode-dotnet-runtime-extension/package.nls.ja.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ms-dotnettools.vscode-dotnet-runtime.downloadRequest": "ダウンロードを要求された"
}
3 changes: 3 additions & 0 deletions vscode-dotnet-runtime-extension/package.nls.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ms-dotnettools.vscode-dotnet-runtime.downloadRequest": "requested to download"
}
3 changes: 3 additions & 0 deletions vscode-dotnet-runtime-library/l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"requested to download": "requested to download"
}
1 change: 1 addition & 0 deletions vscode-dotnet-runtime-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"engines": {
"vscode": "^1.74.0"
},
"l10n": "./l10n",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions vscode-dotnet-runtime-library/package.nls.ja.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"ms-dotnettools.vscode-dotnet-runtime.downloadRequest": "ダウンロードを要求された",
"ms-dotnettools.vscode-dotnet-runtime.installedExtChange": "拡張機能に変更が検出されました。新しい拡張機能用に .NET をインストールします。"
}
4 changes: 4 additions & 0 deletions vscode-dotnet-runtime-library/package.nls.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"ms-dotnettools.vscode-dotnet-runtime.downloadRequest": "requested to download",
"ms-dotnettools.vscode-dotnet-runtime.installedExtChange": "A change was detected in the extensions. Installing .NET for new extensions."
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Licensed to the .NET Foundation under one or more agreements.
* The .NET Foundation licenses this file to you under the MIT license.
*--------------------------------------------------------------------------------------------*/

import { IEventStream } from "../EventStream/EventStream";
import { DotnetVSCodeExtensionChange, DotnetVSCodeExtensionFound, DotnetVSCodeExtensionHasInstallRequest } from "../EventStream/EventStreamEvents";
import { IDotnetAcquireContext } from "../IDotnetAcquireContext";
Expand All @@ -19,7 +18,7 @@ export class JsonInstaller extends IJsonInstaller
// If a new extension is installed, we want to install .NET preemptively for it if specified
vscodeAccessor.registerOnExtensionChange(() =>
{
this.eventStream.post(new DotnetVSCodeExtensionChange(`A change was detected in the extensions. Installing .NET for new extensions.`));
this.eventStream.post(new DotnetVSCodeExtensionChange(vscodeAccessor.localize(`A change was detected in the extensions. Installing .NET for new extensions.`)));
this.executeJSONRequests().catch( () => {});
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class OutputChannelObserver implements IEventStreamObserver {

this.inProgressDownloads.push(acquisitionStarted.install.installId);

this.outputChannel.append(`${acquisitionStarted.requestingExtensionId} requested to download the ${
this.outputChannel.append(`${acquisitionStarted.requestingExtensionId} ${vscode.l10n.t('requested to download')} the ${
acquisitionStarted.install.installMode === 'sdk' ? '.NET SDK' :
acquisitionStarted.install.installMode === 'runtime' ? '.NET Runtime' :
'.NET ASP.NET Runtime'
Expand Down
2 changes: 2 additions & 0 deletions vscode-dotnet-runtime-library/src/IVSCodeExtensionContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ export abstract class IVSCodeExtensionContext
abstract getExtensions() : readonly any[];

abstract executeCommand(command : string, ...args: any[]) : Thenable<any>;

abstract localize(message: string, ...args: Array<string | number>): string
}
5 changes: 5 additions & 0 deletions vscode-dotnet-runtime-library/src/VSCodeExtensionContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@ export class VSCodeExtensionContext extends IVSCodeExtensionContext
{
return vscode.commands.executeCommand(command, ...args);
}

public localize(message: string, ...args: Array<string | number>): string
{
return vscode.l10n.t(message, ...args);
}
}
4 changes: 4 additions & 0 deletions vscode-dotnet-runtime-library/src/test/mocks/MockObjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ export class MockVSCodeExtensionContext extends IVSCodeExtensionContext
setVSCodeEnvironmentVariable(variable: string, value: string): void {
// Do nothing.
}

localize(message: string, ...args: Array<string | number>): string {
return message;
}
}

export class MockVSCodeEnvironment extends IVSCodeEnvironment
Expand Down
Loading