Skip to content

fix(i18n): restore complete English fallback strings - #2171

Merged
CodeWithCJ merged 2 commits into
CodeWithCJ:mainfrom
hbui3:codex/fix-i18n-reference-texts
Aug 19, 2026
Merged

fix(i18n): restore complete English fallback strings#2171
CodeWithCJ merged 2 commits into
CodeWithCJ:mainfrom
hbui3:codex/fix-i18n-reference-texts

Conversation

@hbui3

@hbui3 hbui3 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description

What problem does this PR solve?

Eleven English locale values were truncated during the recent translation-key backfill, and a source-comment example created one accidental locale key. Users could therefore see incomplete validation, help, and status messages.

How did you implement the solution?

Restored the complete English fallback strings and interpolation placeholders from their source usage, removed the false-positive locale entry, and reworded the comment so the coverage scan no longer treats it as application code.

Linked Issue: N/A — no existing issue; the malformed values were introduced by the recent translation-key backfill.

Related translation update: CodeWithCJ/SparkyFitnessTranslations#15

How to Test

  1. Check out this branch.
  2. From SparkyFitnessFrontend, run pnpm run validate.
  3. Run pnpm exec jest src/tests/utils/translationKeysCoverage.test.ts --runInBand.
  4. Verify that the corrected English messages are complete and the accidental top-level key locale entry is absent.

PR Type

  • Issue (bug fix)
  • New Feature
  • Refactor
  • Documentation

Checklist

All PRs:

  • [MANDATORY - ALL] Integrity & License: I certify this is my own work, free of malicious code, and I agree to the License terms.

New features only:

  • [MANDATORY for new feature] Alignment: I have raised a GitHub issue and it was reviewed/approved by maintainers or it was approved on Discord.

Frontend changes (SparkyFitnessFrontend/):

  • [MANDATORY for Frontend changes] Quality: I have run pnpm run validate and it passes.
  • [MANDATORY for Frontend changes] Translations: I have only updated the English (en) translation file.

Backend changes (SparkyFitnessServer/):

  • [MANDATORY for Backend changes] Code Quality: I have run typecheck, lint, and tests. New files use TypeScript, new endpoints have Zod schemas, and new endpoints include tests.
  • [MANDATORY for Backend changes] Database Security: I have updated rls_policies.sql for any new user-specific tables.

UI changes (components, screens, pages):

  • [MANDATORY for UI changes] Screenshots: I have attached Before/After screenshots below.

Mobile changes (SparkyFitnessMobile/):

  • [MANDATORY for Mobile changes] Tested on device or emulator: I have verified the changes work on iOS or Android.

Screenshots

Not applicable. The TypeScript change only rewords a source comment; the runtime changes restore complete text in the English locale catalog.

Notes for Reviewers

The repeated truncation at apostrophes and embedded quotes indicates an escaping/parsing issue in the earlier bulk key extraction. This PR is intentionally limited to the English reference locale; non-English locales remain owned by the translation sync workflow.

Validation completed successfully on commit 3ac0c9c:

  • pnpm run validate
  • pnpm exec jest src/tests/utils/translationKeysCoverage.test.ts --runInBand
  • git diff --check

Summary by CodeRabbit

  • Bug Fixes

    • Corrected incomplete English localization messages so quoted examples and text display properly.
    • Removed an obsolete localization entry.
  • Documentation

    • Updated an inline comment to reflect the current translation fallback convention.

@github-actions github-actions Bot added bug Something isn't working frontend labels Aug 19, 2026
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

PR Validation Results

Change Detection

  • 🖥️ Frontend changes detected
  • 🌐 en translation file modified

⚠️ Recommendations (1)

  • Please link a related GitHub issue (Linked Issue: Closes #123).

✅ All required checks passed.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8b2ca919-9c34-4aa0-8d22-458722488245

📥 Commits

Reviewing files that changed from the base of the PR and between 3ac0c9c and 6ccaf7d.

📒 Files selected for processing (1)
  • SparkyFitnessFrontend/public/locales/en/translation.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • SparkyFitnessFrontend/public/locales/en/translation.json

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The English translation catalog now contains complete messages, examples, and interpolation placeholders. An obsolete top-level entry was removed. An inline fallback comment now documents the current translation convention.

Changes

Localization corrections

Layer / File(s) Summary
Completed translation entries and fallback convention
SparkyFitnessFrontend/public/locales/en/translation.json, SparkyFitnessFrontend/src/components/ai/ChatToolCategoriesSelector.tsx
Completed truncated English messages and examples, restored interpolation placeholders, removed the obsolete top-level entry, and updated the fallback comment.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 6ccaf

This change restores complete English validation, help, and status messages and removes an accidental locale entry. No actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested reviewers: codewithcj

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: restoring complete English internationalization fallback strings.
Description check ✅ Passed The description explains the problem, implementation, testing, affected files, checklist status, and why screenshots are not applicable.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests

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.

@hbui3
hbui3 marked this pull request as ready for review August 19, 2026 16:23
@hbui3
hbui3 marked this pull request as draft August 19, 2026 16:26
@hbui3
hbui3 marked this pull request as ready for review August 19, 2026 16:58
Same truncation-at-apostrophe signature as the rest of this PR:

- settings.passkey.description
- cycle.ttc.testLogsHistory
- pregnancy.checklist.title

Each restored verbatim from its inline t() fallback in source.
@CodeWithCJ
CodeWithCJ merged commit b047f8b into CodeWithCJ:main Aug 19, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants