Skip to content

Feat/i18n wave4 audit#872

Open
Thosine-01 wants to merge 957 commits into
bakeronchain:mainfrom
Thosine-01:feat/i18n-wave4-audit
Open

Feat/i18n wave4 audit#872
Thosine-01 wants to merge 957 commits into
bakeronchain:mainfrom
Thosine-01:feat/i18n-wave4-audit

Conversation

@Thosine-01
Copy link
Copy Markdown

Summary

Closes #764

Full i18n audit of the frontend. Extracts all hardcoded strings into
src/locales/en.json, wires up components to use translation keys,
adds i18next-scanner to CI, and introduces pseudo-locale testing.


Changes

src/locales/en.json

  • Expanded from ~80 keys to 832 keys
  • Covers every page and component that was previously hardcoded
  • New namespaces: activity, comments, course, lesson, forum,
    milestone, celebration, onboarding, quiz, errors, search,
    notifications, language, footer, common, scholarship,
    pages.dashboard, pages.donor, pages.treasury, pages.courses,
    pages.history, pages.community, pages.peerReview, pages.admin,
    pages.credential, pages.wiki, pages.notFound

src/i18n.ts

  • Loads pseudo-locale in dev and CI environments
  • Logs console warnings for missing keys in development

Components updated

  • NavBar.tsx — nav links, aria labels, mobile menu
  • ActivityFeed.tsx — event labels, empty state, load more
  • ConnectWalletGuard.tsx — connect prompt
  • CommentCard.tsx — all actions, errors, confirmations
  • CommentSection.tsx — sort labels, post/reply actions
  • CourseCard.tsx — difficulty labels, enroll/continue buttons
  • NotificationBell.tsx — panel title, mark all read, empty state
  • WalletInfoModal.tsx — asset labels, disconnect button
  • ErrorBoundary.tsx — error messages and actions
  • Footer.tsx — powered by, copyright
  • donor/EmptyState.tsx — full donor onboarding copy
  • donor/ActiveVotes.tsx — vote labels and empty state
  • donor/MyContributions.tsx — contribution history labels
  • donor/GovernancePower.tsx — governance stats labels
  • donor/ScholarsFunded.tsx — scholar progress labels
  • forum/ThreadList.tsx — all forum actions and states
  • forum/ThreadDetail.tsx — replies, delete confirmations

Pages updated

  • Dashboard.tsx — stats, empty states, connect prompt

New files

  • i18next-scanner.config.js — scanner configuration at project root
  • scripts/generate-pseudo-locale.mjs — generates src/locales/pseudo.json

.github/workflows/frontend-ci.yml

  • Added Check translation keys step between Lint and Test
  • Fails CI if en.json contains __MISSING__ values
  • Triggers also on changes to i18next-scanner.config.js

Checklist

  • Audit all hardcoded strings in the frontend
  • Extract all strings to src/locales/en.json
  • Add i18next-scanner to CI to detect missing translation keys
  • Add pseudo-locale testing to catch untranslated strings

Anuoluwapo25 and others added 30 commits March 30, 2026 11:42
…e-112-readme-soroban

docs: replace Solidity/.sol references with Soroban/Rust in README
…ue-126-cargo-ci

ci: add .rustfmt.toml and document cargo fmt/clippy in README
…ue-108-landing-page

feat(home): replace scaffold page with LearnVault landing page
…tract-upgrades

Implement Soroban upgrade path for V1 contracts
…xample-vars

docs: add complete env example
…or-states

implemented missing empty and error states
feat: add pagination to governance proposals list
feat: centralize contract addresses in src/constants/contracts.ts
fix: Replace LRNBalanceWidget mock data with real LearnToken contract calls bakeronchain#209
feat(treasury): hookify treasury page with /api/treasury/stats + /api…
…t-logger

feat(server): add request logging middleware
test: Implement property-based fuzz testing for contracts
Anuoluwapo25 and others added 27 commits April 26, 2026 18:32
Added bundle size analysis to frontend CI
…nnection-pooling-configuration-and-health-monitoring

Add database connection pooling configuration and health monitoring
…er-tests

test: add integration tests for event indexer and poller bakeronchain#578
…ibility-aria-labels

Feat/accessibility aria labels
Implement course browsing, lesson viewing, and wallet connection
- Enforce RS256 exclusively; remove hardcoded HS256 fallback secret from
  admin and course-admin middlewares (production already blocked HS256, now
  development no longer falls back to a known-constant secret)
- Add iss (learnvault) and aud (learnvault-api) claims to every signed token
  and validate them on verification to prevent token substitution across services
- Add jti (UUID) claim to every token to support future revocation tracking
- Validate RSA public key is >= 2048 bits at server startup
- Expose ephemeral dev keys to process.env so standalone middlewares use RS256
  instead of HS256 even in key-less development mode
- Add jwt.service.test.ts covering: HS256 rejection, wrong iss/aud rejection,
  missing jti/sub rejection, expired token rejection, and valid round-trip
- Update admin-milestones.test.ts to set JWT_SECRET explicitly (no longer
  relies on removed hardcoded fallback)
- Document key rotation procedure in .env.example
- Enforce RS256 exclusively; remove hardcoded HS256 fallback secret from
  admin and course-admin middlewares (production already blocked HS256, now
  development no longer falls back to a known-constant secret)
- Add iss (learnvault) and aud (learnvault-api) claims to every signed token
  and validate them on verification to prevent token substitution across services
- Add jti (UUID) claim to every token to support future revocation tracking
- Validate RSA public key is >= 2048 bits at server startup
- Expose ephemeral dev keys to process.env so standalone middlewares use RS256
  instead of HS256 even in key-less development mode
- Add jwt.service.test.ts covering: HS256 rejection, wrong iss/aud rejection,
  missing jti/sub rejection, expired token rejection, and valid round-trip
- Update admin-milestones.test.ts to set JWT_SECRET explicitly (no longer
  relies on removed hardcoded fallback)
- Document key rotation procedure in .env.example
Replace Morgan + raw console.* calls with pino throughout the server.

- Add pino and pino-pretty dependencies; remove unused morgan and @types/morgan
- Create src/lib/logger.ts: central pino logger with JSON output in production,
  pretty-print in development, silent in tests; LOG_LEVEL env var support
- Add maskAddress() helper to truncate Stellar wallet addresses in logs
  (first 4 + last 4 chars) so full addresses are never logged as PII
- Replace 55 console.log/warn/error calls across all controllers, services,
  middleware, routes, db, and workers with typed pino child loggers
  (logger.child({ module: 'xxx' })) preserving structured { err } objects
- Update request-logger.middleware.ts to use pino as default logger while
  keeping the injectable interface for tests
- Remove dead morgan import from index.ts
- Fix admin-milestones.controller.test.ts to set process.env.JWT_SECRET
  explicitly (no hardcoded fallback exists since JWT security PR)
- Document LOG_LEVEL env var and log rotation via logrotate/pino-roll in
  .env.example
Covers form validation, navigation, API submission, and confirmation
across all five wizard steps with 21 passing test cases.
…ance-improvements

perf/fix: compression, CI fixes, migration idempotency, TypeScript bu…
…implementation

security: audit and harden JWT implementation (bakeronchain#716)
…gging-pino

Devops/structured logging pino
…xss-hardening

security: harden markdown rendering and add CSP
@Thosine-01
Copy link
Copy Markdown
Author

I notice you just unassign me this issue. Is there something I did wrong. I guess i didnt really understand the issue so i over did it. been on it for days

@Anuoluwapo25
Copy link
Copy Markdown
Contributor

can you apply to Hazina-Escrow? @Thosine-01

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.

feat: implement internationalization for all missing i18n keys