Skip to content

Releases: NivaldoFarias/translate-react

v0.2.17

Choose a tag to compare

@github-actions github-actions released this 20 Jul 14:16
33f1212

Changed

  • Breaking (contributors): Locale modules use a role-based layout under src/app/locales/: each locale ships locale.ts, rules.ts, and a repairs/ module set (constants.ts, definition.ts, index.ts); shared repairs/ infrastructure and a single registry.ts register definitions (LocaleService resolves 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

Full Changelog: v0.2.16...v0.2.17

v0.2.16

Choose a tag to compare

@github-actions github-actions released this 15 Jul 19:40
aa01407

Added

  • Advisory englishServerClientTerms guard 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.segmentSpecific when 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 like null prototype and client-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

Full Changelog: v0.2.15...v0.2.16

v0.2.15

Choose a tag to compare

@github-actions github-actions released this 15 Jul 15:47
8fc84ed

Added

  • Translation and smoke CLIs accept --model to override LLM_MODEL for a single local run.
  • Manual smoke.yml dispatch accepts an optional files input (comma-separated fixture basenames) to smoke specific fixtures instead of a profile.
  • ci:smoke accepts --out-dir/-o and SMOKE_OUTPUT_DIR to override the reviewable output directory.

Changed

  • setup-bun-deps coalesces an empty BUN_VERSION to 1.3.14; workflows no longer duplicate that default in YAML.
  • smoke.yml lang dispatch choices are checked against .github/locales.json in CI.
  • Blank GitHub Environment values for LLM_MODEL and REPO_* 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 manual smoke.yml dispatch.
  • bun run lint now lint-checks .github YAML with eslint-plugin-yml and validates workflows with actionlint.
  • Workflow smoke writes to gitignored artifacts/smoke/ and uploads that tree as a standard zip artifact so gh run download works without a tarball workaround.
  • Locale definitions live under src/app/locales/<lang>/locale.ts; production-validated locale mechanical repairs register in repairs.ts and 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-US URLs so mechanical MDN repairs do not flood PR bodies with false positives.

What's Changed

Full Changelog: v0.2.14...v0.2.15

v0.2.14

Choose a tag to compare

@github-actions github-actions released this 13 Jul 15:28
badc7d7

Added

  • Manual workflow.yml dispatch accepts an optional llm_model input that overrides the selected GitHub Environment LLM_MODEL when 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-check keeps using TypeScript 7 via @typescript/native while the runtime stays on TypeScript 6 for programmatic fence parsing after the production dependency bump.

What's Changed

Full Changelog: v0.2.13...v0.2.14

v0.2.13

Choose a tag to compare

@github-actions github-actions released this 09 Jul 14:10
96539a7

Added

  • Manual smoke.yml dispatch accepts an optional llm_model input that overrides the selected GitHub Environment LLM_MODEL when 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

Full Changelog: v0.2.12...v0.2.13

v0.2.12

Choose a tag to compare

@github-actions github-actions released this 07 Jul 16:26
52d3da3

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, and tree graph alt text) so regenerated ru pages 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_TOKENS is raised from 5 to 32.
  • OpenRouter LLM API errors log parsed providerMetadata and nested providerMessage text instead of stringified JSON blobs.

What's Changed

Full Changelog: v0.2.11...v0.2.12

v0.2.11

Choose a tag to compare

@github-actions github-actions released this 06 Jul 19:41
4be1c23

