Uh oh!
There was an error while loading. Please reload this page.
Add human/ai source attribution comments to Spanish locale - #514
Conversation
Mark 99 translation keys added since commit c450ed3 as // ai, and all 947 pre-existing keys as // human. https://claude.ai/code/session_013m5GXxcDiJ1XMt2XbF5bj5
📝 WalkthroughWalkthroughThis change only edits trailing inline comment annotations (e.g., Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
locale/es.js (2)
3-1218:⚠️ Potential issue | 🟠 MajorToo many inline provenance comments in a JS source file
This change adds attribution comments to nearly every entry, which makes the file noisy and hard to maintain. Please move provenance metadata to a separate artifact (e.g., translation manifest) or reduce inline markers to exceptions only.
As per coding guidelines, "Comments should be infrequent" and "Comments should be genuinely noteworthy".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@locale/es.js` around lines 3 - 1218, The file contains prolific inline provenance comments (e.g., the "// human" and "// ai" tags after string entries like CATEGORY_SCENE, choose_a_color, rotate_to_object, play_sound, etc.); remove these per-entry inline markers and consolidate provenance into a separate translation manifest or metadata file (or a single header comment) that maps keys (CATEGORY_SCENE, choose_a_color, rotate_to_object, play_sound, etc.) to their provenance, leaving only necessary exceptional comments inline; update any tooling or loaders to read the new manifest so translations remain traceable.
1-1219:⚠️ Potential issue | 🟡 MinorPrettier pipeline warning is unresolved
CI reports
Prettierwarning for this file. Please run formatter onlocale/es.jsand commit the normalized output before merge.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@locale/es.js` around lines 1 - 1219, The file export (export default { ... }) has formatting differences flagged by Prettier; run the project's Prettier formatter (or npm/yarn script like format) against locale/es.js to normalize spacing, line breaks and trailing commas, verify changes, stage the updated locale/es.js, and commit the formatted file so the CI Prettier warning is resolved.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@locale/es.js`:
- Line 154: The Spanish locale file contains English user-facing strings: update
the locale keys such as rotate_to_object and the entries currently set to
"rotate %1 %2 %3 in %4 seconds\n%5 reverse? %6 loop? %7 %8" and the entries for
"towards" and "same rotation as" to proper Spanish translations while preserving
all placeholder tokens (%1…%8), punctuation and newline sequences exactly;
locate the keys by their identifiers (rotate_to_object, and the two entries
currently with values "towards" and "same rotation as") and replace the English
text with validated Spanish equivalents.
- Around line 291-293: The source-attribution comments for some locale entries
are mismatched (e.g., the create_instrument and instrument entries); for each
affected entry, pick a single authoritative marker ("// human" or "// ai") and
make both the key line and the value line use that same comment; locate the
entries by their keys (create_instrument, instrument and the other flagged
locale keys) and update the inline comment on whichever line is incorrect so the
pair is consistent.
- Line 1098: Remove the workflow/historical notes from the inline comments in
locale/es.js by deleting the substrings "// human - outdated" and "// human,
AI-generated; needs validation" and leave only the canonical marker (e.g., the
final translation/comment marker) next to the affected strings; locate the
comments by searching for the exact comment texts and update the surrounding
lines so comments reflect only the current source-state.
---
Outside diff comments:
In `@locale/es.js`:
- Around line 3-1218: The file contains prolific inline provenance comments
(e.g., the "// human" and "// ai" tags after string entries like CATEGORY_SCENE,
choose_a_color, rotate_to_object, play_sound, etc.); remove these per-entry
inline markers and consolidate provenance into a separate translation manifest
or metadata file (or a single header comment) that maps keys (CATEGORY_SCENE,
choose_a_color, rotate_to_object, play_sound, etc.) to their provenance, leaving
only necessary exceptional comments inline; update any tooling or loaders to
read the new manifest so translations remain traceable.
- Around line 1-1219: The file export (export default { ... }) has formatting
differences flagged by Prettier; run the project's Prettier formatter (or
npm/yarn script like format) against locale/es.js to normalize spacing, line
breaks and trailing commas, verify changes, stage the updated locale/es.js, and
commit the formatted file so the CI Prettier warning is resolved.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| rotate_anim_seconds: // human | ||
| "rotar %1 a x %2 y %3 z %4 en %5 segundos\n%6 ¿invertir? %7 ¿repetir? %8 %9", // human | ||
| rotate_to_object: "rotate %1 %2 %3 in %4 seconds\n%5 reverse? %6 loop? %7 %8", | ||
| rotate_to_object: "rotate %1 %2 %3 in %4 seconds\n%5 reverse? %6 loop? %7 %8", // ai |
There was a problem hiding this comment.
Spanish locale still contains English user-facing strings
Line [154] and Lines [679-680] are English ("rotate...", "towards", "same rotation as") in locale/es.js. This is a user-visible i18n defect.
💡 Suggested Spanish values (validate with localization owner)
- rotate_to_object: "rotate %1 %2 %3 in %4 seconds\n%5 reverse? %6 loop? %7 %8", // ai+ rotate_to_object: "rotar %1 %2 %3 en %4 segundos\n%5 ¿invertir? %6 ¿repetir? %7 %8", // ai- TOWARDS_option: "towards", // ai- SAME_ROTATION_option: "same rotation as", // ai+ TOWARDS_option: "hacia", // ai+ SAME_ROTATION_option: "misma rotación que", // aiAlso applies to: 679-680
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@locale/es.js` at line 154, The Spanish locale file contains English
user-facing strings: update the locale keys such as rotate_to_object and the
entries currently set to "rotate %1 %2 %3 in %4 seconds\n%5 reverse? %6 loop? %7
%8" and the entries for "towards" and "same rotation as" to proper Spanish
translations while preserving all placeholder tokens (%1…%8), punctuation and
newline sequences exactly; locate the keys by their identifiers
(rotate_to_object, and the two entries currently with values "towards" and "same
rotation as") and replace the English text with validated Spanish equivalents.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Ensure // ai and // human comments always appear after the translated string value, not on key-only lines of multiline entries. https://claude.ai/code/session_013m5GXxcDiJ1XMt2XbF5bj5
Deploying flockdev with |
| Latest commit: | 0e31d29 |
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0b83eb15.flockdev.pages.dev |
| Branch Preview URL: | https://claude-update-spanish-transl.flockdev.pages.dev |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
locale/es.js (1)
154-154:⚠️ Potential issue | 🟠 MajorTranslate remaining English strings in Spanish locale.
Line 154 and Lines 679-680 are still English user-facing values in
locale/es.js. This is a visible i18n defect.💡 Minimal fix
- rotate_to_object: "rotate %1 %2 %3 in %4 seconds\n%5 reverse? %6 loop? %7 %8", // ai+ rotate_to_object: "rotar %1 %2 %3 en %4 segundos\n%5 ¿invertir? %6 ¿repetir? %7 %8", // ai- TOWARDS_option: "towards", // ai- SAME_ROTATION_option: "same rotation as", // ai+ TOWARDS_option: "hacia", // ai+ SAME_ROTATION_option: "misma rotación que", // aiAlso applies to: 679-680
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@locale/es.js` at line 154, The Spanish locale still contains untranslated English values; update the user-facing entries in locale/es.js by translating the rotate_to_object value ("rotate %1 %2 %3 in %4 seconds\n%5 reverse? %6 loop? %7 %8") into natural Spanish and also locate and translate the remaining English strings near the end of the file (the other two user-facing keys that remain in English) so all entries are fully localized; modify only the string values for those keys (keep placeholders like %1, %2, %n intact) and preserve punctuation and newline markers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@locale/es.js`:
- Line 154: The Spanish locale still contains untranslated English values;
update the user-facing entries in locale/es.js by translating the
rotate_to_object value ("rotate %1 %2 %3 in %4 seconds\n%5 reverse? %6 loop? %7
%8") into natural Spanish and also locate and translate the remaining English
strings near the end of the file (the other two user-facing keys that remain in
English) so all entries are fully localized; modify only the string values for
those keys (keep placeholders like %1, %2, %n intact) and preserve punctuation
and newline markers.
Summary
This PR adds source attribution comments (
// humanor// ai) to Spanish locale strings that were previously missing these markers. This improves translation tracking and maintenance by documenting whether each string was translated by humans or generated by AI.Key Changes
// humancomments to 200+ Spanish translation strings that were missing source attribution// aicomments to strings that were AI-generated or machine-translatedNotable Details
https://claude.ai/code/session_013m5GXxcDiJ1XMt2XbF5bj5
Summary by CodeRabbit