Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix(cli): R6 — i18n para strings literais em logs.mjs e tunnel.mjs

diegosouzapw2faf3608b2ed
diff --git a/bin/cli/commands/logs.mjs b/bin/cli/commands/logs.mjs
index cfbe930b31..6f0ecb1e7c 100644
--- a/bin/cli/commands/logs.mjs
+++ b/bin/cli/commands/logs.mjs
@@ -4,19 +4,19 @@ import { t } from "../i18n.mjs";
export function registerLogs(program) {
program
.command("logs")
- .description("Stream request logs")
- .option("--follow", "Stream logs in real-time")
- .option("--filter <level>", "Filter by level (error,warn,info) — comma-separated")
- .option("--lines <n>", "Number of lines to fetch", "100")
- .option("--timeout <ms>", "Connection timeout in ms", "30000")
- .option("--base-url <url>", "OmniRoute API base URL", "http://localhost:20128")
- .option("--request-id <id>", "Filter by request ID")
- .option("--api-key <key>", "Filter by API key")
- .option("--combo <name>", "Filter by combo name")
- .option("--status <code>", "Filter by HTTP status code")
- .option("--duration-min <ms>", "Min request duration in ms", parseInt)
- .option("--duration-max <ms>", "Max request duration in ms", parseInt)
- .option("--export <path>", "Save logs to file (json/jsonl/csv)")
+ .description(t("logs.description"))
+ .option("--follow", t("logs.follow"))
+ .option("--filter <level>", t("logs.filter"))
+ .option("--lines <n>", t("logs.lines"), "100")
+ .option("--timeout <ms>", t("logs.timeout"), "30000")
+ .option("--base-url <url>", t("logs.baseUrl"), "http://localhost:20128")
+ .option("--request-id <id>", t("logs.requestId"))
+ .option("--api-key <key>", t("logs.apiKey"))
+ .option("--combo <name>", t("logs.combo"))
+ .option("--status <code>", t("logs.status"))
+ .option("--duration-min <ms>", t("logs.durationMin"), parseInt)
+ .option("--duration-max <ms>", t("logs.durationMax"), parseInt)
+ .option("--export <path>", t("logs.export"))
.action(async (opts, cmd) => {
const globalOpts = cmd.optsWithGlobals();
const exitCode = await runLogsCommand({ ...opts, output: globalOpts.output });
diff --git a/bin/cli/commands/tunnel.mjs b/bin/cli/commands/tunnel.mjs
index 98093442a8..aa3e062151 100644
--- a/bin/cli/commands/tunnel.mjs
+++ b/bin/cli/commands/tunnel.mjs
@@ -9,8 +9,8 @@ export function registerTunnel(program) {
tunnel
.command("list")
- .description("List active tunnels")
- .option("--json", "Output as JSON")
+ .description(t("tunnel.listDescription"))
+ .option("--json", t("common.jsonOpt"))
.action(async (opts, cmd) => {
const globalOpts = cmd.parent.optsWithGlobals();
const exitCode = await runTunnelListCommand({ ...opts, output: globalOpts.output });
@@ -19,7 +19,7 @@ export function registerTunnel(program) {
tunnel
.command("create [type]")
- .description("Create a tunnel")
+ .description(t("tunnel.createDescription"))
.addArgument(
new Argument("[type]", "Tunnel type").choices(VALID_TUNNEL_TYPES).default("cloudflare")
)
diff --git a/bin/cli/locales/en.json b/bin/cli/locales/en.json
index 5ba762584b..f9f7bf4a87 100644
--- a/bin/cli/locales/en.json
+++ b/bin/cli/locales/en.json
@@ -433,6 +433,8 @@
},
"tunnel": {
"title": "Tunnels",
+ "listDescription": "List active tunnels",
+ "createDescription": "Create a tunnel",
"created": "Tunnel created: {url}",
"stopped": "Tunnel stopped.",
"confirmStop": "Stop tunnel {id}?",
@@ -1161,6 +1163,11 @@
},
"logs": {
"description": "Stream or export request logs",
+ "follow": "Stream logs in real-time",
+ "filter": "Filter by level (error,warn,info) — comma-separated",
+ "lines": "Number of lines to fetch",
+ "timeout": "Connection timeout in ms",
+ "baseUrl": "OmniRoute API base URL",
"requestId": "Filter by request ID",
"apiKey": "Filter by API key",
"combo": "Filter by combo name",
diff --git a/bin/cli/locales/pt-BR.json b/bin/cli/locales/pt-BR.json
index a157f112f2..e26db7969d 100644
--- a/bin/cli/locales/pt-BR.json
+++ b/bin/cli/locales/pt-BR.json
@@ -433,6 +433,8 @@
},
"tunnel": {
"title": "Túneis",
+ "listDescription": "Listar túneis ativos",
+ "createDescription": "Criar um túnel",
"created": "Túnel criado: {url}",
"stopped": "Túnel parado.",
"confirmStop": "Parar túnel {id}?",
@@ -1161,6 +1163,11 @@
},
"logs": {
"description": "Streaming ou exportação de logs de request",
+ "follow": "Transmitir logs em tempo real",
+ "filter": "Filtrar por nível (error,warn,info) — separados por vírgula",
+ "lines": "Número de linhas a buscar",
+ "timeout": "Timeout de conexão em ms",
+ "baseUrl": "URL base da API do OmniRoute",
"requestId": "Filtrar por ID do request",
"apiKey": "Filtrar por chave de API",
"combo": "Filtrar por nome do combo",