Added

  • Targeted file re-translation: pass --file / -f locally, set TRANSLATION_FILE_PATHS, or use workflow file_path on manual dispatch to limit a run to specific src/**/*.md paths and refresh an open translation pull request in place instead of skipping it.
  • Manual smoke.yml dispatch accepts an optional lang input (default pt-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 main or dev, so post-merge workflow failures no longer block the default branch when translator changes land without a fresh PR gate.

What's Changed

Full Changelog: v0.2.10...v0.2.11

v0.2.10

Choose a tag to compare

@github-actions github-actions released this 03 Jul 19:38
b0a2b7c

Added

  • Optional fork_owner on each .github/locales.json row 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/, or src/app/locales/; ci:smoke accepts --lang to target a specific locale instead of the pt-br default.
  • run-workflow-smoke composite action shares the checkout, dependency setup, and ci:smoke invocation between the CI gate and the manual smoke.yml dispatch.

Removed

  • Automated maintainer remediation: the runner no longer re-translates open pull requests from CHANGES_REQUESTED review 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-br locale 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 failOpen summary (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 withRetry policy 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-br and ru.
  • PR reviewer-warning formatting now lives under comment-builder with 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/utils exports stable.
  • Fork synchronization uses the fork repository default branch instead of assuming main.
  • Concurrent translateContent calls 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:smoke profile drops the segment-heavy invalid-hook-call-warning.md fixture 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.yml dispatch selects fixtures by profile only; the files input is removed.
  • GitHub Actions smoke packs .out/ into artifacts/smoke/<profile>-<run_id>.tar.gz before upload (because upload-artifact skips hidden dot-directories) and uses archive: false so downloads extract with one tar -xzf, not zip then tar.
  • ci:smoke artifact capture writes pull-request.md when 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 in markdown code 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_LANGUAGE from the locale input before ci:smoke starts, 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 outside src/<segment>/.../*.md are 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 misleading contentRatio blocks.
  • Glued inline code, MDX slug comments, and adjacent markdown links are repaired before advisory validation so those mechanical spacing regressions no longer surface as mdxSpacing reviewer notices on translation pull requests.
  • Blank TARGET_LANGUAGE or SOURCE_LANGUAGE from GitHub Actions or .env no longer fails validation; empty values default to pt-br and en.
  • 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 quick runs.

What's Changed

Full Changelog: https://github.com/NivaldoFarias/translate-react/commits/v0.2.10

v0.2.9

Choose a tag to compare

@github-actions github-actions released this 22 Jun 19:11
a3b4e0c

Added

  • PostTranslationGuardId constants for post-translation guard identifiers; guardId fields and locale label maps infer from that registry.
  • Structural integrity guards (mdxSlugPreserved, headingCountPreserved, headingSyntax) and advisory style guards (mdxSpacing, sentenceCaseHeadings, extraMarkdownLinks), consolidated into structural-integrity and advisory-style analyzer/guard modules.
  • refreshTranslationBranchPreservePr for out_of_sync and maintainer-remediation runs that reuse an open translation pull request.
  • tests/fixtures/md/workflow.manifest.ts with 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.yml for 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_BATCH reduced 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/**; .prettierignore excludes 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_REQUESTED reviews without closing the branch when an approved review is present.

Removed

  • Gitignored src/ci/smoke-llm.ts local script (replaced by tracked ci:smoke).

What's Changed

Full Changelog: v0.2.8...v0.2.9

v0.2.8

Choose a tag to compare

@github-actions github-actions released this 16 Jun 15:28
85d0291

Added

  • AST segment translation as the default markdown body path: prose mdast segments, link labels, and policy segments (fence comments and MDX string attributes) are batched via structured segmentBatch LLM calls with offset reinsert; parse failures or batch errors fall back to full-body translation.
  • translator-segment-batch.schema.ts, callLanguageModelSegmentBatch, and segmentBatch system prompt kind on TranslationLlmClient.
  • Segment helpers: segment-translation.util.ts (eligibility), segment-batch.util.ts (token-aware packing and batch split on truncation).
  • @react-docs-fixtures/* path alias and tests/fixtures/react-docs-fixtures.ts barrel for react.dev markdown fixtures imported as UTF-8 text.
  • Opaque sN keys 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 in packSegmentsIntoBatches.

Changed

  • CI runs bun run test:coverage; bunfig.toml excludes test files and CLI entrypoints from coverage totals.
  • Maintainer remediation triggers on unresolved CHANGES_REQUESTED pull 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.
  • @deprecated JSDoc on legacy full-body APIs used only by fallback: extractSegments, buildMarkdownDocumentSystemPrompt, translateWithChunking.

Fixed

  • Segment extraction uses the unmasked document body so MASK_VERBATIM_LARGE_FENCES placeholders 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

Full Changelog: v0.2.7...v0.2.8