mirror of
https://github.com/Pandipipas/scoreko-electron-dev.git
synced 2026-06-06 05:32:06 +00:00
Translate Spanish text to English across docs and code
This commit is contained in:
@@ -56,7 +56,7 @@ export function parseEnvIntInRange(name: string, fallback: number, min: number,
|
||||
|
||||
const parsedValue = Number.parseInt(rawValue, 10);
|
||||
if (!Number.isFinite(parsedValue) || parsedValue < min || parsedValue > max) {
|
||||
throw new Error(`La variable ${name} debe ser un entero entre ${min} y ${max}. Valor recibido: '${rawValue}'.`);
|
||||
throw new Error(`The ${name} variable must be an integer between ${min} and ${max}. Received value: '${rawValue}'.`);
|
||||
}
|
||||
|
||||
return parsedValue;
|
||||
@@ -68,7 +68,7 @@ export function parseEnvPort(name: string, fallback: string): string {
|
||||
|
||||
if (!Number.isFinite(parsedValue) || parsedValue < MIN_TCP_PORT || parsedValue > MAX_TCP_PORT) {
|
||||
throw new Error(
|
||||
`La variable ${name} debe ser un puerto TCP válido (${MIN_TCP_PORT}-${MAX_TCP_PORT}). Valor recibido: '${rawValue}'.`,
|
||||
`The ${name} variable must be a valid TCP port (${MIN_TCP_PORT}-${MAX_TCP_PORT}). Received value: '${rawValue}'.`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -146,9 +146,9 @@ process.on("exit", () => {
|
||||
});
|
||||
|
||||
process.on("uncaughtException", (error) => {
|
||||
showFatalError("Error inesperado en el proceso principal de Electron.", error);
|
||||
showFatalError("Unexpected error in Electron main process.", error);
|
||||
});
|
||||
|
||||
process.on("unhandledRejection", (reason) => {
|
||||
showFatalError("Promesa no controlada en el proceso principal de Electron.", reason);
|
||||
showFatalError("Unhandled promise in Electron main process.", reason);
|
||||
});
|
||||
|
||||
@@ -64,7 +64,7 @@ export function createNodecgProcessManager({
|
||||
const isPortAvailable = await resolvedDeps.probePortAvailable(portAsNumber);
|
||||
if (!isPortAvailable) {
|
||||
throw new Error(
|
||||
`El puerto ${appConfig.nodecgPort} ya está en uso. Cierra el proceso que lo ocupa o configura NODECG_PORT antes de iniciar.`,
|
||||
`Port ${appConfig.nodecgPort} is already in use. Stop the process using it or set NODECG_PORT before starting.`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -110,16 +110,16 @@ export function createNodecgProcessManager({
|
||||
while (Date.now() - startTime < appConfig.startupTimeoutMs) {
|
||||
if (!nodecgProcess) {
|
||||
const exitDetails = lastExit
|
||||
? `Última salida registrada: code=${lastExit.code ?? "null"}, signal=${lastExit.signal ?? "none"}.`
|
||||
: "No se registró código de salida del proceso NodeCG.";
|
||||
const stderrDetails = lastStderrLine ? `Último stderr: ${lastStderrLine}` : "Sin salida stderr capturada.";
|
||||
? `Last recorded exit: code=${lastExit.code ?? "null"}, signal=${lastExit.signal ?? "none"}.`
|
||||
: "No NodeCG process exit code was recorded.";
|
||||
const stderrDetails = lastStderrLine ? `Last stderr: ${lastStderrLine}` : "No stderr output captured.";
|
||||
throw new Error(
|
||||
[
|
||||
"NodeCG terminó antes de estar listo.",
|
||||
"NodeCG exited before becoming ready.",
|
||||
exitDetails,
|
||||
stderrDetails,
|
||||
`Ruta NodeCG: ${nodecgRootPath}`,
|
||||
"Revisa que lib/nodecg tenga dependencias instaladas y que el bundle exista.",
|
||||
`NodeCG path: ${nodecgRootPath}`,
|
||||
"Check that lib/nodecg dependencies are installed and the bundle exists.",
|
||||
].join("\n"),
|
||||
);
|
||||
}
|
||||
@@ -136,7 +136,7 @@ export function createNodecgProcessManager({
|
||||
await sleep(500, resolvedDeps.setTimer);
|
||||
}
|
||||
|
||||
throw new Error(`Timeout esperando NodeCG en ${nodecgBaseUrl} (${appConfig.startupTimeoutMs}ms).`);
|
||||
throw new Error(`Timeout waiting for NodeCG at ${nodecgBaseUrl} (${appConfig.startupTimeoutMs}ms).`);
|
||||
};
|
||||
|
||||
const stopNodecgProcessGracefully = (): Promise<void> => {
|
||||
@@ -223,23 +223,23 @@ function validateNodecgInstall(
|
||||
const bundlePath = path.join(nodecgRootPath, "bundles", bundleName);
|
||||
|
||||
if (!pathExists(nodecgRootPath)) {
|
||||
throw new Error(`No existe la carpeta NodeCG: ${nodecgRootPath}`);
|
||||
throw new Error(`NodeCG folder does not exist: ${nodecgRootPath}`);
|
||||
}
|
||||
|
||||
if (!hasReadWriteAccessToPath(nodecgRootPath)) {
|
||||
throw new Error(`Sin permisos de lectura/escritura sobre NodeCG: ${nodecgRootPath}`);
|
||||
throw new Error(`No read/write permissions on NodeCG: ${nodecgRootPath}`);
|
||||
}
|
||||
|
||||
if (!pathExists(indexPath)) {
|
||||
throw new Error(`No se encontró ${indexPath}. Copia una instalación completa de NodeCG en lib/nodecg.`);
|
||||
throw new Error(`${indexPath} was not found. Copy a full NodeCG installation into lib/nodecg.`);
|
||||
}
|
||||
|
||||
if (!pathExists(nodecgBootstrapPath)) {
|
||||
throw new Error(
|
||||
[
|
||||
"NodeCG está presente pero faltan dependencias internas.",
|
||||
`No existe: ${nodecgBootstrapPath}`,
|
||||
"Solución: entra a lib/nodecg e instala dependencias:",
|
||||
"NodeCG is present but internal dependencies are missing.",
|
||||
`Not found: ${nodecgBootstrapPath}`,
|
||||
"Solution: enter lib/nodecg and install dependencies:",
|
||||
" npm install",
|
||||
].join("\n"),
|
||||
);
|
||||
@@ -248,9 +248,9 @@ function validateNodecgInstall(
|
||||
if (!pathExists(bundlePath)) {
|
||||
throw new Error(
|
||||
[
|
||||
`No se encontró el bundle '${bundleName}'.`,
|
||||
`Ruta esperada: ${bundlePath}`,
|
||||
"Copia/clona tu bundle dentro de lib/nodecg/bundles antes de ejecutar Electron.",
|
||||
`Bundle '${bundleName}' was not found.`,
|
||||
`Expected path: ${bundlePath}`,
|
||||
"Copy/clone your bundle inside lib/nodecg/bundles before running Electron.",
|
||||
].join("\n"),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user