Conversation
Add timestamped REQUEST/RESPONSE logging to Gemini API calls with model, duration, and token counts. Add verbose prompt logging behind VERBOSE flag. Add per-language timing and formatted token usage summary table at end of pipeline run. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Strip metadata from fence language tag before syntax lookup so "sh copy" maps to shell, not js (avoids treating // in URLs as comments). Use strippedCode instead of original block content when restoring translated comments to prevent duplication. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Remove duplicate "Creating Pull Request" banner - Wrap verbose prompt output in collapsible groups Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Support comma-separated exclude paths to skip specific files or directories from translation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Relative paths passed to runSanitizer caused English source lookups to fail silently in GitHub Actions, skipping all English-comparison fixes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
JSX attribute translation runs after the sanitizer and can reintroduce issues. Add a second sanitizer pass after Phase 4 to catch these. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Replace per-language sequential processing with a single shared Gemini concurrency pool. Languages dispatch files simultaneously; commits serialized via SharedCommitter then squashed one-per-language. Bump default concurrency from 6 to 16. Add parallel JSX attribute translation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Pass English content map (fetched from BASE_BRANCH via GitHub API) to the sanitizer instead of reading from disk. Ensures English comparison matches the same branch used for translation, not whatever the CI runner checked out. Disk fallback preserved for local/CLI usage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Restore closing code fence indentation lost during code block extraction/restoration. Explicitly instruct Gemini to translate frontmatter values and transliterate author names for non-Latin scripts. Add validation to reject untranslated frontmatter. Collapse blank lines left by multi-line comment restoration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
The prompt told Gemini to keep `lang` unchanged, preserving `lang: en` from the English source. Now explicitly instructs it to set the lang field to the target language code. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Add fixFrontmatterLang() as a deterministic backup that forces the frontmatter `lang` field to match the locale derived from the file path (public/content/translations/LANG_CODE/**/*.md). - 10 unit tests covering edge cases - Exported via _testOnly for testing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Gemini was dropping CODE_BLOCK placeholders and hallucinating replacement code from training data, producing wrong language tags and modified code content. - Prompt: tell Gemini placeholders are sacrosanct - Prompt: fallback rules if a real fence slips through - Validation: reject output with missing placeholders - Validation: reject output with hallucinated code fences Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
warnCodeFenceContentDrift was flagging every code block with translated comments as "differs from English" -- noise that obscured real code corruption. Now strips comments (// /* */ # and docstrings) before comparing, so only functional code differences trigger the warning. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
When files fail to translate, post the list as a comment on the newly created PR for easy follow-up tracking. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Adds batching for large JSON translation files (~100 keys per Gemini request) and pre-translation HTML placeholder extraction/restoration for values with embedded HTML tags. This targets the 8+ language failures on glossary.json (406 keys, 595 HTML tags) and learn-quizzes.json (696 keys). Also updates the translation roadmap with the agreed-upon priority plan for v3 fixes and v4 infrastructure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Adds BLOCK_NONE safety settings for all harm categories to prevent Gemini from silently returning empty responses for educational blockchain content (mining, attacks, etc.). Inspects response candidates, finishReason, and safetyRatings before accessing response.text, logging detailed diagnostics when non-STOP finish reasons are detected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Use HarmCategory and HarmBlockThreshold enums from @google/genai instead of plain strings. Fixes TS2322 type error in CI where the SDK types are available. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
The sanitizer was pushing absolute filesystem paths into changedFiles, causing GitHub tree API to reject them with "tree.path cannot start with a slash". Uses path.relative() to convert to repo-relative paths, matching the pattern already used for logging in the same file. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Technical titles like "Ethash", "JSON-RPC API", "PeerDAS" are legitimately kept in English. The previous check failed if either title or description matched English. Now only fails when BOTH are identical, catching genuinely untranslated output while allowing technical/proper-noun titles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Same slash bug as the sanitizer -- absolute filesystem paths passed to GitHub tree API. Applies path.relative() at the commit point in jsx-translation.ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
sh copy) now correctly map to their comment syntax family instead of falling through to JS default. Translated code comments now replace English originals instead of being prepended alongside them.Bug Fixes
sh copyfence label misidentified as JS (code-block-extractor.ts)getCommentSyntax("sh copy")fell through to the default"js"family because the full string didn't match"sh". This caused//in URLs likehttps://github.com/...inside shell code blocks to be treated as line comments and corrupted during translation.Fix: Strip metadata after the language name before matching:
language.split(/\s+/)[0]Translated comments appended instead of replacing English (
gemini-translate.ts)restoreComments()was called with the original code block content (English comments intact) instead of the stripped version (comments removed). This produced duplicate comment blocks -- translated Indonesian prepended above the original English.Fix: Pass
strippedCode(fromextractComments()) torestoreComments()instead ofblock.content.Test plan
getCommentSyntax("sh copy")returns"shell"(new test)npx playwright test --project=unit tests/unit/sanitizer/code-block-extractor.spec.tssh copyfence to confirm no URL corruption🤖 Generated with Claude Code