mirror of
https://github.com/MCSManager/MCSManager.git
synced 2025-04-06 17:10:29 +08:00
chore: i18n code
This commit is contained in:
parent
78dcc1de4f
commit
3822a7bfb4
@ -16,7 +16,7 @@ export default class GeneralKillCommand extends InstanceCommand {
|
||||
return instance.failure(new Error($t("TXT_CODE_general_stop.notRunning")));
|
||||
}
|
||||
if (instance.startTimestamp + 6 * 1000 > Date.now()) {
|
||||
return instance.failure(new Error($t("程序必须运行超过6秒才能被强制停止!")));
|
||||
return instance.failure(new Error($t("TXT_CODE_6259357c")));
|
||||
}
|
||||
|
||||
const task = instance?.asynchronousTask;
|
||||
|
@ -50,7 +50,7 @@ export class GoPtyProcessAdapter extends EventEmitter implements IInstanceProces
|
||||
private initNamedPipe() {
|
||||
if (!fs.existsSync(this.pipeName)) {
|
||||
throw new Error(
|
||||
$t("程序启动失败,输入输出流不可读:{{pipeName}}", {
|
||||
$t("TXT_CODE_9d1d244f", {
|
||||
pipeName: this.pipeName
|
||||
})
|
||||
);
|
||||
|
@ -229,7 +229,7 @@ export default class Instance extends EventEmitter {
|
||||
|
||||
setLock(bool: boolean) {
|
||||
if (this.lock === true && bool === true) {
|
||||
throw new Error($t("实例有其他任务正在进行中,无法进行此操作!"));
|
||||
throw new Error($t("TXT_CODE_ca030197"));
|
||||
}
|
||||
this.lock = bool;
|
||||
}
|
||||
@ -306,7 +306,7 @@ export default class Instance extends EventEmitter {
|
||||
const currentTimestamp = new Date().getTime();
|
||||
const startThreshold = 2 * 1000;
|
||||
if (currentTimestamp - this.startTimestamp < startThreshold) {
|
||||
this.println("ERROR", $t("实例进程启动失败,请检查启动命令和运行环境等配置!"));
|
||||
this.println("ERROR", $t("TXT_CODE_aae2918f"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1951,5 +1951,9 @@
|
||||
"TXT_CODE_a6424dcc": "The working directory or startup command cannot be empty",
|
||||
"TXT_CODE_ffa884f9": "Warning: The working directory is not mounted to the container, and the container will not be able to access files in the instance's working directory",
|
||||
"TXT_CODE_6c232c9c": "Used to mount additional folders on the host into the container, supports two variable strings: {mcsm_workspace} (working directory) and {mcsm_instance_id} (instance ID).",
|
||||
"TXT_CODE_fa487a47": "Provide the following variable strings: {mcsm_instance_id} = instance ID, {mcsm_workspace} = instance installation directory"
|
||||
"TXT_CODE_fa487a47": "Provide the following variable strings: {mcsm_instance_id} = instance ID, {mcsm_workspace} = instance installation directory",
|
||||
"TXT_CODE_6259357c": "The program must run for more than 6 seconds before it can be forced to stop!",
|
||||
"TXT_CODE_9d1d244f": "Program startup failed, input and output streams are unreadable: {{pipeName}}",
|
||||
"TXT_CODE_ca030197": "The instance has other tasks in progress, and this operation cannot be performed!",
|
||||
"TXT_CODE_aae2918f": "The instance process failed to start, please check the startup command and operating environment configuration!"
|
||||
}
|
||||
|
@ -1951,5 +1951,9 @@
|
||||
"TXT_CODE_a6424dcc": "工作目录和启动命令不可为空",
|
||||
"TXT_CODE_ffa884f9": "警告:工作目录没有挂载到容器中,容器将无法访问到实例工作目录中的文件",
|
||||
"TXT_CODE_6c232c9c": "用于挂载主机上额外的文件夹到容器中,支持 {mcsm_workspace}(工作目录)和 {mcsm_instance_id}(实例ID)两个变量字符串。",
|
||||
"TXT_CODE_fa487a47": "提供以下变量字符串:{mcsm_instance_id} = 实例ID,{mcsm_workspace} = 实例安装目录"
|
||||
"TXT_CODE_fa487a47": "提供以下变量字符串:{mcsm_instance_id} = 实例ID,{mcsm_workspace} = 实例安装目录",
|
||||
"TXT_CODE_6259357c": "程序必须运行超过6秒才能被强制停止!",
|
||||
"TXT_CODE_9d1d244f": "程序启动失败,输入输出流不可读:{{pipeName}}",
|
||||
"TXT_CODE_ca030197": "实例有其他任务正在进行中,无法进行此操作!",
|
||||
"TXT_CODE_aae2918f": "实例进程启动失败,请检查启动命令和运行环境等配置!"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user