Skip to content

fix(i18n): localize the audit session timer (#159) - #363

Open
isaacsamual994-lang wants to merge 1 commit into
Vero-protocol:mainfrom
isaacsamual994-lang:fix/159-localize-session-timer
Open

isaacsamual994-lang wants to merge 1 commit into
Vero-protocol:mainfrom
isaacsamual994-lang:fix/159-localize-session-timer

Conversation

@isaacsamual994-lang

@isaacsamual994-lang isaacsamual994-lang commented Oct 21, 2026 •

Copy link
Copy Markdown

What was wrong

Closes #159

SessionTimer kept English headings, controls, state messages, accessibility labels and completed-session summaries when the app language changed. Its remaining-time label also rendered 1 seconds remaining.

Approach

Use the existing useTranslation() hook and English/Spanish/French dictionaries for every user-facing timer string, including count-dependent plurals. A separate sessionTimer group preserves the sibling auditTimer messages. Countdown, pause/resume/reset and completion logic, existing translations and dependency versions are unchanged. Switching languages updates text without resetting elapsed time.

Current validation: all local checks pass

Source commit: 27fffd30bffbd5ead060c974e87d0f3b46318b99
Base: 85999075b5737740237a1b2c796019c78e5fff58
Tested source tree: 7d2ac3426d6e4dbca546a3d2fcc975920005b05b

  • Full Jest suite: 866/866 tests pass, 77/77 suites pass. No skipped or disabled tests were introduced.
  • TypeScript: passes with zero diagnostics.
  • ESLint: passes with zero errors. There are 32 existing warnings elsewhere, none in the changed timer or new tests.
  • Default next build (Turbopack): passes, including compilation, type checking, static page generation and optimization.
  • All 263 tracked files remain byte-identical to the submitted tree after validation. No source, lockfile, dependency version, existing test, lint rule or type-check setting was changed to obtain these results.

Reproduction commands for a complete lockfile installation on a case-sensitive filesystem:

npm ci
npx tsc --noEmit --incremental false
npm test -- --runInBand --ci --no-cache
npm run lint
npm run build

Our validation ran on macOS arm64 / Node 24.20.0 in an isolated case-sensitive workspace. The lockfile was preserved; cached dependencies were installed with lifecycle scripts disabled and the incomplete locked Lucide package was repaired as described below. The commands above are reproduction instructions, not a claim that our interrupted initial npm ci completed. The official Node 20 / Ubuntu Actions run is separate and still requires maintainer approval.

Correction to the initial local failure report

The earlier 61 failing tests and case-related type diagnostics came from the local case-insensitive filesystem resolving component/helper names incorrectly. Moving both the unchanged source and compiler/dependencies to a case-sensitive workspace cleared those failures. An interrupted dependency installation also left Lucide files incomplete; the exact lucide-react@1.33.0 archive was restored after its SHA512 matched the existing lockfile. No declaration stubs, dependency upgrades or relaxed checks were used.

The earlier failure logs remain available as historical diagnostics, not current blockers in this patch.

Regression and UI evidence

Passing full validation, test/type/lint/build logs, earlier regression evidence and screenshots

Four new integration cases use the actual translation provider/dictionaries and fail against the original component. They cover all three languages, state transitions, accessible labels, plurals, session counts and language changes while running, paused and completed.

Component checks cover light/dark and desktop/mobile layouts with actual CSS/translations and a synthetic clock. A visible running-session language switch retained the remaining time. This is not a production wallet or backend test.

Light and dark component fixtures

English light desktop
Spanish dark mobile
French light mobile

Review and official CI status

Implementation and all local contributor checks are complete. Upstream Actions run 39616866375 has not executed and needs maintainer approval. The passing local results do not represent upstream CI approval or merge authorization. No individual reviewer has been requested while workflow approval is pending.

  • Scoped branch and Conventional Commit
  • All repository tests pass locally
  • Type check and default production build pass locally
  • Lint passes without errors or new warnings in changed files
  • Real-provider regression and light/dark responsive checks recorded
  • Timer logic, existing translations and dependency files unchanged
  • No credentials or private data committed
  • Closing issue reference included
  • Official upstream CI approved and passing
  • Maintainer review and merge approval

Disclosure and reward status

Translation drafting, implementation review, testing and submission were performed with ChatGPT under the account owner's authorization. No independent human engineering or native-speaker review is claimed; translation wording remains open to review.

This issue is labelled Maybe Rewarded. Assignment, reward amount, escrow, payout destination and reward approval remain unconfirmed. No award or payment is claimed.

Route all timer labels and summaries through the existing translation provider. Add English, Spanish and French copy with count-based plurals and regression tests for state transitions and live language changes. Countdown logic is unchanged.

Refs: Vero-protocol#159

Assisted-by: ChatGPT
@isaacsamual994-lang
isaacsamual994-lang marked this pull request as ready for review October 21, 2026 20:05
@isaacsamual994-lang

Copy link
Copy Markdown
Author

The draft blockers are resolved in local validation: all 866 tests (77 suites), TypeScript and the default production build pass; lint exits 0 with only existing warnings outside the changed files. The submitted source commit is unchanged. The earlier failures were caused by the local case-insensitive filesystem and an incomplete dependency installation, not new failures introduced by this patch.

I have updated the description and marked this ready for review. Current evidence and logs include the environment details; local validation used macOS/Node 24, not your Ubuntu/Node 20 runner. Could a maintainer approve the pending Actions run so the official CI checks can execute? I have not bypassed or claimed success for that pending run.

@isaacsamual994-lang

Copy link
Copy Markdown
Author

A consolidated review note to avoid separate pings on related submissions: PRs #363-#369 are open, non-draft and mergeable, each addressing its linked issue. #363's existing PR description includes passing local validation (866 tests, TypeScript and build). When you have bandwidth, could you review whichever of these changes best fits your current priorities? I'm happy to address concrete feedback on the relevant PRs; no need to review the batch together. Thanks.

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.

[Bug] SessionTimer component bypasses the app's i18n system

1 participant