Skip to content

Commit d1ab71c

Browse files
KJ7LNWEric Wheelerdaniel-lxs
authored
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 <[email protected]> * Update 001-general-rules.md --------- Signed-off-by: Eric Wheeler <[email protected]> Co-authored-by: Eric Wheeler <[email protected]> Co-authored-by: Daniel <[email protected]>
1 parent 889e925 commit d1ab71c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.roo/rules-translate/001-general-rules.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@
6464
1. Identify where the string appears in the UI/codebase
6565
2. Understand the context and purpose of the string
6666
3. Update English translation first
67-
4. Create appropriate translations for all other supported languages
68-
5. Validate your changes with the missing translations script
67+
4. Use the `<search_files>` tool to find JSON keys that are near new keys in English translations but do not yet exist in the other language files for `<apply_diff>` SEARCH context
68+
5. Create appropriate translations for all other supported languages utilizing the `search_files` result using `<apply_diff>` without reading every file.
69+
6. Do not output the translated text into the chat, just modify the files.
70+
7. Validate your changes with the missing translations script
6971
- Flag or comment if an English source string is incomplete ("please see this...") to avoid truncated or unclear translations
7072
- For UI elements, distinguish between:
7173
- Button labels: Use short imperative commands ("Save", "Cancel")

0 commit comments

Comments
 (0)