diff --git a/src/core/prompts/responses.ts b/src/core/prompts/responses.ts index b4591bc422..a72de0a9ae 100644 --- a/src/core/prompts/responses.ts +++ b/src/core/prompts/responses.ts @@ -16,8 +16,8 @@ export const formatResponse = { toolError: (error?: string, toolName?: string) => { const title = toolName - ? t("tools:errors.toolCallError", { toolName, defaultValue: `Tool Call Error: ${toolName}` }) - : t("tools:errors.toolExecutionError", { defaultValue: "Tool Execution Error" }) + ? t("tools:errors.toolCallError", { toolName, defaultValue: `Tool call error: ${toolName}` }) + : t("tools:errors.toolExecutionError", { defaultValue: "Tool execution error" }) return `${title}\n\n${error}\n` }, diff --git a/src/core/tools/insertContentTool.ts b/src/core/tools/insertContentTool.ts index 8aa2ba65c0..7935144553 100644 --- a/src/core/tools/insertContentTool.ts +++ b/src/core/tools/insertContentTool.ts @@ -12,6 +12,7 @@ import { fileExistsAtPath } from "../../utils/fs" import { insertGroups } from "../diff/insert-groups" import { DEFAULT_WRITE_DELAY_MS } from "@roo-code/types" import { EXPERIMENT_IDS, experiments } from "../../shared/experiments" +import { t } from "../../i18n" export async function insertContentTool( cline: Task, @@ -90,7 +91,7 @@ export async function insertContentTool( cline.recordToolError("insert_content") const formattedError = `Cannot insert content at line ${lineNumber} into a non-existent file. For new files, 'line' must be 0 (to append) or 1 (to insert at the beginning).` await cline.say("error", formattedError, undefined, undefined, undefined, undefined, { - title: "Invalid Line Number", + title: t("tools:errors.invalidLineNumber"), }) pushToolResult(formattedError) return diff --git a/src/i18n/locales/en/tools.json b/src/i18n/locales/en/tools.json index 61a8af8a9a..61dce5c187 100644 --- a/src/i18n/locales/en/tools.json +++ b/src/i18n/locales/en/tools.json @@ -16,25 +16,27 @@ } }, "errors": { + "toolCallError": "Tool call error: {{toolName}}", + "toolExecutionError": "Tool execution error", "fileNotFound": "File not found", - "parseError": "Parse Error", - "commandTimeout": "Command Timeout", - "permissionDenied": "Permission Denied", - "networkError": "Network Error", - "invalidInput": "Invalid Input", - "operationFailed": "Operation Failed", - "resourceNotFound": "Resource Not Found", - "configurationError": "Configuration Error", - "authenticationFailed": "Authentication Failed", - "invalidLineNumber": "Invalid Line Number", + "parseError": "Parse error", + "commandTimeout": "Command timeout", + "permissionDenied": "Permission denied", + "networkError": "Network error", + "invalidInput": "Invalid input", + "operationFailed": "Operation failed", + "resourceNotFound": "Resource not found", + "configurationError": "Configuration error", + "authenticationFailed": "Authentication failed", + "invalidLineNumber": "Invalid line number", "fileAlreadyExists": "File already exists", - "directoryNotFound": "Directory Not Found", - "invalidPath": "Invalid Path", - "readError": "Read Error", - "writeError": "Write Error", - "syntaxError": "Syntax Error", - "validationError": "Validation Error", - "timeoutError": "Timeout Error", - "connectionError": "Connection Error" + "directoryNotFound": "Directory not found", + "invalidPath": "Invalid path", + "readError": "Read error", + "writeError": "Write error", + "syntaxError": "Syntax error", + "validationError": "Validation error", + "timeoutError": "Timeout error", + "connectionError": "Connection error" } }