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 <roo-code@z.ewheeler.org>

* Update 001-general-rules.md

---------

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
This commit is contained in:
KJ7LNW 2025-06-25 17:24:30 -07:00 committed by GitHub
parent 889e92518b
commit d1ab71c60e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 `<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
5. Create appropriate translations for all other supported languages utilizing the `search_files` result using `<apply_diff>` 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")