Skip to content

Decouple feature copy from translated locale catalogs - #8501

Closed
brennanb2025 wants to merge 5 commits into
mainfrom
brennanb2025/i18n-architecture-improvements
Closed

brennanb2025 wants to merge 5 commits into
mainfrom
brennanb2025/i18n-architecture-improvements

Conversation

@brennanb2025

Copy link
Copy Markdown
Contributor

New English feature copy can now land without adding placeholder leaves to every translated locale. Missing target entries use the existing English fallback, while existing translations and reviewed corrections remain versioned and protected.

This replacement restores #8488 after it was accidentally merged and immediately reverted by #8500. The feature diff remains the same 80-file patch; the branch now includes current main without a force-push.

Stabilization is still pending: the live macOS/Linux/Windows PR checks and CodeRabbit review have not completed yet. The Windows/WSL-only runtime-session warning was validated through its real component and bounded fallback oracle, but not through a native Windows app session.

What changed

  • Added parity-free catalog/state validation with explicit reviewed, machine, intentional-english, stale, and untranslated classifications.
  • Added deterministic maintained extraction, semantic dynamic-call waivers, generated TypeScript key output, placeholder validation, and classified main-process coverage.
  • Added safe extraction sync and migration-only bootstrap/repair paths that default-deny catalog rewrites.
  • Added localization ownership and a cross-platform extraction/key-type CI matrix with a required aggregate check.
  • Preserved lazy offline runtime loading and existing renderer/main English fallback behavior; no runtime translation service or network dependency was introduced.

Design and review

The design keeps i18next and the current runtime loading boundary for Phases 1–2. English source identity remains authoritative, target catalogs may be sparse, translation state is committed separately, and source/extraction/catalog drift fails closed without forcing target parity.

Design review found no unresolved scope or architecture issue. Completeness verification classified the headline behavior as implemented for Phases 1–2. Four code-review/fix rounds were required; both independent reviewers returned clean on the same Round 4 tree. After rebasing onto current main, fresh architecture and reproduction reviewers again returned clean on the same integrated patch.

The only implementation deviation was current-base integration: five newly landed feature-copy commits were explicitly classified as non-review provenance, six real new translations were retained as machine state, nine new byte-equal parity fillers were removed, extraction/state evidence was regenerated, and moved RPC schema messages were transferred to their new allowlist path.

App consistency and boundaries

The source-of-truth journey compared desktop renderer/web calls, Electron main-process calls, language selection, pseudo-localization, packaged locale loading, mobile CI boundaries, and macOS/Linux/Windows builds. Runtime loaders, persisted language selection, pseudo-localization, SSH/remote execution, relay behavior, and mobile RPC behavior are unchanged.

The PR fixes the workflow mismatch where feature PRs had to edit all target catalogs and where root localization gates were absent from PR CI. It intentionally defers translation-service selection, locale enablement thresholds, namespace/runtime-library changes, stale-entry omission from runtime bundles, global retranslation, and Phase 3+ bot/export workflow decisions. Generated LocalizationKey remains an evaluated Phase 2 output rather than a production-consumed contract. During Phases 1–2, English key deletion/rename still requires corresponding target cleanup.

Translation preservation evidence

  • Required Spanish PR correction from #6749 remains reviewed and byte-preserved.
  • Required Chinese Explorer corrections from #6706 remain reviewed and byte-preserved.
  • Reviewed provenance is fail-closed; bulk/mechanical feature translation commits cannot promote values to reviewed state.
  • Provider-neutral review evidence supports future exact-value confirmations and reviewed improvements.
  • The migration audit explicitly enumerated 189 prior target leaves that now resolve through intentional English policy. The final rebase additionally removed nine newly landed byte-equal parity fillers while retaining all real translations.
  • The mobile Continue CTA remains translatable: Spanish Continuar and Chinese 继续 remain machine translations; Japanese/Korean remain untranslated rather than falsely intentional-English.

Performance

