stupid translation fix

This commit is contained in:
Will Li 2025-07-29 20:28:46 -07:00
parent e2b13a6518
commit 9923b7c20b
2 changed files with 6 additions and 6 deletions

View file

@ -246,7 +246,7 @@ describe("read_file tool with maxReadFileLine setting", () => {
expect(result).toContain(`<list_code_definition_names>`)
// Verify XML structure
expect(result).toContain("<notice>tools.readFile.showingOnlyLines</notice>")
expect(result).toContain("<notice>tools:readFile.showingOnlyLines</notice>")
expect(result).toContain("<list_code_definition_names>")
expect(result).toContain(sourceCodeDef.trim())
expect(result).toContain("</list_code_definition_names>")
@ -272,7 +272,7 @@ describe("read_file tool with maxReadFileLine setting", () => {
expect(result).toContain(`<file><path>${testFilePath}</path>`)
expect(result).toContain(`<content lines="1-3">`)
expect(result).toContain(`<list_code_definition_names>`)
expect(result).toContain("<notice>tools.readFile.showingOnlyLines</notice>")
expect(result).toContain("<notice>tools:readFile.showingOnlyLines</notice>")
})
})
@ -568,7 +568,7 @@ describe("read_file tool XML output structure", () => {
// Verify the result contains the inline instructions
expect(result).toContain("<notice>")
expect(result).toContain("File exceeds available context space")
expect(result).toContain("tools.readFile.contextLimitInstructions</notice>")
expect(result).toContain("tools:readFile.contextLimitInstructions</notice>")
})
it("should not show any special notice when file fits in context", async () => {

View file

@ -488,7 +488,7 @@ export async function readFileTool(
try {
const defResult = await parseSourceCodeDefinitionsForFile(fullPath, cline.rooIgnoreController)
if (defResult) {
let xmlInfo = `<notice>${t("tools.readFile.showingOnlyLines", { shown: effectiveMaxReadFileLine, total: totalLines })}</notice>\n`
let xmlInfo = `<notice>${t("tools:readFile.showingOnlyLines", { shown: effectiveMaxReadFileLine, total: totalLines })}</notice>\n`
updateFileResult(relPath, {
xmlContent: `<file><path>${relPath}</path>\n<list_code_definition_names>${defResult}</list_code_definition_names>\n${xmlInfo}</file>`,
})
@ -520,10 +520,10 @@ export async function readFileTool(
// Add appropriate notice based on whether this was a preemptive limit or user setting
if (validationNotice) {
// When shouldLimit is true, always provide inline instructions
const instructions = t("tools.readFile.contextLimitInstructions", { path: relPath })
const instructions = t("tools:readFile.contextLimitInstructions", { path: relPath })
xmlInfo += `<notice>${validationNotice}\n\n${instructions}</notice>\n`
} else {
xmlInfo += `<notice>${t("tools.readFile.showingOnlyLines", { shown: effectiveMaxReadFileLine, total: totalLines })}</notice>\n`
xmlInfo += `<notice>${t("tools:readFile.showingOnlyLines", { shown: effectiveMaxReadFileLine, total: totalLines })}</notice>\n`
}
updateFileResult(relPath, {