Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

UI: the Hebrew info panel's queued and built lines name the map action in Hebrew (Fixes #929) (#963)

Beridc6e2769ba8d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c0ea51e37..3541cc0a5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,6 +35,10 @@ adds a line under **Unreleased**; CI's `Changelog` job checks this (see `CONTRIB
- In the Hebrew UI the info panel's build line is a date label with no verb, "{0} – תאריך הקמה: {1}" (refs #701), since
the fixed masculine "נבנה" read wrong for a feminine name ("מעברה נבנה"). Beri approved the wording as a native speaker.
English is unchanged.
+- Under `?lang=he` the info panel's queued and built lines name the map action in Hebrew ("ניתנה פקודה: מעברה, בסיום
+ התור", "מעברה – תאריך הקמה: אוגוסט 1950"), from #924's `info.map_action.*` strings, instead of the content's English
+ name. The built line no longer runs left to right or wraps "1950" in the panel. No new strings; English is unchanged
+ (Fixes #929).
- `EventImageMappingTests.EveryPictureHasItsProvenanceRow` no longer lists `first_new_yishuv` as waiting for the owner's sign-off. Its `ASSETS.yaml` row became `verified` in #913 (owner, 17 Oct 2026, "Approve both", #879), so the test failed on main.
- In the Hebrew UI the map's name pills show each row's `name_he`: the game settlements ("נהלל", "תל אביב") and
the 1948 localities that have one. The thirteen localities with no `name_he` keep their English name, and the
diff --git a/unity/Assets/Scripts/UI/InfoPanelPresenter.cs b/unity/Assets/Scripts/UI/InfoPanelPresenter.cs
index 35db66d89..e29152d20 100644
--- a/unity/Assets/Scripts/UI/InfoPanelPresenter.cs
+++ b/unity/Assets/Scripts/UI/InfoPanelPresenter.cs
@@ -262,8 +262,10 @@ namespace Statecraft.Game.UI
ShowLocalities(localitiesAt == null ? "" : LocalitiesText(text, localitiesAt(q, r)));
var here = MapActions.At(s, q, r);
var queued = bridge.QueuedLike(new MapAction(MapActions.Housing, q, r)) as MapAction;
- placement.text = queued != null ? text.Format("info.queued", PlayerText.Capitalised(PlayerText.MapAction(c, queued.Action)))
- : here != null ? text.Format("info.built", PlayerText.Capitalised(PlayerText.MapAction(c, here.Action)),
+ // The action's name from the UI strings (#929): PlayerText.MapAction is the content's English name (#924's tools
+ // test keeps the English string equal to it).
+ placement.text = queued != null ? text.Format("info.queued", PlayerText.Capitalised(text["info.map_action." + queued.Action]))
+ : here != null ? text.Format("info.built", PlayerText.Capitalised(text["info.map_action." + here.Action]),
Control1948.LineDateText(here.Date.ToString("yyyy-MM", System.Globalization.CultureInfo.InvariantCulture), k => text[k])) : ""; // PlayerText.Month is always English (#701)
var campReason = MapActions.CheckReason(c, s, MapActions.TransitCamp, q, r);
var housingReason = MapActions.CheckReason(c, s, MapActions.Housing, q, r);
diff --git a/unity/Assets/Tests/EditMode/MapActionUiTests.cs b/unity/Assets/Tests/EditMode/MapActionUiTests.cs
index 76659cf02..478a0d0b2 100644
--- a/unity/Assets/Tests/EditMode/MapActionUiTests.cs
+++ b/unity/Assets/Tests/EditMode/MapActionUiTests.cs
@@ -118,6 +118,25 @@ public class MapActionUiTests
StringAssert.DoesNotContain("נבנה", line, "no gendered verb");
}
+ /// <summary>#929: under Hebrew the queued and built lines name the action from #924's info.map_action strings, not the
+ /// content's English name. English is pinned by ATransitCampIsOrderedAndBuiltAtEndTurn.</summary>
+ [Test]
+ public void InHebrewTheQueuedAndBuiltLinesNameTheActionInHebrew()
+ {
+ var he = UiText.Parse(AssetDatabase.LoadAssetAtPath<TextAsset>(UiPaths.StringsHebrew).text, "strings.he.yaml");
+ using var ui = new UiTestKit();
+ var g = GameSession.New(C, GoldenRun.Seed, Mode.Historical);
+ while (g.State.Date < new DateTime(1950, 8, 1)) g.Step(HistoricalAI.Commands(C, g.State));
+ var bridge = new SimBridge(g, he);
+ var info = new InfoPanelPresenter(ui.Root, bridge, he, Towns.ToDictionary(t => t.Id, t => t.Name));
+ var tlv = C.SettlementHexes.Single(s => s.Id == "tel_aviv");
+ info.Show(tlv.Q, tlv.R);
+ ui.Press("build-camp");
+ Assert.AreEqual("ניתנה פקודה: מעברה, בסיום התור", ui.Q<Label>("info-placement").text);
+ bridge.EndTurn();
+ Assert.AreEqual("מעברה – תאריך הקמה: אוגוסט 1950", ui.Q<Label>("info-placement").text);
+ }
+
/// <summary>The minimap's painted relief (tools/minimap_bake.py) is north up over the hex grid's bounds: sea off Tel Aviv
/// and in the Gulf of Aqaba, land in the hills and the Negev. Read from the PNG itself (the imported texture is not
/// readable on the CPU).</summary>