feat(i18n): LanguageTool registry metadata + Phase-0 report (Workstream B)#234
Merged
Conversation
…am B) Enrich the locale SSOT (i18n/locales.ts) with verified LanguageTool coverage: languageToolSupport (strong|partial|none) + languageToolCode on all 19 locales, plus getLanguageToolCode()/hasLanguageToolSupport() helpers so the upcoming editor grammar feature gates on one source. Data verified against dev.languagetool.org/languages (2026-06-24). Key correction to the program plan: Turkish has NO LanguageTool support (absent from LT's language list), as do he/fi/hu/is/eu/ko — these get 'none' and the grammar feature is simply absent, no false promise. Of the 5 new locales, pl/nl/uk=strong, ro=partial, tr=none. Adds the mandatory Phase-0 Adaptive Current-State Report and seeds an append-only Review & Elevation Log in TRANSLATION_STATUS.md (no tier promoted — data-gated). Registry-integrity test extended (code present iff supported; unsupported pinned). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Docker | Jun 24, 2026 7:21p.m. | Review ↗ | |
| JavaScript | Jun 24, 2026 7:21p.m. | Review ↗ | |
| CSS | Jun 24, 2026 7:21p.m. | Review ↗ | |
| Rust | Jun 24, 2026 7:21p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
qnbs
added a commit
that referenced
this pull request
Jun 24, 2026
…fe apply) (#235) * feat(languagetool): real grammar-check service (checkText + offset-safe apply) The foundation for the editor grammar feature, beyond the connectivity ping in languageToolClient.ts. checkText() POSTs /v2/check, parses matches[] into a normalized shape (offset/length/message/replacements/rule/category), slices the flagged span from the source for reliable display + dictionary matching, caches by text hash (dictionary applied post-cache so a new word never re-fetches), is abortable, and degrades silently to an empty result on any network/HTTP failure. applyMatchReplacement() applies one suggestion offset-safe with an anchor check so stale offsets can never corrupt the text. Privacy-first: never logs manuscript text. Locale gating uses getLanguageToolCode() from the SSOT (PR #234). 13 tests cover parsing, empty-text short-circuit, caching, dictionary filtering (spelling-only), replacement cap, out-of-range drop, offline/error degradation, abort rethrow, and offset-safe apply. Gating is covered by languageToolClient.test. Stacked: the 'Check this scene' panel + hook + i18n land in the next PR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(languagetool): rename short locals/params (DeepSource JS-C1002) Touching a new file surfaces its short-identifier names as introduced anti-patterns. Rename c→code, r→rep, s→val, w→word, m→raw/match to clear JS-C1002 (keep the conventional loop index i). No behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test(languagetool): rename short const in test (DeepSource JS-C1002) DeepSource analyzes tests/unit/ too; JS-C1002 flags const/let declarations. Rename const m → firstMatch. No behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 24, 2026
qnbs
added a commit
that referenced
this pull request
Jun 25, 2026
* docs(languagetool): feature guide + ADR 0010 + CHANGELOG + README Document the shipped LanguageTool integration (registry metadata #234, service #235, on-demand panel #236, live inline overlay #238): docs/LANGUAGETOOL.md (setup, privacy model, locale coverage, architecture), ADR 0010 (self-hosted + overlay-reuse + locale-mapping rationale), CHANGELOG [Unreleased] entry, README feature line + Documentation Hub row. Locale-addition rollout (pl/nl/tr/uk/ro) is tracked separately and intentionally not covered here. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(i18n): dedicated TODO for the LanguageTool new-locale rollout (deferred) Self-contained plan for the remaining program tail — adding pl/nl/tr/uk/ro UI locales (per-locale recipe, LT metadata, sequencing, gotchas) + the locale-dependent closing docs (README 19→24, handover report). Deferred for later execution after other planned work. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
First PR of the i18n hardening + real LanguageTool program (plan addition). This is Phase-0 + Workstream B — read-only ground truth + the low-risk registry enrichment that the editor grammar feature will gate on. No user-facing behavior changes yet.
What's in here
i18n/locales.ts— every one of the 19 locales gainslanguageToolSupport(strong|partial|none) +languageToolCode, plus SSOT helpersgetLanguageToolCode()/hasLanguageToolSupport(). Verified against dev.languagetool.org/languages (2026-06-24).docs/i18n/ADAPTIVE_CURRENT_STATE_REPORT_v3.md— the mandatory Phase-0 report: locale inventory + tiers, the LanguageTool scaffold reality, the editor textarea+overlay seam, existing docs/tooling to extend, the verified LT support matrix, adjusted prioritization, and risks.docs/i18n/TRANSLATION_STATUS.md— seeds an append-only Review & Elevation Log (no tier promoted; data-gated).tests/unit/i18n/localesRegistry.test.ts— extended: valid LT tier per locale,languageToolCodepresent iff supported, unsupported locales pinned tonone, core-5 have coverage.⚠ Material correction to the plan
The plan claimed "pl/nl/tr/uk/ro all have strong LanguageTool coverage." Turkish is not supported by LanguageTool at all (absent from its language list), as are he/fi/hu/is/eu/ko. These get
languageToolSupport: 'none'and the grammar feature will be simply absent for them — no false promise. Of the 5 new locales: pl/nl/uk = strong, ro = partial, tr = none (tr stays for its UI-locale value).Test plan
pnpm run lint✅ (1611 files)pnpm run typecheck✅pnpm run i18n:check✅ (no parity drift; bundles rebuild identically)pnpm exec vitest run tests/unit/i18n/localesRegistry.test.ts✅ (14 tests)Next in the stack
PR-C1 (
languageToolService+ "Check this scene" MVP), then PR-C2 (live inline overlay), then one stacked PR per new locale (pl/nl/tr/uk/ro).🤖 Generated with Claude Code