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.

Event cards in Hebrew: title_he, text_he and options' text_he (Fixes #1064) (#1091)

Beri3012973b2333
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c86fe026f..d135fb906 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -88,6 +88,11 @@ adds a line under **Unreleased**; CI's `Changelog` job checks this (see `CONTRIB
- The Cabinet, Budget, Defence, Why, How to play and Settings screens each gain an X in the header that closes
them (the same close as Escape): a phone has no Escape key, and re-tapping the lit rail button was the only way
out (v0.1.1 playtest feedback).
+- Event cards in Hebrew (#1064, owner decision on #55): an event can carry `title_he`, `text_he` and each option's
+ `text_he`, all or none, in Hebrew letters, with `text_he_review: agent-checked` until a native speaker has read them
+ (#564). In the Hebrew UI the card shows them, with the minister's Hebrew name in the placeholder, and keeps the English
+ for any field that has no Hebrew. The Altalena card is the first, an AI translation for the native reviewer; the other
+ cards follow in #1065 and #1066. The content hash moves (an older save warns once); no golden does.
- Up close the kit landmarks (mosques, churches, minarets, Jerusalem's walls, gates and towers, the Dome of the Rock,
Jaffa's clock tower and lighthouse, Ramla's White Tower, Nahalal's hall, Revivim's walled lookout) stand at the
models' world scale too, real size x 24 (`SettlementKits.ModelScale`), instead of the kits' 60x and 100x that towered
diff --git a/content/events/altalena.yaml b/content/events/altalena.yaml
index ceb132561..90b8555f4 100644
--- a/content/events/altalena.yaml
+++ b/content/events/altalena.yaml
@@ -2,6 +2,12 @@
id: altalena
title: The Altalena
text: 'The Altalena, a ship carrying arms for the Irgun, is due off the coast within days. Begin asks that a fifth of the arms go to the Irgun''s battalion in Jerusalem and the rest to Irgun battalions inside the IDF. {defense_minister} must decide.'
+# For the native reviewer (#564): the Hebrew below (#1064) is an AI translation of the English, not yet read by a
+# person. Names as he.wiki "פרשת אלטלנה" writes them (אלטלנה, אצ"ל, צה"ל, בגין; its "חמישית מהנשק" for the fifth).
+# "ההחלטה בידי" keeps the sentence the same for a minister of either gender.
+title_he: אלטלנה
+text_he: 'אלטלנה, אונייה המובילה נשק לאצ"ל, צפויה להגיע לחוף בתוך ימים. בגין מבקש שחמישית מהנשק תועבר לגדוד האצ"ל בירושלים והשאר לגדודי האצ"ל בתוך צה"ל. ההחלטה בידי {defense_minister}.'
+text_he_review: agent-checked
anchor: hard
tags: [security, war-casualties]
office: defense_minister
@@ -26,6 +32,7 @@ to: 1948-06-23
options:
- id: enforce
text: Grant the Jerusalem share, demand the rest for the IDF, and use force if necessary
+ text_he: 'לאשר את החלק לירושלים, לדרוש את השאר לצה"ל ולהשתמש בכוח אם יהיה צורך'
historical: true
recommended: true
effects:
@@ -35,6 +42,7 @@ options:
# Begin's second request, put on the table and rejected (en.wiki "Altalena Affair"; the Etzel account; the Izkor page
# records the dispute over whether the arms went to the IDF as a whole or mainly to Irgun units).
text: Grant both requests, arming Irgun battalions inside the IDF
+ text_he: 'לאשר את שתי הבקשות ולחמש את גדודי האצ"ל בתוך צה"ל'
# Who proposed it: research_notes/Alternate timelines/roads-checked.md (checked by the owner, 19 October 2026).
alternative:
basis: debated
diff --git a/content/schema/event.schema.json b/content/schema/event.schema.json
index 1e42159e7..2a69a7ad7 100644
--- a/content/schema/event.schema.json
+++ b/content/schema/event.schema.json
@@ -72,6 +72,9 @@
"kind": { "enum": ["historical", "consequence", "reconvergence"], "description": "Default historical. consequence: a soft card that exists only on a road not taken (R-ALT-005 to R-ALT-008). reconvergence: a real outside event that may carry variants (R-ALT-010)." },
"title": { "type": "string", "minLength": 1, "description": "May contain office placeholders such as {prime_minister}." },
"text": { "type": "string", "minLength": 1, "description": "May contain office placeholders. No invented quotes." },
+ "title_he": { "type": "string", "minLength": 1, "description": "The title in Hebrew (#1064). An event with Hebrew text has title_he, text_he and every option's text_he, or none of them (the UI keeps the English). Same placeholders as the English." },
+ "text_he": { "type": "string", "minLength": 1, "description": "The text in Hebrew (#1064): the English meaning, no added facts. Same placeholders as the English." },
+ "text_he_review": { "type": "string", "enum": ["agent-checked"], "description": "Review flag of the event's Hebrew text (title_he, text_he and the options' text_he). agent-checked: an AI agent wrote or checked the text and no person has read it yet (CONTENT_POLICY section 2, rule 6; review in #564). Leave out once a native speaker has reviewed it." },
"tags": { "type": "array", "items": { "type": "string" }, "description": "holocaust, terror, massacre, war-casualties and displacement are sensitive. A displacement option cannot raise Money, Food, Arms, Social cohesion, International Support or score (R-EFX-007), and the event must be sensitivity-reviewed before release (R-GATE-001)." },
"anchor": { "enum": ["hard", "soft"], "description": "Default soft. A hard anchor needs a historical option." },
"office": { "$ref": "#/definitions/id", "description": "The office the event goes to when the player does not answer." },
@@ -104,6 +107,7 @@
"properties": {
"id": { "$ref": "#/definitions/id" },
"text": { "type": "string", "minLength": 1 },
+ "text_he": { "type": "string", "minLength": 1, "description": "The option's text in Hebrew (#1064), under the event's text_he_review." },
"historical": { "type": "boolean" },
"recommended": { "type": "boolean" },
"rejoin": { "$ref": "#/definitions/id", "description": "A consequence card's option that returns the course to the record of this event (R-ALT-009)." },
diff --git a/docs/WRITING_EVENTS.md b/docs/WRITING_EVENTS.md
index 47f4d3fd0..8e8a4e8b7 100644
--- a/docs/WRITING_EVENTS.md
+++ b/docs/WRITING_EVENTS.md
@@ -31,6 +31,8 @@ schema too, or that test fails. Keep the comment when you copy a file.
| `id` | yes | Unique across all events. Lowercase letters, digits and underscores, starting with a letter. |
| `title` | yes | The card title. May contain office placeholders. |
| `text` | yes | The card body. May contain office placeholders. |
+| `title_he` | no | The title in Hebrew (#1064), shown in the Hebrew UI; the English shows where a Hebrew field is missing. An event has `title_he`, `text_he` and every option's `text_he`, or none, all in Hebrew letters, with the same placeholders as the English. Beside them `text_he_review: agent-checked` while no native speaker has read the Hebrew (#564); remove it once one has. |
+| `text_he` | no | The body in Hebrew (#1064). See `title_he`. |
| `anchor` | no (default `soft`) | `hard` or `soft`. See below. |
| `tags` | no | A list of free-form labels. Five are sensitive. See below. |
| `office` | no | The office id of the minister the event goes to when the player does not answer it. |
@@ -212,6 +214,7 @@ Each option has:
|---|---|---|
| `id` | yes | Unique within the event. Same shape as an event id. |
| `text` | yes in practice | What the player reads on the button. May use placeholders. |
+| `text_he` | with the event's `title_he` | The button's text in Hebrew (#1064). |
| `historical` | no (default false) | `true` on the option that matches what really happened. At most one per event. |
| `recommended` | no (default false) | The option a competent minister picks when the event is delegated. |
| `effects` | no | A list of `{ target, delta }`. |
diff --git a/sim/Statecraft.Sim.Tests/EventHebrewTests.cs b/sim/Statecraft.Sim.Tests/EventHebrewTests.cs
new file mode 100644
index 000000000..56c25ac32
--- /dev/null
+++ b/sim/Statecraft.Sim.Tests/EventHebrewTests.cs
@@ -0,0 +1,65 @@
+using System.Collections.Generic;
+using System.Linq;
+using Statecraft.Sim;
+
+/// <summary>Hebrew text on event cards (#1064, owner decision on #55): title_he, text_he and each option's text_he beside
+/// the English, all or none, with text_he_review: agent-checked until a native speaker has read them (#564).</summary>
+public class EventHebrewTests
+{
+ const string Title = "title: Drought\n", Ration = " text: Ration water\n", Wait = " text: Wait for rain\n";
+ const string TitleHe = "title_he: בצורת\ntext_he: '{finance_minister} מדווח על בצורת.'\ntext_he_review: agent-checked\n";
+
+ static string Hebrew => ValidationTests.Event
+ .Replace(Title, Title + TitleHe)
+ .Replace(Ration, Ration + " text_he: לקצוב מים\n")
+ .Replace(Wait, Wait + " text_he: לחכות לגשם\n");
+
+ static Content Load(string ev) => ContentLoader.Load(Fixture.Write(events: new Dictionary<string, string> { ["drought.yaml"] = ev }));
+
+ static ContentException Bad(string ev) => Assert.Throws<ContentException>(() => Load(ev));
+
+ [Fact]
+ public void TheHebrewTextLoadsBesideTheEnglish()
+ {
+ var e = Load(Hebrew).Events.Single(x => x.Id == "drought");
+ Assert.Equal(("בצורת", "{finance_minister} מדווח על בצורת."), (e.TitleHe, e.TextHe));
+ Assert.Equal(new[] { "לקצוב מים", "לחכות לגשם" }, e.Options.Select(o => o.TextHe));
+ Assert.Equal((HebrewReview.AgentChecked, true), (e.TextHeReview, e.TextHeReviewGiven));
+ Assert.Equal("Drought", e.Title);
+ }
+
+ [Fact]
+ public void AnEventWithoutHebrewLoadsWithEmptyFields()
+ {
+ var e = Load(ValidationTests.Event).Events.Single(x => x.Id == "drought");
+ Assert.Equal(("", "", false), (e.TitleHe, e.TextHe, e.TextHeReviewGiven));
+ Assert.All(e.Options, o => Assert.Equal("", o.TextHe));
+ }
+
+ [Theory]
+ // All or none: a card half in Hebrew would mix the languages.
+ [InlineData("title_he: בצורת\n", "", "events[drought].title_he", "required")]
+ [InlineData("text_he: '{finance_minister} מדווח על בצורת.'\n", "", "events[drought].text_he", "required")]
+ [InlineData(" text_he: לחכות לגשם\n", "", "events[drought].options[wait].text_he", "required")]
+ [InlineData("title_he: בצורת\ntext_he: '{finance_minister} מדווח על בצורת.'\n", "", "events[drought].title_he", "required")]
+ // In Hebrew letters, with placeholders that resolve.
+ [InlineData("title_he: בצורת\n", "title_he: Drought\n", "events[drought].title_he", "Hebrew letters")]
+ [InlineData(" text_he: לקצוב מים\n", " text_he: '{nobody} קוצב מים'\n", "events[drought].options[ration].text_he", "placeholder")]
+ // The review flag is agent-checked or absent.
+ [InlineData("text_he_review: agent-checked\n", "text_he_review: reviewed\n", "events[drought].text_he_review", "agent-checked")]
+ public void BadHebrewIsAContentError(string from, string to, string field, string message)
+ {
+ Assert.Contains(from, Hebrew);
+ var ex = Bad(Hebrew.Replace(from, to));
+ Assert.Equal("events/drought.yaml", ex.File);
+ Assert.Equal(field, ex.Field);
+ Assert.Contains(message, ex.Message);
+ }
+
+ [Fact]
+ public void AReviewFlagNeedsTheHebrewText()
+ {
+ var ex = Bad(ValidationTests.Event.Replace(Title, Title + "text_he_review: agent-checked\n"));
+ Assert.Equal("events[drought].text_he", ex.Field);
+ }
+}
diff --git a/sim/Statecraft.Sim/Cabinet.cs b/sim/Statecraft.Sim/Cabinet.cs
index 3f1910130..1b9601980 100644
--- a/sim/Statecraft.Sim/Cabinet.cs
+++ b/sim/Statecraft.Sim/Cabinet.cs
@@ -66,11 +66,15 @@ namespace Statecraft.Sim
return a != null ? c.People.First(p => p.Id == a.Person) : Offices.Holder(c, office, d);
}
- /// <summary>Offices.Fill with the player's appointments: {office_id} becomes the name of whoever holds it.</summary>
- public static string Fill(Content c, GameState s, string text, DateTime date) =>
+ /// <summary>Offices.Fill with the player's appointments: {office_id} becomes the name of whoever holds it, as
+ /// <paramref name="name"/> gives it (the Hebrew card text wants the Hebrew name, #1064), or else the English one.</summary>
+ public static string Fill(Content c, GameState s, string text, DateTime date, Func<Person, string>? name = null) =>
Offices.Placeholder.Replace(text, m =>
- Holder(c, s, m.Groups[1].Value, date)?.Name
- ?? throw new InvalidOperationException(FormattableString.Invariant($"no holder of '{m.Groups[1].Value}' on {date:yyyy-MM-dd}")));
+ {
+ var p = Holder(c, s, m.Groups[1].Value, date)
+ ?? throw new InvalidOperationException(FormattableString.Invariant($"no holder of '{m.Groups[1].Value}' on {date:yyyy-MM-dd}"));
+ return name == null ? p.Name : name(p);
+ });
/// <summary>Every playable office that exists on the state's date, in offices.yaml order, with its holder (null = vacant).
/// A player's appointee is the seat's only holder (an appointment from a save made before an office allowed several
diff --git a/sim/Statecraft.Sim/Content.cs b/sim/Statecraft.Sim/Content.cs
index 42cd92f76..b898e0a31 100644
--- a/sim/Statecraft.Sim/Content.cs
+++ b/sim/Statecraft.Sim/Content.cs
@@ -853,6 +853,8 @@ namespace Statecraft.Sim
{
public string Id { get; set; } = "";
public string Text { get; set; } = "";
+ /// <summary>The option's text in Hebrew (#1064), under the event's text_he_review; empty when the event has none.</summary>
+ public string TextHe { get; set; } = "";
public bool Historical { get; set; }
public bool Recommended { get; set; }
public List<OptionEffect> Effects { get; set; } = new List<OptionEffect>();
@@ -918,6 +920,16 @@ namespace Statecraft.Sim
public string Kind { get; set; } = EventKinds.Historical;
public string Title { get; set; } = "";
public string Text { get; set; } = "";
+ /// <summary>The title and text in Hebrew (#1064, owner on #55: all content text in Hebrew now). Both empty when the event
+ /// has no Hebrew; otherwise every option has its <see cref="EventOption.TextHe"/> too (the loader checks). The UI shows
+ /// the English wherever one is empty.</summary>
+ public string TitleHe { get; set; } = "";
+ public string TextHe { get; set; } = "";
+ /// <summary>"agent-checked" while the Hebrew text waits for a native speaker's review (#564); empty once reviewed.</summary>
+ public string TextHeReview { get => textHeReview ?? ""; set => textHeReview = value ?? ""; }
+ /// <summary>True when the file has the key at all, even blank: a blank flag is an error, not a review.</summary>
+ [YamlIgnore] public bool TextHeReviewGiven => textHeReview != null;
+ string? textHeReview;
public List<string> Tags { get; set; } = new List<string>();
public string Anchor { get; set; } = "soft";
public string Office { get; set; } = "";
diff --git a/sim/Statecraft.Sim/ContentLoader.cs b/sim/Statecraft.Sim/ContentLoader.cs
index a654317dd..24e2b7430 100644
--- a/sim/Statecraft.Sim/ContentLoader.cs
+++ b/sim/Statecraft.Sim/ContentLoader.cs
@@ -334,6 +334,7 @@ namespace Statecraft.Sim
// Event files (content/events/*.yaml), one GameEvent each. Keys, for content authors:
// id, title, text text may name office holders only through {office_id} placeholders, which
// must have a holder on every day of the window
+ // title_he, text_he, text_he_review the Hebrew title and text (#1064); with them every option has a text_he
// anchor: hard | soft hard needs a historical option; in Historical mode it resolves to it
// tags: [...] holocaust, terror, massacre, war-casualties, displacement are sensitive (no gain)
// office the minister the event is delegated to
diff --git a/sim/Statecraft.Sim/EventRules.cs b/sim/Statecraft.Sim/EventRules.cs
index 8424f30bc..7e82e0eb3 100644
--- a/sim/Statecraft.Sim/EventRules.cs
+++ b/sim/Statecraft.Sim/EventRules.cs
@@ -39,6 +39,7 @@ namespace Statecraft.Sim
throw new ContentException(e.File, F("office"), "historical-only titles cannot be delegated events");
CheckPlaceholders(c, e, F("title"), e.Title, offices);
CheckPlaceholders(c, e, F("text"), e.Text, offices);
+ CheckHebrew(c, e, offices);
// Chapters design 3.2: an event may only name model records that are active for its whole window.
void Active(string field, string id)
{
@@ -381,6 +382,29 @@ namespace Statecraft.Sim
return null;
}
+ /// <summary>An event's Hebrew text (#1064): title_he, text_he and every option's text_he, all or none (a card half in
+ /// Hebrew would mix the languages), in Hebrew letters, with placeholders that resolve as the English ones must.
+ /// text_he_review is agent-checked until a native speaker has read the text (#564), and needs the text.</summary>
+ static void CheckHebrew(Content c, GameEvent e, HashSet<string> offices)
+ {
+ string F(string field) => $"events[{e.Id}].{field}";
+ if (e.TextHeReviewGiven && e.TextHeReview != HebrewReview.AgentChecked)
+ throw new ContentException(e.File, F("text_he_review"), $"must be {HebrewReview.AgentChecked} (pending a native speaker's review, #564), or left out once a person has reviewed the text");
+ var fields = new List<(string Field, string Value)> { ("title_he", e.TitleHe), ("text_he", e.TextHe) };
+ fields.AddRange(e.Options.Select(o => ($"options[{o.Id}].text_he", o.TextHe)));
+ if (fields.All(x => x.Value == ""))
+ {
+ if (e.TextHeReviewGiven) throw new ContentException(e.File, F("text_he"), "required: text_he_review is set but the event has no Hebrew text");
+ return;
+ }
+ foreach (var (field, value) in fields)
+ {
+ if (value == "") throw new ContentException(e.File, F(field), "required: an event with Hebrew text has it for its title, its text and every option");
+ if (!value.Any(ch => ch >= '\u05D0' && ch <= '\u05EA')) throw new ContentException(e.File, F(field), "must be Hebrew, in Hebrew letters");
+ CheckPlaceholders(c, e, F(field), value, offices);
+ }
+ }
+
static void CheckPlaceholders(Content c, GameEvent e, string field, string text, HashSet<string> offices)
{
if (Offices.Placeholder.Replace(text, "").IndexOfAny(new[] { '{', '}' }) >= 0)
diff --git a/unity/Assets/Scripts/UI/EventCardPresenter.cs b/unity/Assets/Scripts/UI/EventCardPresenter.cs
index 07f3a6a24..7ebcbfb8a 100644
--- a/unity/Assets/Scripts/UI/EventCardPresenter.cs
+++ b/unity/Assets/Scripts/UI/EventCardPresenter.cs
@@ -230,10 +230,16 @@ namespace Statecraft.Game.UI
image.style.backgroundPositionY = new BackgroundPosition(BackgroundPositionKeyword.Top,
new Length(PortraitFraming.PositionYPercent(portrait.width, portrait.height, PortraitWidth, PortraitHeight, entry!.Value.focusY), LengthUnit.Percent));
card.Q<Label>("event-draft").style.display = e.Status == "draft" ? DisplayStyle.Flex : DisplayStyle.None;
- card.Q<Label>("event-title").text = EventSystem.Title(c, s, e);
+ // The card in the UI's language (#1064): in Hebrew a field shows the event's Hebrew text where it has one, with
+ // the ministers' Hebrew names in its placeholders, and the English where it has none (fail open). A variant
+ // (R-ALT-010) has no Hebrew, so a card on a road not taken keeps its variant's English.
+ var variant = Timeline.Variant(c, s, e);
+ bool hebrew = text["ui.lang"] == UiLanguage.Hebrew;
+ string Local(string english, string he) => hebrew && he != "" ? Cabinet.Fill(c, s, he, date, p => ContentNames.Of(text, p)) : english;
+ card.Q<Label>("event-title").text = Local(EventSystem.Title(c, s, e), variant == null || variant.Title == "" ? e.TitleHe : "");
var office = holder == null ? null : c.Offices.First(o => o.Id == e.Office);
card.Q<Label>("event-office").text = holder == null ? "" : text.Format("event.office", ContentNames.Of(text, office!, holder), ContentNames.Of(text, holder));
- card.Q<Label>("event-text").text = EventSystem.Render(c, s, e);
+ card.Q<Label>("event-text").text = Local(EventSystem.Render(c, s, e), variant == null ? e.TextHe : "");
var objective = card.Q<Label>("event-objective"); // an objective card's line (#380); none on any other card
objective.text = ObjectiveLine(c, s, e, text);
objective.style.display = objective.text.Length == 0 ? DisplayStyle.None : DisplayStyle.Flex;
@@ -246,7 +252,7 @@ namespace Statecraft.Game.UI
foreach (var o in e.Options)
{
var option = o;
- var label = Cabinet.Fill(c, s, o.Text, date);
+ var label = Local(Cabinet.Fill(c, s, o.Text, date), o.TextHe);
var b = new Button(() => Choose(e, option)) { name = "option-" + o.Id, text = price > 0 ? text.Format("event.option_cost", label, price) : label };
b.AddToClassList(OptionClass);
b.SetEnabled(!unpaid);
diff --git a/unity/Assets/Tests/EditMode/EventCardTests.cs b/unity/Assets/Tests/EditMode/EventCardTests.cs
index e17bf6461..762530040 100644
--- a/unity/Assets/Tests/EditMode/EventCardTests.cs
+++ b/unity/Assets/Tests/EditMode/EventCardTests.cs
@@ -66,6 +66,71 @@ public class EventCardTests
Assert.AreEqual("שרת העבודה: גולדה מאיר", ui.Q<Label>("event-office").text);
}
+ /// <summary>The Altalena card pending on 15 June 1948 (its window opens), shown in <paramref name="text"/>'s language.</summary>
+ static (UiTestKit ui, GameEvent e) Altalena(UiText text, System.Action<GameEvent> edit = null, System.Action<GameState> state = null)
+ {
+ var c = ContentLoader.Load(Paths.Content);
+ var e = c.Events.First(x => x.Id == "altalena");
+ edit?.Invoke(e);
+ var g = GameSession.New(c, GoldenRun.Seed, Mode.Historical);
+ g.State.Date = new System.DateTime(1948, 6, 15);
+ g.State.PendingEvents.Clear(); g.State.PendingEvents.Add(e.Id);
+ state?.Invoke(g.State);
+ var ui = new UiTestKit();
+ new EventCardPresenter(ui.Root, new SimBridge(g, text), text, null);
+ return (ui, e);
+ }
+
+ /// <summary>#1064: in Hebrew the card shows the event's title_he, text_he and options' text_he, with the minister's
+ /// Hebrew name in the placeholder.</summary>
+ [Test]
+ public void InHebrewTheCardShowsTheEventsHebrewText()
+ {
+ var (ui, e) = Altalena(He);
+ using (ui)
+ {
+ Assert.AreEqual("אלטלנה", ui.Q<Label>("event-title").text);
+ Assert.AreEqual(e.TextHe.Replace("{defense_minister}", "דוד בן-גוריון"), ui.Q<Label>("event-text").text);
+ foreach (var o in e.Options) StringAssert.Contains(o.TextHe, ui.Q<Button>("option-" + o.Id).text);
+ }
+ }
+
+ /// <summary>#1064: a Hebrew field that is empty falls back to the English, field by field (fail open); the English UI
+ /// never shows the Hebrew.</summary>
+ [Test]
+ public void AMissingHebrewFieldFallsBackToEnglishAndTheEnglishUiKeepsEnglish()
+ {
+ var (ui, e) = Altalena(He, x => { x.TitleHe = ""; x.Options.First(o => o.Id == "compromise").TextHe = ""; });
+ using (ui)
+ {
+ Assert.AreEqual("The Altalena", ui.Q<Label>("event-title").text);
+ StringAssert.StartsWith("אלטלנה, ", ui.Q<Label>("event-text").text);
+ StringAssert.Contains("Grant both requests, arming Irgun battalions inside the IDF", ui.Q<Button>("option-compromise").text);
+ StringAssert.Contains(e.Options.First(o => o.Id == "enforce").TextHe, ui.Q<Button>("option-enforce").text);
+ }
+ var (en, _) = Altalena(Text);
+ using (en)
+ {
+ Assert.AreEqual("The Altalena", en.Q<Label>("event-title").text);
+ StringAssert.EndsWith("David Ben-Gurion must decide.", en.Q<Label>("event-text").text);
+ }
+ }
+
+ /// <summary>#1064: a variant (R-ALT-010) has no Hebrew, so on a road not taken the card keeps the variant's English
+ /// text; a variant with no title of its own keeps the event's title, so that stays Hebrew.</summary>
+ [Test]
+ public void InHebrewAVariantKeepsItsEnglishText()
+ {
+ var when = new EventRequirement { Event = "probe", Option = "other" };
+ var (ui, _) = Altalena(He, x => x.Variants.Add(new EventVariant { When = { when }, Text = "The course differs." }),
+ s => s.ChosenOptions["probe"] = "other");
+ using (ui)
+ {
+ Assert.AreEqual("אלטלנה", ui.Q<Label>("event-title").text);
+ Assert.AreEqual("The course differs.", ui.Q<Label>("event-text").text);
+ }
+ }
+
[Test]
public void AMinisterWithoutAPortraitShowsNoImage()
{