# 2. Localization — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: localization.md — every feature, sub-feature, and rule covered

---

## Test Execution Policy
- Zero tolerance: any deviation from documented behavior = FAILED = bug
- Every bug is immediately logged/reported (Bug ID, feature, sub-feature,
  expected vs actual, severity) and fixed 100% before the group passes
- Feature group passes only at 100% test pass rate

## Coverage Matrix
| Feature | Sub-feature / Rule | Test IDs |
|---------|--------------------|----------|
| 2.1 Configure Supported Interface Languages | Enable/disable interface languages platform-wide | TC-SA-04-02-001 |
| 2.1 Configure Supported Interface Languages | Default language setting (applied when a user has no preference) | TC-SA-04-02-002 |
| 2.1 Configure Supported Interface Languages | Per-user language preference (users choose from the enabled set) | TC-SA-04-02-003 |
| 2.1 Configure Supported Interface Languages | Translation coverage view: per language, the share of interface strings and templates translated | TC-SA-04-02-004 |
| 2.1 Configure Supported Interface Languages | Pending-translation tracking with routing to the translation process | TC-SA-04-02-005 |
| 2.1 Configure Supported Interface Languages | Content-language distinction: interface language is separate from content/course language | TC-SA-04-02-006 |
| 2.1 Configure Supported Interface Languages | Audit logging of language configuration changes | TC-SA-04-02-007 |
| 2.1 Configure Supported Interface Languages | Rule: a disabled language is not offered to users; existing user preferences in a disabled language fall back to the default | TC-SA-04-02-008 |
| 2.1 Configure Supported Interface Languages | Rule: untranslated strings fall back to the default language; they are never shown blank or as keys | TC-SA-04-02-009 |
| 2.1 Configure Supported Interface Languages | Rule: translation coverage is tracked per language and per surface (interface, templates), so gaps are visible | TC-SA-04-02-004 |
| 2.1 Configure Supported Interface Languages | Rule: interface language is distinct from content language: a course's language is a content attribute, not the interface setting | TC-SA-04-02-006 |
| 2.1 Configure Supported Interface Languages | Rule: the default language applies only when a user has no preference | TC-SA-04-02-002 |
| 2.1 Configure Supported Interface Languages | Rule: language configuration changes are audit-logged | TC-SA-04-02-007 |
| 2.2 Configure Default Currency and Multi-Currency Support | Default currency setting (the platform's base currency) | TC-SA-04-02-010 |
| 2.2 Configure Default Currency and Multi-Currency Support | Supported currency list (enable/disable currencies) | TC-SA-04-02-011 |
| 2.2 Configure Default Currency and Multi-Currency Support | Per-currency price expression (prices defined per currency where multi-currency is on) | TC-SA-04-02-012 |
| 2.2 Configure Default Currency and Multi-Currency Support | Display rules: amounts shown in the user's/context's currency | TC-SA-04-02-013 |
| 2.2 Configure Default Currency and Multi-Currency Support | Exchange-rate handling: rate source and update cadence for cross-currency display | TC-SA-04-02-014 |
| 2.2 Configure Default Currency and Multi-Currency Support | Consistency: billing, receipts, and financial views use the configured currencies | TC-SA-04-02-015 |
| 2.2 Configure Default Currency and Multi-Currency Support | Audit logging of currency configuration changes | TC-SA-04-02-016 |
| 2.2 Configure Default Currency and Multi-Currency Support | Rule: the default (base) currency is the platform's accounting currency; per-currency display is derived from it via rates | TC-SA-04-02-010 |
| 2.2 Configure Default Currency and Multi-Currency Support | Rule: a disabled currency is not used for new pricing; existing amounts in it are handled per the transition plan | TC-SA-04-02-017 |
| 2.2 Configure Default Currency and Multi-Currency Support | Rule: exchange rates have a defined source and cadence; they are not manually editable ad hoc (changes are logged) | TC-SA-04-02-018 |
| 2.2 Configure Default Currency and Multi-Currency Support | Rule: prices are expressed per currency where multi-currency is on; there is no implicit auto-pricing without a defined rate | TC-SA-04-02-012 |
| 2.2 Configure Default Currency and Multi-Currency Support | Rule: billing, receipts, and financial views are consistent with the currency configuration | TC-SA-04-02-015 |
| 2.2 Configure Default Currency and Multi-Currency Support | Rule: currency configuration changes are audit-logged | TC-SA-04-02-016 |
| 2.3 Configure Time Zones | Default system time zone (for displays and scheduling where no context applies) | TC-SA-04-02-019 |
| 2.3 Configure Time Zones | Per-user time zone preference (set at registration or in preferences) | TC-SA-04-02-020 |
| 2.3 Configure Time Zones | Per-context time zone (e.g., an institute's time zone for its schedules) | TC-SA-04-02-021 |
| 2.3 Configure Time Zones | Display rules: times rendered in the viewer's/context's time zone | TC-SA-04-02-022 |
| 2.3 Configure Time Zones | Scheduling correctness: a scheduled event is anchored in absolute time and displayed per viewer | TC-SA-04-02-023 |
| 2.3 Configure Time Zones | Deadline and reporting time-zone consistency | TC-SA-04-02-024 |
| 2.3 Configure Time Zones | Audit logging of time-zone configuration changes | TC-SA-04-02-025 |
| 2.3 Configure Time Zones | Rule: times are anchored in absolute time; time zones affect display, not the underlying instant | TC-SA-04-02-023 |
| 2.3 Configure Time Zones | Rule: a missing per-user time zone falls back to the default system time zone | TC-SA-04-02-026 |
| 2.3 Configure Time Zones | Rule: scheduling and deadline enforcement use the absolute anchor, so time-zone display never changes when something happens | TC-SA-04-02-024 |
| 2.3 Configure Time Zones | Rule: reporting date boundaries use a defined time zone, so "daily" and "monthly" are unambiguous | TC-SA-04-02-024 |
| 2.3 Configure Time Zones | Rule: per-context (institute) time zones apply to that context's schedules and displays | TC-SA-04-02-021 |
| 2.3 Configure Time Zones | Rule: time-zone configuration changes are audit-logged | TC-SA-04-02-025 |

## 2.1 Configure Supported Interface Languages

### TC-SA-04-02-001 — Interface languages can be enabled/disabled platform-wide
**Type:** Positive
**Covers:** 2.1 → Enable/disable interface languages platform-wide
**Preconditions:** English and Spanish are enabled; French is not.
**Steps:**
1. Enable French in the interface language set.
2. Verify French is now offered to users.
3. Disable Spanish and verify it is no longer offered.
**Expected Result:** Languages can be enabled and disabled platform-wide — the enabled set changes as configured.
**Priority:** High

### TC-SA-04-02-002 — The default language applies only when a user has no preference
**Type:** Positive
**Covers:** 2.1 → Default language setting (applied when a user has no preference); Rule: the default language applies only when a user has no preference
**Preconditions:** The default language is English; User A has no preference; User B prefers Spanish.
**Steps:**
1. Log in as User A and verify the interface is in English (the default).
2. Log in as User B and verify the interface is in Spanish (the preference).
**Expected Result:** User A gets the default (English); User B gets their preference (Spanish) — the default applies only when there is no preference.
**Priority:** High

### TC-SA-04-02-003 — Per-user language preference: users choose from the enabled set
**Type:** Positive
**Covers:** 2.1 → Per-user language preference (users choose from the enabled set)
**Preconditions:** English, Spanish, and French are enabled.
**Steps:**
1. As a user, open the language preference.
2. Verify only the enabled languages (English, Spanish, French) are offered.
3. Select French and verify the interface renders in French.
**Expected Result:** The user can choose only from the enabled set; the interface renders in the chosen language.
**Priority:** High

### TC-SA-04-02-004 — Translation coverage view shows per language, per surface (interface, templates)
**Type:** Positive
**Covers:** 2.1 → Translation coverage view: per language, the share of interface strings and templates translated; Rule: translation coverage is tracked per language and per surface (interface, templates), so gaps are visible
**Preconditions:** French has 60% of interface strings translated and 80% of templates translated.
**Steps:**
1. Open the translation coverage view.
2. Verify French shows 60% for interface strings and 80% for templates.
**Expected Result:** The coverage view shows per-language, per-surface coverage — the gaps (40% interface, 20% templates) are visible.
**Priority:** Medium

### TC-SA-04-02-005 — Pending translations are tracked and routed to the translation process
**Type:** Positive
**Covers:** 2.1 → Pending-translation tracking with routing to the translation process
**Preconditions:** French has 40% of interface strings pending translation.
**Steps:**
1. Open the pending-translation tracking.
2. Verify the pending set is listed and routed to the translation process.
**Expected Result:** The pending translations are tracked and routed to the translation process — the gap is actionable.
**Priority:** Medium

### TC-SA-04-02-006 — Interface language is distinct from content language: a course's language is a content attribute
**Type:** Positive
**Covers:** 2.1 → Content-language distinction: interface language is separate from content/course language; Rule: interface language is distinct from content language: a course's language is a content attribute, not the interface setting
**Preconditions:** A user's interface language is French; a course's content language is English.
**Steps:**
1. Log in as the user (interface in French).
2. Open the English course.
3. Verify the interface is in French and the course content is in English.
**Expected Result:** The interface renders in French (the interface language) while the course content is in English (the content language) — the two are distinct.
**Priority:** High

### TC-SA-04-02-007 — Language configuration changes are audit-logged
**Type:** Positive
**Covers:** 2.1 → Audit logging of language configuration changes; Rule: language configuration changes are audit-logged
**Preconditions:** A language is enabled and the default is changed.
**Steps:**
1. Open the audit trail and filter by "language".
2. Verify the entries show the languages enabled/disabled and the timestamp.
**Expected Result:** The language configuration changes are audit-logged with the languages enabled/disabled and the timestamp.
**Priority:** Critical

### TC-SA-04-02-008 — A disabled language is not offered; existing preferences in it fall back to the default
**Type:** Negative
**Covers:** 2.1 → Rule: a disabled language is not offered to users; existing user preferences in a disabled language fall back to the default
**Preconditions:** Spanish is disabled; User C has a Spanish preference.
**Steps:**
1. Verify Spanish is not offered in the language preference.
2. Log in as User C and verify the interface falls back to the default language.
**Expected Result:** Spanish is not offered; User C's interface falls back to the default language — no broken preference.
**Priority:** High

### TC-SA-04-02-009 — Untranslated strings fall back to the default language; never shown blank or as keys
**Type:** Negative
**Covers:** 2.1 → Rule: untranslated strings fall back to the default language; they are never shown blank or as keys
**Preconditions:** French is enabled at 60% coverage; 40% of strings are untranslated.
**Steps:**
1. Log in with the French interface.
2. Navigate to screens containing untranslated strings.
3. Verify each untranslated string falls back to the default language (English).
**Expected Result:** All untranslated strings fall back to English — none is shown blank or as a raw key.
**Priority:** Critical

## 2.2 Configure Default Currency and Multi-Currency Support

### TC-SA-04-02-010 — The default (base) currency is the platform's accounting currency; per-currency display is derived via rates
**Type:** Positive
**Covers:** 2.2 → Default currency setting (the platform's base currency); Rule: the default (base) currency is the platform's accounting currency; per-currency display is derived from it via rates
**Preconditions:** The base currency is USD; EUR is enabled with a defined rate.
**Steps:**
1. Verify the base currency is USD.
2. View an amount in the EUR context and verify it is derived from USD via the rate.
**Expected Result:** USD is the accounting currency; the EUR display is derived from it via the rate — consistent and correct.
**Priority:** Critical

### TC-SA-04-02-011 — The supported currency list allows enabling/disabling currencies
**Type:** Positive
**Covers:** 2.2 → Supported currency list (enable/disable currencies)
**Preconditions:** USD is enabled; EUR is not.
**Steps:**
1. Enable EUR in the supported list.
2. Verify EUR is now available for pricing and display.
**Expected Result:** EUR is enabled and available — the supported list controls currency availability.
**Priority:** High

### TC-SA-04-02-012 — Per-currency price expression: prices are defined per currency; no implicit auto-pricing without a defined rate
**Type:** Positive
**Covers:** 2.2 → Per-currency price expression (prices defined per currency where multi-currency is on); Rule: prices are expressed per currency where multi-currency is on; there is no implicit auto-pricing without a defined rate
**Preconditions:** Multi-currency is on; a plan has a price in USD and EUR.
**Steps:**
1. Verify the plan has an explicit price in USD and an explicit price in EUR.
2. For a currency with no defined price, verify there is no implicit auto-pricing.
**Expected Result:** Prices are explicitly defined per currency; a currency without a defined price shows no implicit auto-priced value.
**Priority:** High

### TC-SA-04-02-013 — Display rules: amounts are shown in the user's/context's currency
**Type:** Positive
**Covers:** 2.2 → Display rules: amounts shown in the user's/context's currency
**Preconditions:** User A is in the USD context; User B is in the EUR context.
**Steps:**
1. Log in as User A and verify amounts are shown in USD.
2. Log in as User B and verify amounts are shown in EUR.
**Expected Result:** Each user sees amounts in their context's currency — the display rule works.
**Priority:** High

### TC-SA-04-02-014 — Exchange-rate handling: rate source and update cadence for cross-currency display
**Type:** Positive
**Covers:** 2.2 → Exchange-rate handling: rate source and update cadence for cross-currency display
**Preconditions:** The rate source is configured with a daily update cadence.
**Steps:**
1. Verify the rate source and cadence are set.
2. Wait for a cadence update and verify the rate is refreshed.
**Expected Result:** The exchange rate is sourced from the defined source and updated on the defined cadence — cross-currency displays are current.
**Priority:** High

### TC-SA-04-02-015 — Billing, receipts, and financial views are consistent with the currency configuration
**Type:** Positive
**Covers:** 2.2 → Consistency: billing, receipts, and financial views use the configured currencies; Rule: billing, receipts, and financial views are consistent with the currency configuration
**Preconditions:** A payment is made in EUR; the base currency is USD.
**Steps:**
1. Verify the receipt shows the amount in EUR (the user's currency).
2. Verify the financial view shows the base currency (USD) with the per-currency breakdown.
**Expected Result:** The receipt is in EUR; the financial view is in USD with the EUR breakdown — billing, receipts, and financial views are consistent.
**Priority:** Critical

### TC-SA-04-02-016 — Currency configuration changes are audit-logged
**Type:** Positive
**Covers:** 2.2 → Audit logging of currency configuration changes; Rule: currency configuration changes are audit-logged
**Preconditions:** A currency is enabled and the rate handling is changed.
**Steps:**
1. Open the audit trail and filter by "currency".
2. Verify the entries show the currencies enabled and the rate handling, with the timestamp.
**Expected Result:** The currency configuration changes are audit-logged with the currencies enabled, the rate handling, and the timestamp.
**Priority:** Critical

### TC-SA-04-02-017 — A disabled currency is not used for new pricing; existing amounts are handled per the transition plan
**Type:** Negative
**Covers:** 2.2 → Rule: a disabled currency is not used for new pricing; existing amounts in it are handled per the transition plan
**Preconditions:** EUR is disabled; existing amounts in EUR exist.
**Steps:**
1. Attempt to create a new price in EUR.
2. Verify the existing EUR amounts are handled per the transition plan.
**Expected Result:** New pricing in EUR is blocked; the existing EUR amounts are handled per the transition plan — not silently dropped.
**Priority:** High

### TC-SA-04-02-018 — Exchange rates are not manually editable ad hoc; changes are logged
**Type:** Negative
**Covers:** 2.2 → Rule: exchange rates have a defined source and cadence; they are not manually editable ad hoc (changes are logged)
**Preconditions:** The rate source and cadence are configured.
**Steps:**
1. Attempt to manually edit an exchange rate ad hoc.
2. Verify the attempt is blocked or the change is logged.
**Expected Result:** The ad hoc manual edit is blocked (or logged) — rates come from the defined source and cadence, not manual edits.
**Priority:** High

## 2.3 Configure Time Zones

### TC-SA-04-02-019 — The default system time zone is set for displays and scheduling where no context applies
**Type:** Positive
**Covers:** 2.3 → Default system time zone (for displays and scheduling where no context applies)
**Preconditions:** The default system time zone is set to UTC.
**Steps:**
1. Verify the default system time zone is UTC.
2. View a system display with no user/context time zone and verify it uses UTC.
**Expected Result:** The default system time zone (UTC) is used for displays and scheduling where no context applies.
**Priority:** High

### TC-SA-04-02-020 — Per-user time zone preference is set at registration or in preferences
**Type:** Positive
**Covers:** 2.3 → Per-user time zone preference (set at registration or in preferences)
**Preconditions:** A user registers in region X (time zone X).
**Steps:**
1. Verify the user's time zone is captured at registration (X).
2. Update the preference in settings and verify the change.
**Expected Result:** The user's time zone is set at registration and can be updated in preferences — the preference is respected.
**Priority:** High

### TC-SA-04-02-021 — Per-context (institute) time zone applies to that context's schedules and displays
**Type:** Positive
**Covers:** 2.3 → Per-context time zone (e.g., an institute's time zone for its schedules); Rule: per-context (institute) time zones apply to that context's schedules and displays
**Preconditions:** Institute A is in time zone A; its schedules are set.
**Steps:**
1. Set Institute A's context time zone to A.
2. View Institute A's schedules and verify they display in time zone A.
**Expected Result:** Institute A's schedules and displays use its context time zone (A) — the per-context setting works.
**Priority:** High

### TC-SA-04-02-022 — Display rules: times are rendered in the viewer's/context's time zone
**Type:** Positive
**Covers:** 2.3 → Display rules: times rendered in the viewer's/context's time zone
**Preconditions:** A scheduled event exists; viewers are in time zones X and Y.
**Steps:**
1. View the event as a viewer in time zone X.
2. View the same event as a viewer in time zone Y.
**Expected Result:** The event renders in X for the X viewer and in Y for the Y viewer — the display rule works per viewer.
**Priority:** High

### TC-SA-04-02-023 — A scheduled event is anchored in absolute time; time zones affect display, not the underlying instant
**Type:** Positive
**Covers:** 2.3 → Scheduling correctness: a scheduled event is anchored in absolute time and displayed per viewer; Rule: times are anchored in absolute time; time zones affect display, not the underlying instant
**Preconditions:** A scheduled event is anchored at a specific absolute instant.
**Steps:**
1. Record the event's absolute anchor.
2. View the event from two different time zones.
3. Verify both displays correspond to the same absolute instant.
**Expected Result:** Both displays correspond to the same absolute instant — the time zone affects only the display, not the underlying time.
**Priority:** Critical

### TC-SA-04-02-024 — Deadline and reporting time-zone consistency: enforcement uses the absolute anchor; reporting boundaries use a defined time zone
**Type:** Positive
**Covers:** 2.3 → Deadline and reporting time-zone consistency; Rule: scheduling and deadline enforcement use the absolute anchor, so time-zone display never changes when something happens; Rule: reporting date boundaries use a defined time zone, so "daily" and "monthly" are unambiguous
**Preconditions:** A course deadline is anchored in absolute time; a daily report is configured with a defined time zone.
**Steps:**
1. Verify the deadline displays in the student's time zone but enforcement uses the absolute anchor.
2. Verify the daily report's date boundary uses the configured time zone consistently.
**Expected Result:** The deadline enforcement uses the absolute anchor (no off-by-region errors); the daily report boundary is well-defined by the configured time zone.
**Priority:** Critical

### TC-SA-04-02-025 — Time-zone configuration changes are audit-logged
**Type:** Positive
**Covers:** 2.3 → Audit logging of time-zone configuration changes; Rule: time-zone configuration changes are audit-logged
**Preconditions:** The default system time zone is changed.
**Steps:**
1. Open the audit trail and filter by "time zone".
2. Verify the entry shows the setting changed and the timestamp.
**Expected Result:** The time-zone configuration change is audit-logged with the setting changed and the timestamp.
**Priority:** Critical

### TC-SA-04-02-026 — A missing per-user time zone falls back to the default system time zone
**Type:** Negative
**Covers:** 2.3 → Rule: a missing per-user time zone falls back to the default system time zone
**Preconditions:** A user has no time zone preference; the default system time zone is UTC.
**Steps:**
1. Log in as the user with no time zone preference.
2. Verify times display in the default system time zone (UTC).
**Expected Result:** The user's displays fall back to the default system time zone (UTC) — no missing or broken time zone.
**Priority:** High
