Skip to content

Commit 556facc

Browse files
committed
chore(i18n): sentence case for error titles (tool and generic); align insertContent title
1 parent f0fd41f commit 556facc

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

src/core/prompts/responses.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export const formatResponse = {
1616

1717
toolError: (error?: string, toolName?: string) => {
1818
const title = toolName
19-
? t("tools:errors.toolCallError", { toolName, defaultValue: `Tool Call Error: ${toolName}` })
20-
: t("tools:errors.toolExecutionError", { defaultValue: "Tool Execution Error" })
19+
? t("tools:errors.toolCallError", { toolName, defaultValue: `Tool call error: ${toolName}` })
20+
: t("tools:errors.toolExecutionError", { defaultValue: "Tool execution error" })
2121
return `${title}\n<error>\n${error}\n</error>`
2222
},
2323

src/core/tools/insertContentTool.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { fileExistsAtPath } from "../../utils/fs"
1212
import { insertGroups } from "../diff/insert-groups"
1313
import { DEFAULT_WRITE_DELAY_MS } from "@roo-code/types"
1414
import { EXPERIMENT_IDS, experiments } from "../../shared/experiments"
15+
import { t } from "../../i18n"
1516

1617
export async function insertContentTool(
1718
cline: Task,
@@ -90,7 +91,7 @@ export async function insertContentTool(
9091
cline.recordToolError("insert_content")
9192
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).`
9293
await cline.say("error", formattedError, undefined, undefined, undefined, undefined, {
93-
title: "Invalid Line Number",
94+
title: t("tools:errors.invalidLineNumber"),
9495
})
9596
pushToolResult(formattedError)
9697
return

src/i18n/locales/en/tools.json

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,27 @@
1616
}
1717
},
1818
"errors": {
19+
"toolCallError": "Tool call error: {{toolName}}",
20+
"toolExecutionError": "Tool execution error",
1921
"fileNotFound": "File not found",
20-
"parseError": "Parse Error",
21-
"commandTimeout": "Command Timeout",
22-
"permissionDenied": "Permission Denied",
23-
"networkError": "Network Error",
24-
"invalidInput": "Invalid Input",
25-
"operationFailed": "Operation Failed",
26-
"resourceNotFound": "Resource Not Found",
27-
"configurationError": "Configuration Error",
28-
"authenticationFailed": "Authentication Failed",
29-
"invalidLineNumber": "Invalid Line Number",
22+
"parseError": "Parse error",
23+
"commandTimeout": "Command timeout",
24+
"permissionDenied": "Permission denied",
25+
"networkError": "Network error",
26+
"invalidInput": "Invalid input",
27+
"operationFailed": "Operation failed",
28+
"resourceNotFound": "Resource not found",
29+
"configurationError": "Configuration error",
30+
"authenticationFailed": "Authentication failed",
31+
"invalidLineNumber": "Invalid line number",
3032
"fileAlreadyExists": "File already exists",
31-
"directoryNotFound": "Directory Not Found",
32-
"invalidPath": "Invalid Path",
33-
"readError": "Read Error",
34-
"writeError": "Write Error",
35-
"syntaxError": "Syntax Error",
36-
"validationError": "Validation Error",
37-
"timeoutError": "Timeout Error",
38-
"connectionError": "Connection Error"
33+
"directoryNotFound": "Directory not found",
34+
"invalidPath": "Invalid path",
35+
"readError": "Read error",
36+
"writeError": "Write error",
37+
"syntaxError": "Syntax error",
38+
"validationError": "Validation error",
39+
"timeoutError": "Timeout error",
40+
"connectionError": "Connection error"
3941
}
4042
}

0 commit comments

Comments
 (0)