Repository navigation
Releases: NivaldoFarias/translate-react
Releases · NivaldoFarias/translate-react
Release list
v0.2.17
Changed
- Breaking (contributors): Locale modules use a role-based layout under
src/app/locales/: each locale shipslocale.ts,rules.ts, and arepairs/module set (constants.ts,definition.ts,index.ts); sharedrepairs/infrastructure and a singleregistry.tsregister definitions (LocaleServiceresolves from there;services/locale/remains a re-export). - Post-assembly mechanical cleanup also removes spurious whitespace between markdown links and trailing punctuation (for example
[label](url) ,→[label](url),).
What's Changed
- release
0.2.17by @NivaldoFarias in #77
Full Changelog: v0.2.16...v0.2.17
v0.2.16
Added
- Advisory
englishServerClientTermsguard surfaces English Server/Client Component product terms left in translated prose on translation pull requests. - Russian locale mechanical repairs fix prod-validated calques, English Server/Client Component terms left in Russian prose, and common missing
ёspellings outside fenced and inline code.
Changed
- Segment and frontmatter batch prompts use optional
rules.segmentSpecificwhen defined, adding batch context and omitting full-document instructions (such as MDN URL rewrites) that do not apply to isolated segment snippets. - Russian locale prompt rules expand style and semantic guidance: formal
вы,ё, guillemets,бандлер, lowercase server/client component phrasing, and calque avoidance for terms likenull prototypeandclient-marked code; loanword, RichTextEditor dependency, and instrumental-case guidance were refined in a follow-up pass. - Russian locale mechanical repairs add RichTextEditor dependency phrasing, instrumental-case fixes after Server/Client swaps, link-label localization, English prose leak cleanup, and duplicated
_не_emphasis repair.
What's Changed
- release
0.2.16by @NivaldoFarias in #75
Full Changelog: v0.2.15...v0.2.16
v0.2.15
Added
- Translation and smoke CLIs accept
--modelto overrideLLM_MODELfor a single local run. - Manual
smoke.ymldispatch accepts an optionalfilesinput (comma-separated fixture basenames) to smoke specific fixtures instead of a profile. ci:smokeaccepts--out-dir/-oandSMOKE_OUTPUT_DIRto override the reviewable output directory.
Changed
setup-bun-depscoalesces an emptyBUN_VERSIONto1.3.14; workflows no longer duplicate that default in YAML.smoke.ymllangdispatch choices are checked against.github/locales.jsonin CI.- Blank GitHub Environment values for
LLM_MODELandREPO_*fall back to schema defaults instead of passing through as empty strings. - CI smoke jobs upload
artifacts/smoke/on every run (not only on failure), matching manualsmoke.ymldispatch. bun run lintnow lint-checks.githubYAML witheslint-plugin-ymland validates workflows withactionlint.- Workflow smoke writes to gitignored
artifacts/smoke/and uploads that tree as a standard zip artifact sogh run downloadworks without a tarball workaround. - Locale definitions live under
src/app/locales/<lang>/locale.ts; production-validated locale mechanical repairs register inrepairs.tsand run after shared post-assembly cleanup. - Translated markdown is mechanically cleaned after assembly: MDN docs links use the target locale slug (
ru,pt-BR), echoed'use client'guillemet duplicates and corrupted_output_emphasis regressions are repaired, common segment spacing regressions (inline code, link labels, headings) are repaired, and trailing newlines match the source file. - Markdown link advisory guards treat MDN locale rewrites as equivalent to the source
en-USURLs so mechanical MDN repairs do not flood PR bodies with false positives.
What's Changed
- release
0.2.15by @NivaldoFarias in #74
Full Changelog: v0.2.14...v0.2.15
v0.2.14
Added
- Manual
workflow.ymldispatch accepts an optionalllm_modelinput that overrides the selected GitHub EnvironmentLLM_MODELwhen set.
Changed
- Translation PR bodies and progress comments now describe bot output as drafts for locale contributors, advise manual validation before merge, and explain how to fix issues (PR to the fork branch or request changes on the bot PR). Maintainer wiki copy mirrors the same framing.
Fixed
bun run type-checkkeeps using TypeScript 7 via@typescript/nativewhile the runtime stays on TypeScript 6 for programmatic fence parsing after the production dependency bump.
What's Changed
- chore(deps): bump typescript from 6.0.3 to 7.0.2 in the production-dependencies group by @dependabot[bot] in #72
- release
0.2.14by @NivaldoFarias in #73
Full Changelog: v0.2.13...v0.2.14
v0.2.13
Added
- Manual
smoke.ymldispatch accepts an optionalllm_modelinput that overrides the selected GitHub EnvironmentLLM_MODELwhen set.
Changed
- README and package metadata now describe the project as drafting translation pull requests for locale contributors, not as an automatic translation service.
What's Changed
- release
0.2.13by @NivaldoFarias in #71
Full Changelog: v0.2.12...v0.2.13
v0.2.12
Changed
- Russian translation prompts now steer idiomatic English phrases toward natural Russian (for example
null prototype,client-marked code, Server Component defaults, latency and rendering calques, andtree graphalt text) so regeneratedrupages read less like word-for-word machine translation. - ESLint requires a blank line before each JSDoc block that follows another member, including single-line property docs on interfaces and types.
Fixed
verifyLLMConnectivity()no longer fails on providers that require at least 16 output tokens;CONNECTIVITY_TEST_MAX_TOKENSis raised from 5 to 32.- OpenRouter LLM API errors log parsed
providerMetadataand nestedproviderMessagetext instead of stringified JSON blobs.
What's Changed
- release
0.2.12by @NivaldoFarias in #70
Full Changelog: v0.2.11...v0.2.12
v0.2.11
Added
- Targeted file re-translation: pass
--file/-flocally, setTRANSLATION_FILE_PATHS, or use workflowfile_pathon manual dispatch to limit a run to specificsrc/**/*.mdpaths and refresh an open translation pull request in place instead of skipping it. - Manual
smoke.ymldispatch accepts an optionallanginput (defaultpt-br) to run real-LLM workflow smoke for a chosen configured locale.
Changed
- Manual targeted workflow runs skip recording the upstream locale SHA so a single-file refresh does not advance the poll baseline.
- CI real-LLM smoke runs only on pull requests, not on pushes to
mainordev, so post-merge workflow failures no longer block the default branch when translator changes land without a fresh PR gate.
What's Changed
- release
0.2.11by @NivaldoFarias in #69
Full Changelog: v0.2.10...v0.2.11
v0.2.10
Added
- Optional
fork_owneron each.github/locales.jsonrow overrides the workflow default fork owner when poll or manual matrix builds translation jobs. - CI runs a real-LLM workflow smoke gate once per configured locale before merging changes under
src/app/services/translator/,src/app/services/runner/, orsrc/app/locales/;ci:smokeaccepts--langto target a specific locale instead of thept-brdefault. run-workflow-smokecomposite action shares the checkout, dependency setup, andci:smokeinvocation between the CI gate and the manualsmoke.ymldispatch.
Removed
- Automated maintainer remediation: the runner no longer re-translates open pull requests from
CHANGES_REQUESTEDreview text or posts remediation comments; maintainers edit the branch manually. Open PRs with pending reviews are still treated as workflow-complete when in sync and translated.
Changed
- CI smoke gate requires only the default
pt-brlocale before merge; other configured locales run as optional jobs that do not block the workflow. Smoke jobs cap at 120 minutes. - Discovery retries transient GitHub errors during pull-request validity checks before fail-open inclusion, and unexpected CLD failures after retries now stop the workflow instead of silently scheduling extra translation work; empty, short, or unidentifiable content still counts as not translated.
- GitHub file content, pull request, and translation-progress issue operations now live in dedicated modules composed by
GitHubService; branch cleanup hooks bind directly to the pull request module. - Translation batch processing now delegates per-file work to dedicated branch, pull request, and file processor modules while the batch manager keeps batching and the consecutive-failure circuit breaker.
- File discovery logs a per-run
failOpensummary (PR validity errors, empty or short content, unreliable CLD identification) so operators can see how often uncertain paths schedule extra translation work. - LLM translation calls share one queued retry executor so full-body, frontmatter-batch, and segment-batch paths handle rate limits and API errors consistently.
- GitHub content and default-branch lookups share one API helper; pull request file listing retries use the same Octokit
withRetrypolicy as other API calls. - Legacy full-body and chunked markdown translation now live in a dedicated service; segment-batch failures no longer fall back on auth, quota, or non-splittable errors.
- Advisory validation PR details reuse the same frontmatter and heading detection as post-translation guards instead of parallel regex logic.
- Locale advisory guard labels share one resolver factory across
pt-brandru. - PR reviewer-warning formatting now lives under
comment-builderwith the other GitHub comment utilities. - Shared app utilities split markdown path filtering, GitHub URL builders, and rate-limit detection into topic modules while keeping
@/app/utilsexports stable. - Fork synchronization uses the fork repository default branch instead of assuming
main. - Concurrent
translateContentcalls on the shared translator service no longer share per-file LLM usage or translation-path state. - Language-detector tag stripping and JSX static-text link analyzers use linear scans instead of nested-regex patterns that could backtrack on near-valid upstream markdown.
- Segment batches pack at most 20 prose segments per LLM request (down from 40), reducing structured JSON parse failures and split retries on segment-heavy pages.
- Russian translation rules explicitly call out the
ёletter, guillemet quotation marks («»), theбандлерglossary term, lowercaseсерверные/клиентские компонентыcasing, and named MDN built-in type pages, addressing reviewer feedback on generated Russian pull requests. - Quick
ci:smokeprofile drops the segment-heavyinvalid-hook-call-warning.mdfixture so pre-merge runs finish sooner. - Translation and smoke workflow jobs no longer set
timeout-minutes, so long locale runs are not cut off at the previous two-hour caps. - Segment batch failures from truncated output, id mismatch, or malformed JSON now split the batch on the first error instead of repeating the same LLM call through
p-retry, reducing wasted retries and LLM cost. - Manual
smoke.ymldispatch selects fixtures by profile only; thefilesinput is removed. - GitHub Actions smoke packs
.out/intoartifacts/smoke/<profile>-<run_id>.tar.gzbefore upload (becauseupload-artifactskips hidden dot-directories) and usesarchive: falseso downloads extract with onetar -xzf, not zip then tar. ci:smokeartifact capture writespull-request.mdwhen the runner refreshes an open pull request, not only on new PR creation.- Advisory validation on translation pull requests inlines the guard id and violation tally on each
###heading, uses####line anchors one level below, and fences violation snippets inmarkdowncode blocks so sample headings do not render as PR content. - Release history bullets rewritten for outcome-first, reader-facing prose.
Fixed
- Workflow smoke sets
TARGET_LANGUAGEfrom the locale input beforeci:smokestarts, and CLI override bootstrap no longer loads env validation early, so non-default locale smoke runs use the correct translation rules. - Segment-batch and frontmatter-batch LLM calls with provider
finishReason: "error"now fail like full-body calls instead of accepting malformed provider output. - GitHub integration logs only safe error fields (
message,status,code,name) so Octokit request headers are not written to workflow logs. - Consecutive translation failures now halt the workflow once the circuit-breaker threshold is reached instead of continuing through remaining files.
- Upstream tree paths containing
.., backslashes, or paths outsidesrc/<segment>/.../*.mdare rejected before fetch or commit. - Full-body LLM calls with provider
finishReason: "error"no longer pass as success; truncated or malformed output fails and retries instead of reaching guards with misleadingcontentRatioblocks. - Glued inline code, MDX slug comments, and adjacent markdown links are repaired before advisory validation so those mechanical spacing regressions no longer surface as
mdxSpacingreviewer notices on translation pull requests. - Blank
TARGET_LANGUAGEorSOURCE_LANGUAGEfrom GitHub Actions or.envno longer fails validation; empty values default topt-branden. - Translation pull request conflict notices no longer claim the previous PR was closed when the runner refreshes the branch in place.
- CI per-locale smoke gate jobs no longer inherit the 15-minute workflow timeout that cancelled in-progress
quickruns.
What's Changed
- chore(deps-dev): bump @types/node from 25.9.4 to 26.1.0 in the dev-dependencies group across 1 directory by @dependabot[bot] in #66
- pre-release
0.2.10by @NivaldoFarias in #67 - release
0.2.10by @NivaldoFarias in #68
Full Changelog: https://github.com/NivaldoFarias/translate-react/commits/v0.2.10
v0.2.9
Added
PostTranslationGuardIdconstants for post-translation guard identifiers;guardIdfields and locale label maps infer from that registry.- Structural integrity guards (
mdxSlugPreserved,headingCountPreserved,headingSyntax) and advisory style guards (mdxSpacing,sentenceCaseHeadings,extraMarkdownLinks), consolidated intostructural-integrityandadvisory-styleanalyzer/guard modules. refreshTranslationBranchPreservePrforout_of_syncand maintainer-remediation runs that reuse an open translation pull request.tests/fixtures/md/workflow.manifest.tswith react.dev fixture corpus and integration coverage for every manifest scenario (New,OutOfSync,MaintainerFix,ValidSkip).- Segment production-pipeline, reinsert, cleanup, and truncation-audit specs exercising spacing, slug, and heading regressions.
ci:smoke(src/ci/actions/smoke.ts): real-LLM workflow smoke with mocked GitHub fixtures, profile flags (quick,workflow,full), and.out/artifacts;.github/workflows/smoke.ymlfor manual dispatch.
Changed
- Segment snippet cleanup (
cleanupSegmentSnippet,sanitizeSegmentTranslation) preserves boundary whitespace so reinsert no longer glues prose, links, or{/*slug*/}comments. SEGMENT_BATCH_MAX_ITEMS_PER_BATCHreduced from 55 to 40; segment batch packing also caps estimated JSON completion tokens.- Translation PR advisory warnings use GitHub-style
L{N}/L{N}-L{M}line anchors and grouped<details>sections per guard. - Russian locale PR bodies include labels for all advisory and structural guard ids (parity with
pt-br). - ESLint enables JSDoc rules under
tests/fixtures/**;.prettierignoreexcludes large markdown fixtures from formatting.
Fixed
- Segment batch output no longer duplicates
##heading markers when translated heading text includes markdown markers. - Maintainer remediation reuses open pull requests after
CHANGES_REQUESTEDreviews without closing the branch when an approved review is present.
Removed
- Gitignored
src/ci/smoke-llm.tslocal script (replaced by trackedci:smoke).
What's Changed
- release
0.2.9by @NivaldoFarias in #65
Full Changelog: v0.2.8...v0.2.9
v0.2.8
Added
- AST segment translation as the default markdown body path: prose mdast segments, link labels, and
policysegments (fence comments and MDX string attributes) are batched via structuredsegmentBatchLLM calls with offset reinsert; parse failures or batch errors fall back to full-body translation. translator-segment-batch.schema.ts,callLanguageModelSegmentBatch, andsegmentBatchsystem prompt kind onTranslationLlmClient.- Segment helpers:
segment-translation.util.ts(eligibility),segment-batch.util.ts(token-aware packing and batch split on truncation). @react-docs-fixtures/*path alias andtests/fixtures/react-docs-fixtures.tsbarrel for react.dev markdown fixtures imported as UTF-8 text.- Opaque
sNkeys in segment-batch LLM payloads (segment-batch-opaque-id.util.ts); mdast paths are remapped before reinsert. - Partial follow-up for drop-only segment batch failures (retry missing ids only, up to 3 rounds).
SEGMENT_BATCH_MAX_ITEMS_PER_BATCH(55) cap inpackSegmentsIntoBatches.
Changed
- CI runs
bun run test:coverage;bunfig.tomlexcludes test files and CLI entrypoints from coverage totals. - Maintainer remediation triggers on unresolved
CHANGES_REQUESTEDpull request reviews (members, owners, collaborators, and contributors) submitted after the latest runner commit; PR conversation comments no longer invalidate open PRs. Review summaries and inline review comments from those reviews feed the remediation prompt; null review bodies from the API are treated as empty instead of aborting the run. - Segment batch failures split the batch or retry segments individually before full-body fallback; mismatch and truncation logs include id diagnostics and token context.
- remark/mdast stack promoted from devDependencies to runtime dependencies.
- Translation PR bodies: human-review notice as the opening paragraph; maintainer wiki link in a
[!TIP]callout; advisory warnings grouped by validator in<details>with per-violation diff blocks and fenced-code line ranges. - Verbatim fence masking applies only to the legacy full-body fallback path.
@deprecatedJSDoc on legacy full-body APIs used only by fallback:extractSegments,buildMarkdownDocumentSystemPrompt,translateWithChunking.
Fixed
- Segment extraction uses the unmasked document body so
MASK_VERBATIM_LARGE_FENCESplaceholders no longer force MDX-heavy pages onto the legacy path.
Removed
- Spike-only segment modules (
spike-writeup,integration-analysis,tooling-eval, corpus table utilities) and their production barrel exports.
What's Changed
- feat(translator): spike AST-based translatable segment extraction by @NivaldoFarias in #60
- default AST segment translation with legacy fallback by @NivaldoFarias in #61
- release
0.2.8by @NivaldoFarias in #62
Full Changelog: v0.2.7...v0.2.8