Skip to content

chore(i18n): add repo-native language contribution and maintenance tooling #383

Closed

Description

@khaira777

Refs: #372
Depends on: #381, #382

Context

FloCafe manages translations natively in the Git repository without any SaaS translation management platforms (no Crowdin, Weblate, Tolgee, external localization APIs, or GitHub translation apps).

With the use-intl architecture established and legacy systems removed, this issue provides developer and contributor tooling to streamline adding, editing, and verifying languages locally using standard Git workflows.

Architectural Decision Relevant to This Issue

  • 100% Repository-Native: All tooling and validation run locally via standard npm scripts using Node.js built-in capabilities.
  • Zero External Network Dependencies: No API tokens, webhook configurations, or external service accounts are required to contribute translations. All tooling runs offline.
  • Git is Source of Truth: Translators and developers work directly with repository JSON files and submit standard GitHub PRs.

What to do

1. Expose Standardized Local Validation Command

Ensure package.json provides a clear, documented command for contributors to run all i18n integrity checks locally:

npm run i18n:check

This command executes the comprehensive checks established in #382:

  • Registry ↔ message file consistency
  • English canonical schema parity (strict 100% leaf key parity across all locales)
  • String leaf validity
  • ICU syntax parse validation
  • ICU placeholder argument name matching
  • Rich-text / tag placeholder matching
  • TypeScript translation key type checking via AppConfig
  • Legacy import guardrails (zero useI18n usage)

2. Optional Lightweight Scaffolding Helper

Provide a simple, zero-dependency Node script (e.g. npm run i18n:add -- <lang_code>):

  • Validates that <lang_code> is a valid language identifier.
  • Copies frontend/src/lib/i18n/messages/en.json to frontend/src/lib/i18n/messages/<lang_code>.json without overwriting any existing file.
  • Outputs instructions reminding the contributor to add the corresponding entry in frontend/src/lib/i18n/languages.ts.
  • Prints the next verification command (npm run i18n:check) to guide the contributor.

Keep the helper minimal and maintainable. Manual file creation remains fully supported and documented.

What NOT to do

  • Do NOT configure Crowdin, Weblate, Tolgee, or any external SaaS platform.
  • Do NOT introduce translation API keys, secrets, or GitHub translation Apps.
  • Do NOT build an overengineered scaffolding framework or add heavy dependencies.

Acceptance Criteria

  • npm run i18n:check (or npm run test:translations) runs all translation integrity checks offline.
  • Adding a new language is fully achievable locally using repository tooling alone.
  • Zero external translation network calls/dependencies involved in translation maintenance.

Verification

npm run i18n:check
npm run lint
npm test

Activity

  1. added
    enhancement
    area:frontend
    on Aug 17, 2026
  2. changed the title [-]chore(i18n): set up Crowdin for translation management[/-] [+]chore(i18n): add repo-native language contribution and maintenance tooling[/+] on Aug 18, 2026
  3. self-assigned this
    on Aug 19, 2026
  4. khaira777 commented on Aug 19, 2026

    @khaira777
    ContributorAuthor

    Completed by #412 (merged into main at commit f277e91). Added npm run i18n:add scaffolding script, npm run i18n:check local verification command, comprehensive unit tests in tests/dev-tooling-scripts.test.ts, and contributor documentation in AGENTS.md/CONTRIBUTING.md.

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

Metadata

Metadata

Assignees

Labels

area:frontendenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions