From d1ab71c60ed19f7fe461d16b3f75a9d48708fde0 Mon Sep 17 00:00:00 2001 From: KJ7LNW <93454819+KJ7LNW@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:24:30 -0700 Subject: [PATCH] Improve translation workflow to avoid unnecessary file reads (#5126) * dotroo: improve translation workflow to reduce unnecessary file reads Update translation workflow guidelines to use search_files instead of reading each translation file individually. This approach is more efficient and reduces context token usage while maintaining translation accuracy. The improved workflow: - Uses search_files to find JSON structure in translation files - Creates proper context for apply_diff without reading every file - Only reads specific files when their structure differs - Validates changes with the missing translations script Fixes: #5125 Signed-off-by: Eric Wheeler * Update 001-general-rules.md --------- Signed-off-by: Eric Wheeler Co-authored-by: Eric Wheeler Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com> --- .roo/rules-translate/001-general-rules.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.roo/rules-translate/001-general-rules.md b/.roo/rules-translate/001-general-rules.md index 2b747f77b9..e27b9793e2 100644 --- a/.roo/rules-translate/001-general-rules.md +++ b/.roo/rules-translate/001-general-rules.md @@ -64,8 +64,10 @@ 1. Identify where the string appears in the UI/codebase 2. Understand the context and purpose of the string 3. Update English translation first - 4. Create appropriate translations for all other supported languages - 5. Validate your changes with the missing translations script + 4. Use the `` tool to find JSON keys that are near new keys in English translations but do not yet exist in the other language files for `` SEARCH context + 5. Create appropriate translations for all other supported languages utilizing the `search_files` result using `` without reading every file. + 6. Do not output the translated text into the chat, just modify the files. + 7. Validate your changes with the missing translations script - Flag or comment if an English source string is incomplete ("please see this...") to avoid truncated or unclear translations - For UI elements, distinguish between: - Button labels: Use short imperative commands ("Save", "Cancel")