feat: l10n support
This commit is contained in:
@@ -27,7 +27,7 @@ export default class DSHome {
|
||||
async toggle(devstarHomePageUrl: string = this.devstarHomePageUrl) {
|
||||
const panel = vscode.window.createWebviewPanel(
|
||||
'homeWebview',
|
||||
'Home',
|
||||
vscode.l10n.t('Home'),
|
||||
vscode.ViewColumn.One,
|
||||
{
|
||||
enableScripts: true,
|
||||
|
@@ -34,7 +34,7 @@ export default class RemoteContainer {
|
||||
const ssh = new NodeSSH();
|
||||
vscode.window.withProgress({
|
||||
location: vscode.ProgressLocation.Notification,
|
||||
title: "正在容器中安装vscode-server及devstar插件",
|
||||
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();
|
||||
|
@@ -58,7 +58,7 @@ export default class User {
|
||||
}
|
||||
}
|
||||
|
||||
vscode.window.showInformationMessage('用户已登录!')
|
||||
vscode.window.showInformationMessage(vscode.l10n.t('User login successfully!'))
|
||||
return 'ok'
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
@@ -70,7 +70,7 @@ export default class User {
|
||||
public logout() {
|
||||
this.setUserTokenToLocal("")
|
||||
this.setUsernameToLocal("")
|
||||
vscode.window.showInformationMessage('用户已登出!')
|
||||
vscode.window.showInformationMessage(vscode.l10n.t("User has logged out!"))
|
||||
}
|
||||
|
||||
public isLogged() {
|
||||
|
@@ -24,19 +24,19 @@ export default class QuickAccessTreeProvider {
|
||||
|
||||
return [
|
||||
new QuickItem(
|
||||
'DevStar Home',
|
||||
vscode.l10n.t('DevStar Home'),
|
||||
undefined,
|
||||
undefined,
|
||||
vscode.TreeItemCollapsibleState.Expanded,
|
||||
[new QuickItem('Open', 'devstar.showHome')]
|
||||
[new QuickItem(vscode.l10n.t('Open'), 'devstar.showHome')]
|
||||
),
|
||||
new QuickItem(
|
||||
'Miscellaneous',
|
||||
vscode.l10n.t('Miscellaneous'),
|
||||
undefined,
|
||||
undefined,
|
||||
vscode.TreeItemCollapsibleState.Expanded,
|
||||
// [new QuickItem('Connect Remote Container', 'devstar.connectRemoteContainer')]
|
||||
[new QuickItem('[Temp]Logout', 'devstar.logout')]
|
||||
[new QuickItem(vscode.l10n.t('Clean'), 'devstar.clean')]
|
||||
),
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user