i18n(ar): apply review round 1

Findings from the astra, sol and fable reviews of the Arabic screenshots:

- Wording: forecast valid time is «عند», not an expiry; acres are آكر, not
  feddans; live layers are «تتبّع … المباشر» (not "direct flights"); the
  straight-ahead lane, turboprop, call sign, reconcile, proximity, retrying,
  count agreement (colon form, fixed counts, ي for compact day ages) and
  smaller fixes. Guide and glossary updated.
- Right to left: the scene editor's JSON fields are LTR; canvas map cards
  draw with LTR geometry and an Arabic face; whiteboard callouts anchor
  inside their cards; HDG/FOV keep their values; the cyclone timestamp no
  longer splits its date; bare-number counters read 01 / 25, translated
  ones say «من».
- Built-in shot titles of the Nepal shot pack's bootstrap shots localize
  (the applied pack vouches for them), in every language.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Opus 5.5 committed 2026-10-28 17:42:24 +04:00
1 parent 91f1f80e60
commit 4f44a17b44
12 files changed
+226 -103

No files matched your search

+14
View File
@@ -53,6 +53,20 @@ export function isolate(text) {
return isRtlLocale(currentLocale) ? `\u2068${text}\u2069` : String(text);
}
const CODE_BEFORE_VALUE =
/(?<![\p{L}\p{N}])([A-Z][A-Z0-9/]+) (\u2068[^\u2068\u2069]*\u2069)/gu;
/**
* A Latin code and the isolated value after it ("HDG 68\u00b0") as one unit in
* right-to-left text. Two codes in a row (HDG 68\u00b0 \u00b7 FOV 44\u00b0) otherwise form a
* single left-to-right run and the second code ends up beside the first
* value. Applies to t() output; a no-op outside RTL locales.
*/
export function keepCodesWithValues(text) {
if (!isRtlLocale(currentLocale)) return text;
return String(text).replace(CODE_BEFORE_VALUE, '\u2068$1 $2\u2069');
}
/**
* Switch the active locale. Pure state change: call applyDocumentLanguage /
* applyDocumentTranslations to reflect it in the DOM.