feat: l10n support

This commit is contained in:
Levi Yan
2025-04-22 22:32:06 +08:00
parent 05a1edb8fb
commit 5385a9bc84
8 changed files with 70 additions and 47 deletions

View File

@@ -34,7 +34,7 @@ export default class RemoteContainer {
const ssh = new NodeSSH();
vscode.window.withProgress({
location: vscode.ProgressLocation.Notification,
title: "正在容器中安装vscode-serverdevstar插件",
title: vscode.l10n.t("Installing vscode-server and devstar extension in container"),
cancellable: false
}, async (progress) => {
try {
@@ -46,7 +46,7 @@ export default class RemoteContainer {
port: port,
privateKeyPath: this.user.getUserPrivateKeyPath()
});
progress.report({ message: "连接成功,开始安装" });
progress.report({ message: vscode.l10n.t("Connected! Start installation")});
// install vscode-server and devstar extension
const vscodeCommitId = await utils.getVsCodeCommitId()
@@ -67,7 +67,7 @@ export default class RemoteContainer {
`;
await ssh.execCommand(installVscodeServerScript);
console.log("vscode-server and extension installed");
vscode.window.showInformationMessage('安装完成!');
vscode.window.showInformationMessage(vscode.l10n.t('Installation completed!'));
}
await ssh.dispose();