Performance audit result: clean. Product verification performs one source read/AST parse per file, reviewed-history collection remains exactly three Git processes over 271 locale-history commits, and the extraction matrix does not duplicate Ubuntu work. The PR adds no runtime polling, network calls, timers, listeners, startup awaits, persistent cache, SSH/WSL/mobile work, or render hot-path churn. Lazy target bundles shrink overall.

Tests

  • pnpm run typecheck
  • pnpm run lint
  • git diff --check
  • 12 focused Vitest files / 52 tests
  • Product catalog/state/provenance/coverage verification: 9,849 references; zero stale entries
  • Maintained extraction verification: 8,711 keys; deterministic C and Czech locale output
  • Generated localization key freshness
  • Max-lines ratchet and 36-gate reliability manifest
  • Real Windows-runtime warning component rendered the corrected 2 live terminals / 3 active tasks fallback
  • Extraction template restored byte-identically and final worktree remained clean
  • Native Windows/WSL app session for the Windows-only warning
  • Live GitHub Actions macOS/Linux/Windows matrix
  • Post-PR CodeRabbit/check stabilization

Merge-confidence verdict: LAND on the exact pushed patch. Electron was not launched because macOS cannot honestly reach the only changed runtime UI surface and the architecture is otherwise build-time; testing an unchanged language picker would not prove the changed behavior. No screenshot is claimed. SSH and mobile are unaffected rather than positively exercised.

Local validation used Node 26.5.0 while the repository declares Node 24. actionlint was unavailable locally. Existing unrelated lint warnings remained non-failing. A broad pnpm test was not run; focused localization/runtime tests, full typecheck, full lint, deterministic gates, two clean review lanes, and exact-tree merge-confidence validation passed.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The pull request establishes a localization extraction and verification pipeline, adds deterministic catalog and translation-state management, and introduces migration-only rewrite guards. It adds reviewed provenance and disposition manifests, dynamic-call allowlists, coverage auditing, generated localization key types, and cross-platform CI verification. Product localization catalogs and numerous renderer call sites are updated for new keys and interpolation variables, with expanded tests for extraction, state, provenance, fallback, and locale loading behavior.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.86% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Clear and specific; it matches the main change of decoupling English feature copy from translated locale catalogs.
Description check ✅ Passed It directly describes the localization decoupling and the validation, workflow, and ownership changes in the patch.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
config/scripts/verify-localization-catalog.mjs (1)

489-535: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

en.json is mutated on disk before inconsistent-fallback validation runs.

applyMissingEnglishEntries + fs.writeFile(catalogPath, ...) happen at lines 493-495, but collectInconsistentFallbackVariables/collectInconsistentFallbackValues (lines 521-535) run afterward and can still fail the command. If a newly-bootstrapped key also has a conflicting fallback value/placeholder set elsewhere in the source tree, a --fix run will leave en.json partially mutated on disk even though the overall command exits with code 1 — an "atomic fix" contract violation that could surprise a developer running --fix locally (uncommitted diff left behind on failure).

Move the inconsistent-fallback checks (and the placeholder checks) before the missing-key bootstrap/write step so a failing run never mutates en.json.

🧹 Nitpick comments (3)
i18next.config.ts (1)

14-14: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Build the output path with Node path utilities.

Line 14 hard-codes separators in a configuration intended for cross-platform CI.

