From 06370d8676d6325756d6c82bb3dd12067d74f2da Mon Sep 17 00:00:00 2001 From: German Khokhlov Date: Wed, 28 Oct 2026 13:28:23 +0400 Subject: [PATCH] i18n(ar): mirror the layout right to left MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The title, style indicator and both rails swap sides in RTL through logical properties (inset-inline-*, margin-inline-*, border-inline-start); LTR computes the same values. The Display/Context rail keeps its physical `right` for the credit-clearance model and swaps in rtl.css above 720px. - rtl.css: no letter-spacing on Arabic (it tears joined letters apart); Noto Sans Arabic leads the Arabic font stacks so words are not set in a fixed-pitch fallback; the intel HUD and cockpit instruments stay a left-to-right instrument overlay; media transport and the radio dial stay left to right; feed headlines and station names take their own direction; the moved rail's arrows flip. - isolate(): a quantity in RTL text (2.7 كم, -18.0°) is wrapped in first-strong isolates so its digits do not join a neighbouring Latin run. Co-Authored-By: Claude Opus 5.5 --- index.html | 2 +- src/i18n/ar-display.test.mjs | 10 ++- src/i18n/index.js | 10 +++ src/i18n/locale.js | 5 ++ src/ui/cctvCalibration.js | 7 +- src/ui/cyberTheme.test.mjs | 4 +- src/ui/styles/cockpit.css | 19 +++--- src/ui/styles/cyber.css | 14 ++-- src/ui/styles/foundation.css | 8 +-- src/ui/styles/layers.css | 12 ++-- src/ui/styles/mobile-shell.css | 2 +- src/ui/styles/responsive.css | 6 +- src/ui/styles/rtl.css | 118 +++++++++++++++++++++++++++++++++ src/ui/unitLabels.js | 4 +- style.css | 1 + 15 files changed, 183 insertions(+), 39 deletions(-) create mode 100644 src/ui/styles/rtl.css diff --git a/index.html b/index.html index 26cf734fb..86e5fd693 100644 --- a/index.html +++ b/index.html @@ -21,7 +21,7 @@ - +