Skip to content

chore(quality): strengthen i18n and formatting guards - #121

Merged
Yoruxyv merged 1 commit into
mainfrom
chore/git-hooks-prettier
Sep 19, 2026
Merged

Yoruxyv merged 1 commit into
mainfrom
chore/git-hooks-prettier

Conversation

@Yoruxyv

@Yoruxyv Yoruxyv commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Summary

Strengthens RepoDitor's development-time quality gates for localization integrity and formatting consistency.

This PR adds stricter Desktop/Web i18n validation and checked-in Git hooks that catch or correct Prettier drift before CI.

Changes

Localization integrity

Desktop

Strengthens desktop/src/app/i18n/i18n.test.ts to:

  • verify every locale has exactly the canonical English translation keys
  • discover locale files from disk instead of relying only on the runtime registry
  • verify locale files match SUPPORTED_LOCALES
  • reject empty or whitespace-only translations
  • verify interpolation placeholders match English
  • detect missing, extra, or duplicated placeholders
  • preserve the existing locale-validation and five-language selector invariants

Web

Strengthens web/src/app/i18n/catalog.test.ts to:

  • verify locale directories match the runtime LOCALES registry
  • verify registered catalogs match the supported locale set
  • reject empty translation leaves
  • preserve exact key parity with English
  • preserve interpolation-placeholder parity
  • continue validating fallback behavior, pluralization, technical literals, and representative UI copy

Formatting guards

Adds checked-in Git hooks under .githooks/ with PowerShell implementations under scripts/git-hooks/.

Pre-commit

  • inspects staged Desktop and Web files
  • uses each project's repo-local Prettier version
  • runs a format check first
  • automatically formats only when necessary
  • re-stages formatted files before the commit is created
  • refuses to auto-format partially staged files to avoid including unintended hunks

Pre-push

  • runs the complete Desktop npm run format:check
  • runs the complete Web npm run format:check
  • blocks the push if either project fails formatting validation

Hook setup

Adds:

scripts/setup-git-hooks.ps1

@vercel

vercel Bot commented Sep 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
repoditor Ignored Ignored Sep 19, 2026 5:00am UTC

@Yoruxyv
Yoruxyv merged commit 2d47a22 into main Sep 19, 2026
11 checks passed
@Yoruxyv
Yoruxyv deleted the chore/git-hooks-prettier branch September 19, 2026 05:02
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