# RTL UI Mirroring

This document defines RTL UI mirroring for `TODOS.phase-72.72.11.2.5`. It covers
Arabic and Hebrew layout mirroring for HUD elements, menus, and navigation
surfaces.

The tracked contract is
`V2/ue/Content/Localization/V2/RTLUiMirroring_V2_Contract.json`. Mirroring rules
live in `V2/ue/Content/Localization/V2/RTL/RTLUiMirroringRules_V2.json`, and the
deterministic generated report lives in
`V2/ue/Content/Localization/V2/RTL/RTLUiMirroringReport_V2.json`.

## Mirroring Scope

RTL UI mirroring requires the localized UI stack to:

- Mirror HUD elements by swapping horizontal anchors, reversing horizontal
  clusters, preserving safe zones, and keeping gameplay world-direction
  indicators semantically correct.
- Mirror menus by swapping primary and secondary columns, reversing horizontal
  lists, moving directional icons, and mirroring scrollbars.
- Mirror navigation by swapping left/right focus neighbors and validating focus
  focus order for Arabic and Hebrew.
- Preserve platform input glyph semantics so button prompts remain tied to the
  physical control, not the mirrored visual side.

## Validation

`V2/ue/Tools/generate-v2-rtl-ui-mirroring.py` reads the mirroring rules and the
referenced V2 UI surface contracts, then emits a deterministic report covering
12 surfaces across HUD, menu, and navigation groups.

`V2/ue/Tools/check-v2-rtl-ui-mirroring.py` validates the contract, rules,
generated report, Unreal locale mirroring hooks, documentation, GitHub workflow
wiring, and Horde required gates. The checker also runs a negative case that
removes focus-graph mirroring from a navigation surface and verifies that the
generator fails the broken configuration.
