fix(i18n): admin pages show inconsistent/missing localized labels after language switch
Bug Summary
Admin pages show inconsistent or missing translations after language switch
Current Behavior
When an admin changes the app language (for example from English to Telugu/Hindi), some labels and headings in admin screens do not update correctly.
Observed behavior includes:
- Mixed-language UI on the same page
- Fallback/default text appearing for some labels
- Inconsistent translation updates between sections/components
No hard crash is observed, but the UI state is inconsistent and confusing for multilingual usage.
Expected Behavior
After changing language:
- All visible text on admin pages should re-render in the selected locale
- No fallback/raw/missing-key text should be shown in normal flows
- Language behavior should be consistent across all related components
Impact
-
🚨 Critical - System broken, users cannot complete core tasks -
⚠ ️ High - Major feature broken, workaround exists but difficult -
📌 Medium - Minor feature broken, workaround exists and easy -
ℹ ️ Low - Cosmetic issue, no functional impact
Affected Users: admin, coordinator
Affected Modules: i18n, Language Switcher, Camp Analytics, Manage Medical Camps, shared UI labels
Reproduction Steps
- Login with an admin (or coordinator) account.
- Open
Camp Analyticspage. - Change language from
entoteorhiusing the language switcher. - Navigate between
Camp AnalyticsandManage Medical Camps, and observe labels/headings.
Reproduction Rate: [x] Always [ ] Sometimes [ ] Rarely
Environment
Does the bug occur on:
-
Local development -
Staging environment -
Production environment
Test-Driven Bug Verification
Bug Reproduction Test Cases
| Test ID | Test Description | Steps to Reproduce | Expected Result | Actual Result | Status |
|---|---|---|---|---|---|
| TC-BUG-001 | Admin analytics texts should fully switch locale | 1. Login as admin. 2. Open Camp Analytics. 3. Switch language to Telugu. |
All texts on page are Telugu. | Some texts remain English/fallback. |
|
| TC-BUG-002 | Admin medical camps page should keep selected locale on navigation | 1. Switch language to Hindi. 2. Go to Manage Medical Camps. 3. Return to Camp Analytics and back. |
Locale remains Hindi and all labels stay translated. | Mixed-language labels appear after navigation. |
|
Regression Test Cases
Scenario 1: Bug is Fixed
Given an authenticated admin user on Camp Analytics in English And translation keys exist for English, Telugu, and Hindi When the user switches language to Telugu Then all page labels and headings should be rendered in Telugu And no fallback/default untranslated text should be shown
Scenario 2: No Regression in Related Flow
Unit Test Requirements (for fix)
- Test case that reproduces the bug scenario
- Test for the edge case that was missed
- Test for proper error handling
- Test for correct state management
Root Cause Analysis
What caused this bug?
- Logic error in component
- Missing null/undefined check
- Incorrect API response handling
- Race condition
- State management issue
- Event handler not cleaned up
- Incorrect TypeScript type
- CSS/Styling issue
- Browser compatibility
- Other: _____
Additional Context
Screenshots
Additional Notes
- Bug first noticed during multilingual admin workflow validation.
- Feature likely worked partially before recent i18n/admin page refactors.
- Temporary workaround: manual page refresh and reverting language, but not reliable.