Proposed fix
+import path from 'node:path'
 import { defineConfig } from 'i18next-cli'
 
 export default defineConfig({
@@
-    output: 'config/localization-extraction/{{language}}.json',
+    output: path.join('config', 'localization-extraction', '{{language}}.json'),

As per coding guidelines, “Use path.join or Electron/Node path utilities for file paths; never assume / or \.”

Source: Coding guidelines

config/scripts/localization-code-unit-order.mjs (1)

1-4: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider a small unit test for compareCodeUnits.

It underpins deterministic ordering elsewhere in the localization pipeline; a couple of assertions (<, >, ===) would cheaply lock in the code-unit (non-locale) comparison semantics.

config/scripts/verify-localization-extraction.test.mjs (1)

36-41: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Test doesn't verify its own claim.

The test name says dispositions must not fabricate reviewed classifications, but the body only checks the exit code. Add an assertion reading localization-extraction-dispositions.json and confirming the new orphan/drift entries get pending-human-classification (not any reviewed classification), similar to what Test 4 already does at Lines 116-121.

✅ Suggested assertion addition
   it('writes pending dispositions without fabricating reviewed classifications', async () => {
     const root = makeProject()
     await expect(
       verifyLocalizationExtraction(root, ['--skip-extractor', '--update-dispositions'])
     ).resolves.toBe(1)
+    const updated = JSON.parse(
+      readFileSync(path.join(root, 'config', 'localization-extraction-dispositions.json'), 'utf8')
+    )
+    expect(updated.orphans['auto.orphan'].disposition).toBe('pending-human-classification')
+    expect(updated.fallbackDrift['auto.drift'].disposition).toBe('pending-human-classification')
   })

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 14be1e3c-c088-4463-b5b4-fca0e2a91d87

📥 Commits

Reviewing files that changed from the base of the PR and between db9421d and de15df3.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (79)
  • .gitattributes
  • .github/CODEOWNERS
  • .github/workflows/pr.yml
  • config/localization-audit.md
  • config/localization-dynamic-call-allowlist.json
  • config/localization-extraction-dispositions.json
  • config/localization-extraction/en.json
  • config/localization-main-process-allowlist.json
  • config/localization-policy-disposition.md
  • config/localization-reviewed-commit-classifications.json
  • config/localization-reviewed-corrections.json
  • config/localization-state/es.json
  • config/localization-state/ja.json
  • config/localization-state/ko.json
  • config/localization-state/zh.json
  • config/scripts/audit-localization-coverage.mjs
  • config/scripts/audit-localization-coverage.test.mjs
  • config/scripts/bootstrap-locale-catalog.mjs
  • config/scripts/bootstrap-localization-state.mjs
  • config/scripts/bootstrap-localization-state.test.mjs
  • config/scripts/generate-localization-key-types.mjs
  • config/scripts/git-binary-compatibility-workflow.test.mjs
  • config/scripts/legacy-localization-rewrite-guard.test.mjs
  • config/scripts/locale-translation-context-policy.test.mjs
  • config/scripts/locale-translation-policy.mjs
  • config/scripts/localization-catalog-model.mjs
  • config/scripts/localization-code-unit-order.mjs
  • config/scripts/localization-coverage-allowlist-diff.mjs
  • config/scripts/localization-coverage-allowlist-schema.mjs
  • config/scripts/localization-git-history.mjs
  • config/scripts/localization-git-history.test.mjs
  • config/scripts/localization-reviewed-provenance.mjs
  • config/scripts/localization-source-references.mjs
  • config/scripts/localization-source-references.test.mjs
  • config/scripts/package-electron-runtime-contract.test.mjs
  • config/scripts/repair-locale-catalog.mjs
  • config/scripts/report-localization-status.mjs
  • config/scripts/verify-localization-catalog.mjs
  • config/scripts/verify-localization-catalog.test.mjs
  • config/scripts/verify-localization-extraction.mjs
  • config/scripts/verify-localization-extraction.test.mjs
  • config/scripts/verify-product-localization.mjs
  • i18next.config.ts
  • package.json
  • src/main/i18n/main-i18n-lazy-locale.test.ts
  • src/renderer/src/components/GitHubItemDialog.tsx
  • src/renderer/src/components/PullRequestPage.tsx
  • src/renderer/src/components/linear-issue-attribute-filter-sections.tsx
  • src/renderer/src/components/linear-project-view-surfaces.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.tsx
  • src/renderer/src/components/orca-profiles/OrcaProfileManagementDialog.tsx
  • src/renderer/src/components/orca-profiles/OrcaProfileProjectTransferConfirmDialog.tsx
  • src/renderer/src/components/orca-profiles/OrcaProfileSwitchConfirmDialog.tsx
  • src/renderer/src/components/right-sidebar/AiVaultPanel.tsx
  • src/renderer/src/components/right-sidebar/SourceControl.tsx
  • src/renderer/src/components/right-sidebar/useFileDeletion.ts
  • src/renderer/src/components/settings/ComputerUsePane.tsx
  • src/renderer/src/components/settings/ProjectWindowsRuntimeSetting.tsx
  • src/renderer/src/components/settings/RepositoryForkSyncSection.tsx
  • src/renderer/src/components/settings/RepositoryIconTabs.tsx
  • src/renderer/src/components/settings/SourceControlActionRepoOverrideNote.tsx
  • src/renderer/src/components/sidebar/AddRepoCloneStep.tsx
  • src/renderer/src/components/sidebar/HostRemoveDialog.tsx
  • src/renderer/src/components/sidebar/SidebarWorkspaceOptionsMenu.tsx
  • src/renderer/src/components/sidebar/WorkspaceKanbanSettingsMenu.tsx
  • src/renderer/src/components/sidebar/WorkspaceStatusAppearancePopover.tsx
  • src/renderer/src/components/stats/UsageBreakdownSection.tsx
  • src/renderer/src/components/status-bar/WorkspaceSpaceCompactPanel.tsx
  • src/renderer/src/components/terminal-pane/terminal-native-file-drop.ts
  • src/renderer/src/hooks/useSettingsNavigationMetadata.language-switch.test.tsx
  • src/renderer/src/i18n/lazy-locale.test.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/native-chat-locales.test.ts
  • src/renderer/src/store/slices/repos.ts
  • src/shared/localization-keys.ts
👮 Files not reviewed due to content moderation or server errors (2)
  • config/localization-state/es.json
  • config/localization-state/ja.json

Comment thread .github/CODEOWNERS
Comment on lines +1 to +13
# Product source remains owned by its normal code reviewers; locale/state changes need localization review.
/src/renderer/src/i18n/locales/ @brennanbenson
/config/localization-state/ @brennanbenson
/config/localization-extraction/ @brennanbenson
/config/localization-extraction-dispositions.json @brennanbenson
/config/localization-policy-disposition.md @brennanbenson
/config/localization-*-allowlist.json @brennanbenson
/config/localization-reviewed-corrections.json @brennanbenson
/config/localization-reviewed-commit-classifications.json @brennanbenson
/config/scripts/*localization*.mjs @brennanbenson
/config/scripts/*locale*.mjs @brennanbenson
/i18next.config.ts @brennanbenson
/src/shared/localization-keys.ts @brennanbenson

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

config/localization-audit.md isn't covered by any pattern here.

None of the listed globs (/config/localization-policy-disposition.md, /config/localization-*-allowlist.json, etc.) match config/localization-audit.md, which is part of this PR's localization audit trail (coverage auditing / provenance manifests). It can currently be edited without triggering localization review, undermining the stated goal of protecting reviewed/audit artifacts.

🔧 Proposed fix
 /config/localization-policy-disposition.md `@brennanbenson`
+/config/localization-audit.md `@brennanbenson`
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Product source remains owned by its normal code reviewers; locale/state changes need localization review.
/src/renderer/src/i18n/locales/ @brennanbenson
/config/localization-state/ @brennanbenson
/config/localization-extraction/ @brennanbenson
/config/localization-extraction-dispositions.json @brennanbenson
/config/localization-policy-disposition.md @brennanbenson
/config/localization-*-allowlist.json @brennanbenson
/config/localization-reviewed-corrections.json @brennanbenson
/config/localization-reviewed-commit-classifications.json @brennanbenson
/config/scripts/*localization*.mjs @brennanbenson
/config/scripts/*locale*.mjs @brennanbenson
/i18next.config.ts @brennanbenson
/src/shared/localization-keys.ts @brennanbenson
# Product source remains owned by its normal code reviewers; locale/state changes need localization review.
/src/renderer/src/i18n/locales/ `@brennanbenson`
/config/localization-state/ `@brennanbenson`
/config/localization-extraction/ `@brennanbenson`
/config/localization-extraction-dispositions.json `@brennanbenson`
/config/localization-policy-disposition.md `@brennanbenson`
/config/localization-audit.md `@brennanbenson`
/config/localization-*-allowlist.json `@brennanbenson`
/config/localization-reviewed-corrections.json `@brennanbenson`
/config/localization-reviewed-commit-classifications.json `@brennanbenson`
/config/scripts/*localization*.mjs `@brennanbenson`
/config/scripts/*locale*.mjs `@brennanbenson`
/i18next.config.ts `@brennanbenson`
/src/shared/localization-keys.ts `@brennanbenson`

Comment on lines +24 to +34
it('refuses machine-translation bootstrap without migration opt-in', async () => {
await expect(bootstrapLocaleCatalog(makeProject(), 'es', DENIED_MIGRATION)).resolves.toBe(1)
})

it('refuses whole-catalog repair without migration opt-in', async () => {
await expect(repairLocaleCatalog(makeProject(), 'es', DENIED_MIGRATION)).resolves.toBe(1)
})

it('refuses translation-state bootstrap without migration opt-in', async () => {
await expect(bootstrapLocalizationState(makeProject(), [])).resolves.toBe(1)
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Assert the guard reason and that no files were rewritten.

Any failure returning 1 currently passes, including malformed-fixture errors or a rewrite followed by failure. Capture the migration-denied diagnostic/reason and compare the project tree before and after each call.

Comment on lines +6 to +7
// TypeScript 7 is a native CLI; AST consumers still need the legacy JavaScript API.
import ts from 'typescript-api'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify what "typescript-api" actually resolves to in this repo.
grep -n '"typescript' package.json
grep -n 'typescript-api' pnpm-lock.yaml | head -20

Repository: stablyai/orca

Length of output: 1978


🌐 Web query:

npm package "typescript-api" TypeScript compiler API

💡 Result:

There is no official npm package named typescript-api that serves as the TypeScript compiler API. The TypeScript compiler API is built directly into the official typescript npm package [1][2]. Key points regarding your query: 1. The Official Compiler API: To access the TypeScript Compiler API, you must install the official typescript package via npm (npm install typescript) [3][4]. This package contains the entire compiler, including the programmatic API used for parsing, type-checking, and emitting code [2][4]. 2. Other Packages: - Packages such as swagger-typescript-api [5][6] and openapi-typescript [7] exist on npm, but these are tools for generating TypeScript types from OpenAPI/Swagger specifications; they are not related to the core TypeScript compiler infrastructure. - A package named typescript.api exists on npm [8], but it is an extremely outdated, abandoned project from 2013 that targeted TypeScript 0.9 alpha and should not be used [8]. - Other third-party utilities, such as typescript-api-extractor, may use the name to indicate they are built on top of the Compiler API, but they are wrappers or specific-use tools rather than the compiler itself [3]. 3. How to Use the Official Compiler API: Once you have installed the typescript package, you can import it in your Node.js project to access the ts namespace [2]: import * as ts from 'typescript'; // Example: Create a program and emit JavaScript const program = ts.createProgram(['./your-file.ts'], { target: ts.ScriptTarget.ESNext }); const emitResult = program.emit; Common entry points in the official API include [2]: - ts.createProgram: Used for full compilation, type-checking, and emitting output [2][9]. - ts.createSourceFile: Used to parse a single string of text into an Abstract Syntax Tree (AST) without creating a full program [2]. - ts.transpileModule: A fast way to transpile a single module string to JavaScript without type-checking [2][4]. - ts.createLanguageService: Used for IDE-like features such as code completion, navigation, and diagnostics [10][2]. For authoritative documentation, refer to the official TypeScript Wiki on GitHub and the Microsoft TypeScript documentation site [1][9].

Citations:


🌐 Web query:

TypeScript 7 legacy JavaScript API package @typescript/typescript6 typescript

💡 Result:

TypeScript 7.0 is a major release of the TypeScript compiler, which has been rewritten in Go to provide significantly improved performance—often reported as up to 10 times faster than the previous version [1][2]. TypeScript 7.0 represents a foundational shift, moving away from the JavaScript-based codebase used in prior versions, including TypeScript 6.0 [3][2]. The package @typescript/typescript6 is an official compatibility package published by Microsoft [4][5]. It serves two primary purposes during the transition between the legacy JavaScript-based TypeScript 6 and the new Go-based TypeScript 7 [6][3]: 1. Providing a tsc6 command: This allows developers to run the TypeScript 6 compiler binary (tsc) alongside TypeScript 7 without encountering naming conflicts [6][4]. 2. Re-exporting the TypeScript 6 API: The package provides the TypeScript 6 API via standard module imports (e.g., import ts6 from "@typescript/typescript6"), enabling projects to continue using the legacy API while migrating to the newer toolchain [4][5]. This package is intended to facilitate a smoother migration path for projects transitioning to the native-speed TypeScript 7 architecture [6][3].

Citations:


Use the TypeScript compiler package here typescript-api is an unrelated package; the compiler/AST APIs used below come from typescript (or @typescript/typescript6 for the TS7 compatibility path), so this import should be updated.

Comment on lines 564 to +576
const exitCode = verifyLocaleParity(catalog, localeName, localeCatalog)
if (exitCode !== 0) {
if (!options.fix) {
console.error('')
console.error('Run `pnpm run sync:localization-catalog` to repair locale parity.')
console.error('Fix the reported target value in a localization PR.')
}
return exitCode
}
if (
(await verifyTranslationState(root, localeName, catalog, localeCatalog, reviewedAudit)) !== 0
) {
return 1
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Guidance hint is suppressed exactly when it's still needed (--fix + parity failure).

Since --fix no longer auto-repairs locale-parity issues (per the described refactor), a parity failure under --fix now fails silently with no message beyond the earlier per-category error output — the if (!options.fix) guard around the "Fix the reported target value in a localization PR." hint is stale from before auto-repair was removed. This leaves --fix users without the follow-up guidance that --fix-less users get for the identical failure.

🐛 Proposed fix
     const exitCode = verifyLocaleParity(catalog, localeName, localeCatalog)
     if (exitCode !== 0) {
-      if (!options.fix) {
-        console.error('')
-        console.error('Fix the reported target value in a localization PR.')
-      }
+      console.error('')
+      console.error('Fix the reported target value in a localization PR.')
       return exitCode
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const exitCode = verifyLocaleParity(catalog, localeName, localeCatalog)
if (exitCode !== 0) {
if (!options.fix) {
console.error('')
console.error('Run `pnpm run sync:localization-catalog` to repair locale parity.')
console.error('Fix the reported target value in a localization PR.')
}
return exitCode
}
if (
(await verifyTranslationState(root, localeName, catalog, localeCatalog, reviewedAudit)) !== 0
) {
return 1
}
const exitCode = verifyLocaleParity(catalog, localeName, localeCatalog)
if (exitCode !== 0) {
console.error('')
console.error('Fix the reported target value in a localization PR.')
return exitCode
}
if (
(await verifyTranslationState(root, localeName, catalog, localeCatalog, reviewedAudit)) !== 0
) {
return 1
}

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Superseded by #8512 after splitting the change at the localization architecture boundary. The replacement keeps sparse target catalogs, safe English fallback, maintained extraction, validation, and ownership while removing the per-message state/provenance/disposition databases and cross-platform extraction matrix from the merge path. The exact former tree is preserved on brennanb2025/i18n-architecture-improvements-full for migration reference only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant