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.

Content: sourced Hebrew title for the rationing office (Refs #1219, item 5) (#1224)

Beri178369faba9c
diff --git a/changelog.d/1219-rationing-he.md b/changelog.d/1219-rationing-he.md
new file mode 100644
index 000000000..9ca8a5608
--- /dev/null
+++ b/changelog.d/1219-rationing-he.md
@@ -0,0 +1,5 @@
+- The rationing office has a Hebrew title, "שר האספקה והקיצוב" (feminine "שרת האספקה והקיצוב"), from he.wiki's pages on
+ Dov Yosef and the Ministry of Rationing and Supply. It is marked agent-checked for a native read (#564, Refs #1219,
+ item 5); until now the cabinet screen showed the English title in Hebrew mode.
+- The title shows only while the ministry existed, 10 March 1949 to 1 November 1950 (owner ruling on #1224): offices.yaml
+ gains `title_he_from` / `title_he_until`, and from 1 November 1950 the office keeps its English title.
diff --git a/content/offices.yaml b/content/offices.yaml
index 318f155bc..24b868cdb 100644
--- a/content/offices.yaml
+++ b/content/offices.yaml
@@ -11,8 +11,8 @@ offices:
# מדינת ישראל"), the deputies' ("סגנית שר ...", "סגנית ראש הממשלה"), and the Chiefs of Staff's, left as they are
# ("ראש המטה הכללי", "רמטכ״ל ההגנה"), as the Prime Minister's.
# The English titles stay the player's default. Left empty where no
- # source gives a Hebrew title: rationing_minister, a game construct (the office passes from Rationing and Supply to
- # Agriculture and then Trade). Open owner questions: the Trade (order, and the Knesset's "התעשיה") and War Victims
+ # source gives a Hebrew title (none now; rationing_minister's title holds only for 1949-50,
+ # title_he_from/title_he_until, see its row). Open owner questions: the Trade (order, and the Knesset's "התעשיה") and War Victims
# wordings, and whether the Chief of Staff adds "של צה״ל" (PR #558 body).
# title_he_review / title_he_f_review: agent-checked marks a title an AI agent checked against its sources and no
# person has read yet (CONTENT_POLICY section 2, rule 6; owner, 2026-10-15). A native speaker reviews it (#564) and
@@ -73,7 +73,18 @@ offices:
# 10 March 1949 (Knesset, gov1.pdf; he.wiki "דב יוסף", en.wiki "Dov Yosef", checked 2026-10-12). The 26 April 1949 date
# in en.wiki "Rationing and Supply Minister of Israel" and he.wiki "משרד האספקה והקיצוב" is when rationing was decided
# (the austerity event), not when the office began (issue #225).
- - { id: rationing_minister, title: Minister responsible for rationing, from: 1949-03-10 }
+ # Hebrew title (#1219): the title of the first holder, Dov Yosef, "שר האספקה והקיצוב" (he.wiki "דב יוסף"; the ministry's
+ # own page is "משרד האספקה והקיצוב"). The office later passes to Agriculture and Trade, which have no title of their own for
+ # it, so the 1949-50 title is the only sourced one. The feminine form is built, not sourced: the same construction as the
+ # other ministries'; its source row is the ministry's page, which gives the name.
+ # For the native reviewer (#564): both forms are an AI agent's; the Knesset record (gov1.pdf) was unreachable on 2026-10-21.
+ # The title holds only while the ministry existed (owner ruling on PR #1224, 21 October 2026,
+ # https://github.com/eyalgolan/statecraft-israel/pull/1224): title_he_from is the day Dov Yosef took it, "עם הקמת ממשלת
+ # ישראל הראשונה ב־10 במרץ 1949 מונה לשר האספקה והקיצוב" (he.wiki "דב יוסף"); title_he_until is the day it ended, "ב-1
+ # בנובמבר 1950 הוקמה ממשלה חדשה ללא משרד האספקה והקיצוב" (he.wiki "משרד האספקה והקיצוב"; Yosef's infobox: "סיום כהונה
+ # 1 בנובמבר 1950", "התפקיד בוטל"). The ministry's page dates its founding to April 1949, which is the austerity decision
+ # (see above). From 1 November 1950 the UI shows the English title until a Hebrew one for the later office is sourced.
+ - { id: rationing_minister, title: Minister responsible for rationing, title_he: "שר האספקה והקיצוב", title_he_from: 1949-03-10, title_he_until: 1950-11-01, title_he_review: agent-checked, title_he_sources: [{ url: "https://he.wikipedia.org/wiki/דב_יוסף", checked: 2026-10-21 }, { url: "https://he.wikipedia.org/wiki/משרד_האספקה_והקיצוב", checked: 2026-10-21 }], title_he_f: "שרת האספקה והקיצוב", title_he_f_review: agent-checked, title_he_f_sources: [{ url: "https://he.wikipedia.org/wiki/משרד_האספקה_והקיצוב", checked: 2026-10-21 }], from: 1949-03-10 }
# Before the state the chief of staff led the Haganah (Yaakov Dori, from 1 June 1947), so the same post is split at the
# state's founding (issue #80; sources on Dori's two terms in people.yaml). 14 May 1948 is the design's date; the IDF Ordinance
# followed on 26 May 1948. Do not "correct" it to 26 May in a fact-check: it would move the goldens.
diff --git a/content/schema/offices.schema.json b/content/schema/offices.schema.json
index 73370e7e3..d8fcb3052 100644
--- a/content/schema/offices.schema.json
+++ b/content/schema/offices.schema.json
@@ -36,6 +36,8 @@
"title_he_f": { "type": "string", "minLength": 1, "description": "The feminine Hebrew title, shown for a woman in the office (the Knesset records write שרת העבודה). Every office with a title_he has one: the player can order a woman into any office. Needs title_he and title_he_f_sources." },
"title_he_f_sources": { "$ref": "#/definitions/sources", "description": "Sources for title_he_f." },
"title_he_f_review": { "type": "string", "enum": ["agent-checked"], "description": "Review flag of title_he_f. agent-checked: an AI agent checked the name against its sources 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." },
+ "title_he_from": { "$ref": "#/definitions/date", "description": "First day title_he and title_he_f hold (inclusive). Leave out when they hold from the start. Needs title_he (#1219)." },
+ "title_he_until": { "$ref": "#/definitions/date", "description": "Day title_he and title_he_f stop holding (exclusive), after title_he_from: from then the UI shows the English title. Leave out while they hold. Needs title_he (#1219)." },
"historical_only": { "type": "boolean", "description": "Historical record only: no Cabinet seat, no player appointment, no gameplay." },
"several_holders": { "type": "boolean", "description": "Several people may hold it on the same day (Minister without Portfolio, a second deputy minister). Such an office cannot appear in event text or own policies or effects, and the player cannot appoint to it." },
"from": { "$ref": "#/definitions/date", "description": "Day the office was established (inclusive). Leave out if it exists from the start." },
diff --git a/sim/Statecraft.Sim.Tests/HebrewNameTests.cs b/sim/Statecraft.Sim.Tests/HebrewNameTests.cs
index 7df2d97ff..51b27b1ed 100644
--- a/sim/Statecraft.Sim.Tests/HebrewNameTests.cs
+++ b/sim/Statecraft.Sim.Tests/HebrewNameTests.cs
@@ -172,11 +172,11 @@ public class HebrewNameTests
Assert.True(seen > 0, $"{file}: no Hebrew names");
}
- /// <summary>Coverage as researched for #558: only the rows with no sourced Hebrew name are empty.</summary>
+ /// <summary>Coverage as researched for #558 and #1219: only the parties with no sourced Hebrew name are empty.</summary>
[Fact]
public void EveryShownNameHasAHebrewFormButTheUnsourcedOnes()
{
- Assert.Equal(new[] { "rationing_minister" }, C.Offices.Where(o => o.TitleHe == "").Select(o => o.Id));
+ Assert.Empty(C.Offices.Where(o => o.TitleHe == "").Select(o => o.Id));
Assert.Equal(new[] { "independent" }, C.Parties.Where(p => p.NameHe == "").Select(p => p.Id));
Assert.All(C.Governments, g => Assert.NotEqual("", g.NameHe));
Assert.All(C.Legislatures, l => Assert.NotEqual("", l.BodyHe));
@@ -185,6 +185,36 @@ public class HebrewNameTests
Assert.Equal(C.Offices.Where(o => o.TitleHe != "").Select(o => o.Id), C.Offices.Where(o => o.TitleHeF != "").Select(o => o.Id));
}
+ /// <summary>Owner ruling on #1224 (21 October 2026): the rationing office's sourced title is the ministry's, so it shows
+ /// only while the ministry existed, 10 March 1949 to 1 November 1950. The new government of 1 November 1950 had no such
+ /// ministry, and from that day the UI keeps the English title until a Hebrew one is sourced.</summary>
+ [Fact]
+ public void TheRationingTitleHoldsOnlyWhileTheMinistryExisted()
+ {
+ var o = C.Offices.Single(x => x.Id == "rationing_minister");
+ var golda = C.People.Single(p => p.Id == "golda_meir");
+ Assert.Equal("", o.TitleHeOn(null, new DateTime(1949, 3, 9)));
+ Assert.Equal("שר האספקה והקיצוב", o.TitleHeOn(null, new DateTime(1949, 3, 10)));
+ Assert.Equal("שר האספקה והקיצוב", o.TitleHeOn(null, new DateTime(1950, 10, 31)));
+ Assert.Equal("שרת האספקה והקיצוב", o.TitleHeOn(golda, new DateTime(1950, 10, 31)));
+ Assert.Equal("", o.TitleHeOn(null, new DateTime(1950, 11, 1)));
+ Assert.Equal("", o.TitleHeOn(golda, new DateTime(1950, 11, 1)));
+ // Every other title holds on any day.
+ Assert.Equal(new[] { "rationing_minister" }, C.Offices.Where(x => x.TitleHeFrom.HasValue || x.TitleHeUntil.HasValue).Select(x => x.Id));
+ }
+
+ const string Titled = " title: Prime Minister\n title_he: ראש הממשלה\n title_he_sources: " + Src + "\n title_he_f: ראשת הממשלה\n title_he_f_sources: " + Src + "\n";
+
+ /// <summary>A window bounds a Hebrew title, so it needs one, and it must end after it starts.</summary>
+ [Theory]
+ [InlineData(" title: Prime Minister\n title_he_until: 1950-11-01\n", "offices[prime_minister].title_he")]
+ [InlineData(Titled + " title_he_from: 1950-11-01\n title_he_until: 1950-11-01\n", "offices[prime_minister].title_he_until")]
+ public void ATitleWindowNeedsItsTitleAndEndsAfterItStarts(string to, string field)
+ {
+ var ex = Assert.Throws<ContentException>(() => Load(Replace("offices.yaml", " title: Prime Minister\n", to)));
+ Assert.Equal(("offices.yaml", field), (ex.File, ex.Field));
+ }
+
/// <summary>The owner's 2026-10-14 answers: places in their 1948 form, parties by their short common names, the First
/// Knesset mirroring its English name, a feminine title where a woman held the office; and of 2026-10-18 (#875):
/// Hatzohar by its full name, not the acronym.</summary>
diff --git a/sim/Statecraft.Sim/Content.cs b/sim/Statecraft.Sim/Content.cs
index 1b40802c9..3c34daafa 100644
--- a/sim/Statecraft.Sim/Content.cs
+++ b/sim/Statecraft.Sim/Content.cs
@@ -115,6 +115,15 @@ namespace Statecraft.Sim
/// <see cref="Person.TitleHeForm"/> is feminine (the loader makes sure every office such a person holds has one),
/// else <see cref="TitleHe"/>. Empty when the office has no Hebrew title (the UI then keeps the English).</summary>
public string TitleHeFor(Person? holder) => holder?.TitleHeForm == TitleHeForms.Feminine ? TitleHeF : TitleHe;
+ /// <summary>The days the Hebrew titles hold (#1219, owner on #1224, 21 October 2026): from TitleHeFrom (inclusive) to
+ /// TitleHeUntil (exclusive), like the office's own from/until; null leaves that side open. A title that names one
+ /// ministry, while the office runs on under others, holds only while that ministry existed; outside the window the UI
+ /// keeps the English, as for an office with no title_he.</summary>
+ public DateTime? TitleHeFrom { get; set; }
+ public DateTime? TitleHeUntil { get; set; }
+ /// <summary><see cref="TitleHeFor"/> on <paramref name="date"/>: empty outside TitleHeFrom..TitleHeUntil.</summary>
+ public string TitleHeOn(Person? holder, DateTime date) =>
+ (TitleHeFrom.HasValue && date < TitleHeFrom.Value) || (TitleHeUntil.HasValue && date >= TitleHeUntil.Value) ? "" : TitleHeFor(holder);
/// <summary>Historical record only: no Cabinet seat, player appointment or gameplay responsibility. Defaults false for existing offices.</summary>
public bool HistoricalOnly { get; set; }
/// <summary>True when several people may hold the office on the same day (Minister without Portfolio, a second
diff --git a/sim/Statecraft.Sim/ContentLoader.cs b/sim/Statecraft.Sim/ContentLoader.cs
index 0ced526ab..83d661c4f 100644
--- a/sim/Statecraft.Sim/ContentLoader.cs
+++ b/sim/Statecraft.Sim/ContentLoader.cs
@@ -723,6 +723,9 @@ namespace Statecraft.Sim
// The player can order a woman into any office, so a Hebrew title without its feminine form would show her the
// masculine one (owner on #861, 17 October 2026).
if (o.TitleHe != "" && o.TitleHeF == "") throw new ContentException("offices.yaml", $"offices[{o.Id}].title_he_f", $"required: office {o.Id} has a title_he, so it needs its feminine title_he_f beside it");
+ if ((o.TitleHeFrom.HasValue || o.TitleHeUntil.HasValue) && o.TitleHe == "") throw new ContentException("offices.yaml", $"offices[{o.Id}].title_he", "required: title_he_from/title_he_until bound a title_he");
+ if (o.TitleHeFrom.HasValue && o.TitleHeUntil.HasValue && o.TitleHeUntil.Value <= o.TitleHeFrom.Value)
+ throw new ContentException("offices.yaml", $"offices[{o.Id}].title_he_until", FormattableString.Invariant($"must be after title_he_from ({o.TitleHeFrom:yyyy-MM-dd})"));
}
foreach (var p in c.Parties) HebrewName("parties.yaml", $"parties[{p.Id}]", "name_he", p.NameHe, p.NameHeSources, p.NameHeReview, p.NameHeReviewGiven);
foreach (var l in c.Legislatures) HebrewName("legislatures.yaml", $"legislatures[{l.Id}]", "body_he", l.BodyHe, l.BodyHeSources, l.BodyHeReview, l.BodyHeReviewGiven);
diff --git a/unity/Assets/Scripts/UI/BudgetPresenter.cs b/unity/Assets/Scripts/UI/BudgetPresenter.cs
index bc0d597a1..4f99e37fa 100644
--- a/unity/Assets/Scripts/UI/BudgetPresenter.cs
+++ b/unity/Assets/Scripts/UI/BudgetPresenter.cs
@@ -142,7 +142,7 @@ namespace Statecraft.Game.UI
var holder = Cabinet.Holder(c, s, o.Id);
var who = o.From.HasValue && s.Date < o.From.Value ? text.Format("budget.not_established", Statecraft.Game.Map.Control1948.DateText(o.From.Value, k => text[k])) // PlayerText.Date is always English (#701)
: holder == null ? text["budget.vacant"] : ContentNames.Of(text, holder);
- ((Label)row[0]).text = text.Format("budget.office", ContentNames.Of(text, o, holder), who);
+ ((Label)row[0]).text = text.Format("budget.office", ContentNames.Of(text, o, holder, s.Date), who);
((Label)row[2]).text = text.Format("budget.share", PlayerText.Percent(share));
((Label)row[4]).text = text.Format("budget.factor", PlayerText.Percent(EffectsSystem.BudgetFactor(draft, office)));
}
diff --git a/unity/Assets/Scripts/UI/CabinetPresenter.cs b/unity/Assets/Scripts/UI/CabinetPresenter.cs
index b29530864..17dc04cb6 100644
--- a/unity/Assets/Scripts/UI/CabinetPresenter.cs
+++ b/unity/Assets/Scripts/UI/CabinetPresenter.cs
@@ -137,8 +137,8 @@ namespace Statecraft.Game.UI
pmCard.EnableInClassList("seat-selected", Selected == PrimeMinister);
if (pmSeat != null)
{
- var offices = pm == null ? ContentNames.Of(text, pmSeat.Office, null)
- : string.Join(text["card.offices_separator"], lineup.Where(x => x.Office.Id == PrimeMinister || HeldByPm(x)).Select(x => ContentNames.Of(text, x.Office, pm)));
+ var offices = pm == null ? ContentNames.Of(text, pmSeat.Office, null, s.Date)
+ : string.Join(text["card.offices_separator"], lineup.Where(x => x.Office.Id == PrimeMinister || HeldByPm(x)).Select(x => ContentNames.Of(text, x.Office, pm, s.Date)));
PersonCard.Fill(pmCard, "seat-" + PrimeMinister, c, s, pm, offices, pmSeat.Appointed, text, portraits, PmPortrait, partyLabel: true);
pmId = pm?.Id;
FramePm();
@@ -150,7 +150,7 @@ namespace Statecraft.Game.UI
foreach (var seat in pmHeld)
{
var office = seat.Office.Id;
- var b = new Button(() => Select(office)) { name = "seat-" + office, text = text.Format("cabinet.select_office", ContentNames.Of(text, seat.Office, pm)) };
+ var b = new Button(() => Select(office)) { name = "seat-" + office, text = text.Format("cabinet.select_office", ContentNames.Of(text, seat.Office, pm, s.Date)) };
b.AddToClassList("pm-office");
pmOffices.Add(b);
}
@@ -179,14 +179,14 @@ namespace Statecraft.Game.UI
var card = cards[key];
card.EnableInClassList("seat-selected", seat.Office.Id == Selected);
card.EnableInClassList("seat-vacant", holder == null);
- PersonCard.Fill(card, "seat-" + key, c, s, holder, ContentNames.Of(text, seat.Office, holder), seat.Appointed, text, portraits, CardPortrait);
+ PersonCard.Fill(card, "seat-" + key, c, s, holder, ContentNames.Of(text, seat.Office, holder, s.Date), seat.Appointed, text, portraits, CardPortrait);
}
RenderPick(c, s);
var queued = bridge.Queued.OfType<Appoint>().Select(a =>
{
var person = c.People.First(p => p.Id == a.Person);
- return text.Format("cabinet.queued", ContentNames.Of(text, person), ContentNames.Of(text, c.Offices.First(o => o.Id == a.Office), person));
+ return text.Format("cabinet.queued", ContentNames.Of(text, person), ContentNames.Of(text, c.Offices.First(o => o.Id == a.Office), person, s.Date));
});
screen.Q<Label>("cabinet-status").text = string.Join("\n", queued);
}
@@ -257,7 +257,7 @@ namespace Statecraft.Game.UI
}
}
if (Selected == null) return;
- screen.Q<Label>("cabinet-pick-title").text = text.Format("cabinet.pick", ContentNames.Of(text, c.Offices.First(o => o.Id == Selected), null));
+ screen.Q<Label>("cabinet-pick-title").text = text.Format("cabinet.pick", ContentNames.Of(text, c.Offices.First(o => o.Id == Selected), null, s.Date));
var list = Cabinet.Candidates(c, s, Selected);
// A refusal about the office itself (the Prime Minister's or the President's, an abolished one) is the same for
// everyone: it is said once under the heading, not under every name (#215).
@@ -279,7 +279,7 @@ namespace Statecraft.Game.UI
{
bool he = text["ui.lang"] == UiLanguage.Hebrew;
string Person(string id) { var p = c.People.First(x => x.Id == id); return he && p.NameHe != "" ? p.NameHe : p.Name; }
- string Office(string id) { var o = c.Offices.First(x => x.Id == id); return he && o.TitleHe != "" ? o.TitleHe : o.Title; }
+ string Office(string id) => ContentNames.Of(text, c.Offices.First(x => x.Id == id), null, bridge.State.Date);
string Party(string id) { var p = c.Parties.First(x => x.Id == id); return he && p.NameHe != "" ? p.NameHe : p.Name; }
string Date(string iso) => Statecraft.Game.Map.Control1948.DateText(System.DateTime.ParseExact(iso, "yyyy-MM-dd", CultureInfo.InvariantCulture), k => text[k]);
var key = "cabinet.reason." + reason.Kind;
@@ -289,7 +289,7 @@ namespace Statecraft.Game.UI
case "abolished": case "not_established": return text.Format(key, Office(reason.Values[0]), Date(reason.Values[1]));
case "died": return text.Format(key, Person(reason.Values[0]), Date(reason.Values[1]));
case "is_president": case "is_chief_of_staff": case "not_career_officer": return text.Format(key, Person(reason.Values[0]));
- case "already_holds": return text.Format(key, Person(reason.Values[0]), ContentNames.Of(text, c.Offices.First(o => o.Id == reason.Values[1]), c.People.First(p => p.Id == reason.Values[0])));
+ case "already_holds": return text.Format(key, Person(reason.Values[0]), ContentNames.Of(text, c.Offices.First(o => o.Id == reason.Values[1]), c.People.First(p => p.Id == reason.Values[0]), bridge.State.Date));
case "party_not_coalition": return text.Format(key, Person(reason.Values[0]), Party(reason.Values[1]));
default: return text[key];
}
diff --git a/unity/Assets/Scripts/UI/ContentNames.cs b/unity/Assets/Scripts/UI/ContentNames.cs
index 073202b60..de860886a 100644
--- a/unity/Assets/Scripts/UI/ContentNames.cs
+++ b/unity/Assets/Scripts/UI/ContentNames.cs
@@ -21,8 +21,9 @@ namespace Statecraft.Game.UI
/// <summary>The office's title for <paramref name="holder"/> (null: the office itself, masculine): a woman is given
/// the row's feminine title_he_f, which every office with a Hebrew title has (owner on #861: "Move to content"), so
- /// the UI derives no form; an office with no Hebrew title for her keeps the English.</summary>
- public static string Of(UiText text, Office o, Person? holder) => Pick(text, o.Title, o.TitleHeFor(holder));
+ /// the UI derives no form; an office with no Hebrew title for her keeps the English. So does a title outside its
+ /// title_he_from/title_he_until days on <paramref name="date"/> (#1219).</summary>
+ public static string Of(UiText text, Office o, Person? holder, DateTime date) => Pick(text, o.Title, o.TitleHeOn(holder, date));
/// <summary>A content text in the UI's language, the one rule the event card and the outcome caption share (#1064,
/// #1210): in Hebrew the row's Hebrew <paramref name="hebrew"/> with the ministers' Hebrew names in its placeholders;
diff --git a/unity/Assets/Scripts/UI/DefencePresenter.cs b/unity/Assets/Scripts/UI/DefencePresenter.cs
index 2fb69befa..bee40e7b8 100644
--- a/unity/Assets/Scripts/UI/DefencePresenter.cs
+++ b/unity/Assets/Scripts/UI/DefencePresenter.cs
@@ -158,8 +158,8 @@ namespace Statecraft.Game.UI
var shownEarlier = seat?.Holder != null && seats.Take(i).Any(x => x?.Holder?.Id == seat.Holder.Id);
card.style.display = seat == null || shownEarlier ? DisplayStyle.None : DisplayStyle.Flex;
if (seat == null || shownEarlier) continue;
- var titles = seat.Holder == null ? ContentNames.Of(text, seat.Office, null)
- : string.Join("\n", seats.Skip(i).Where(x => x?.Holder?.Id == seat.Holder.Id).Select(x => ContentNames.Of(text, x!.Office, seat.Holder))); // one office a line: the narrow card measured "A · B" as two lines but drew one (a blank line at 1366x768)
+ var titles = seat.Holder == null ? ContentNames.Of(text, seat.Office, null, s.Date)
+ : string.Join("\n", seats.Skip(i).Where(x => x?.Holder?.Id == seat.Holder.Id).Select(x => ContentNames.Of(text, x!.Office, seat.Holder, s.Date))); // one office a line: the narrow card measured "A · B" as two lines but drew one (a blank line at 1366x768)
PersonCard.Fill(card, "lead-" + Leaders[i], c, s, seat.Holder, titles, seat.Appointed, text, portraits, LeaderPortrait);
}
var ceasefire = screen.Q<Label>("ceasefire");
diff --git a/unity/Assets/Scripts/UI/EventCardPresenter.cs b/unity/Assets/Scripts/UI/EventCardPresenter.cs
index 9b32e42ed..065ac66c0 100644
--- a/unity/Assets/Scripts/UI/EventCardPresenter.cs
+++ b/unity/Assets/Scripts/UI/EventCardPresenter.cs
@@ -254,7 +254,7 @@ namespace Statecraft.Game.UI
banner.text = OriginLine(c, s, e, text);
banner.style.display = banner.text.Length == 0 ? DisplayStyle.None : DisplayStyle.Flex;
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-office").text = holder == null ? "" : text.Format("event.office", ContentNames.Of(text, office!, holder, date), ContentNames.Of(text, holder));
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);
diff --git a/unity/Assets/Tests/EditMode/BudgetScreenTests.cs b/unity/Assets/Tests/EditMode/BudgetScreenTests.cs
index 65e85d35a..89304a481 100644
--- a/unity/Assets/Tests/EditMode/BudgetScreenTests.cs
+++ b/unity/Assets/Tests/EditMode/BudgetScreenTests.cs
@@ -256,8 +256,8 @@ public class BudgetScreenTests
new BudgetPresenter(ui.Root, new SimBridge(g, he), he);
Assert.AreEqual("שרת העבודה (גולדה מאיר)", ui.Q<Label>("budget-labour_minister-name").text, "the feminine title for her");
var rationing = c.Offices.Single(o => o.Id == "rationing_minister");
- Assert.AreEqual("", rationing.TitleHe);
- Assert.AreEqual(rationing.Title + " (פנחס לבון)", ui.Q<Label>("budget-rationing_minister-name").text, "only the missing office title falls back");
+ Assert.AreEqual("שר האספקה והקיצוב", rationing.TitleHe);
+ Assert.AreEqual(rationing.Title + " (פנחס לבון)", ui.Q<Label>("budget-rationing_minister-name").text, "Lavon's term, after the ministry closed on 1 November 1950: the English title (owner on #1224)");
StringAssert.Contains(Offices.Legislature(c, g.State.Date)!.BodyHe, ui.Q<Label>("budget-vote").text);
}
diff --git a/unity/Assets/Tests/EditMode/CabinetScreenTests.cs b/unity/Assets/Tests/EditMode/CabinetScreenTests.cs
index 152a10aa6..578ea0e33 100644
--- a/unity/Assets/Tests/EditMode/CabinetScreenTests.cs
+++ b/unity/Assets/Tests/EditMode/CabinetScreenTests.cs
@@ -85,13 +85,11 @@ public class CabinetScreenTests
// She never held Finance; her order reads the office's title_he_f row all the same (owner on #861: "Move to content").
Assert.AreEqual("שרת האוצר", C.Offices.Single(o => o.Id == "finance_minister").TitleHeF);
Assert.AreEqual("ניתנה פקודה: גולדה מאיר לתפקיד שרת האוצר, בסיום התור", ui.Q<Label>("cabinet-status").text);
- // A row with no Hebrew form in the content keeps its English one: the rationing office has no title_he yet.
- var rationing = C.Offices.Single(o => o.Id == "rationing_minister");
- Assert.AreEqual("", rationing.TitleHe);
- Assert.AreEqual(rationing.Title, ui.Q<Label>("seat-rationing_minister-office").text);
+ // The rationing office reads its sourced Hebrew title like every other row (#1219).
+ Assert.AreEqual("שר האספקה והקיצוב", ui.Q<Label>("seat-rationing_minister-office").text);
// Every other card and party chip is in Hebrew.
foreach (var t in ui.Q<VisualElement>("screen-cabinet").Query<TextElement>().ToList())
- if (t.name != null && t.name != "seat-rationing_minister-office"
+ if (t.name != null
&& (t.name.EndsWith("-holder") || t.name.EndsWith("-office") || t.name.EndsWith("-party") || t.name.StartsWith("party-")))
Assert.IsFalse((t.text ?? "").Any(ch => ch < 128 && char.IsLetter(ch)), $"'{t.name}': {t.text}");
cabinet.Dispose();
@@ -107,20 +105,28 @@ public class CabinetScreenTests
var he = UiText.Parse(AssetDatabase.LoadAssetAtPath<TextAsset>(UiPaths.StringsHebrew).text, "strings.he.yaml");
var golda = C.People.Single(p => p.Id == "golda_meir");
Office O(string id) => C.Offices.Single(o => o.Id == id);
+ var day = new DateTime(1950, 2, 1); // inside every title's days, the rationing office's too
foreach (var o in C.Offices.Where(o => o.TitleHeF != ""))
- Assert.AreEqual(o.TitleHeF, ContentNames.Of(he, o, golda), o.Id);
+ Assert.AreEqual(o.TitleHeF, ContentNames.Of(he, o, golda, day), o.Id);
var unsourced = new Office { Title = "Minister of Finance", TitleHe = "שר האוצר" };
- Assert.AreEqual("Minister of Finance", ContentNames.Of(he, unsourced, golda), "no title_he_f: English, no derived form");
- Assert.AreEqual("שרת האוצר", ContentNames.Of(he, O("finance_minister"), golda));
- Assert.AreEqual("השרה לנפגעי מלחמה", ContentNames.Of(he, O("war_victims_minister"), golda));
- Assert.AreEqual("שרה בלי תיק", ContentNames.Of(he, O("minister_without_portfolio"), golda));
- Assert.AreEqual("ראש הממשלה", ContentNames.Of(he, O("prime_minister"), golda));
- Assert.AreEqual("שרת העבודה", ContentNames.Of(he, O("labour_minister"), golda));
+ Assert.AreEqual("Minister of Finance", ContentNames.Of(he, unsourced, golda, day), "no title_he_f: English, no derived form");
+ Assert.AreEqual("שרת האוצר", ContentNames.Of(he, O("finance_minister"), golda, day));
+ Assert.AreEqual("השרה לנפגעי מלחמה", ContentNames.Of(he, O("war_victims_minister"), golda, day));
+ Assert.AreEqual("שרה בלי תיק", ContentNames.Of(he, O("minister_without_portfolio"), golda, day));
+ Assert.AreEqual("ראש הממשלה", ContentNames.Of(he, O("prime_minister"), golda, day));
+ Assert.AreEqual("שרת העבודה", ContentNames.Of(he, O("labour_minister"), golda, day));
var own = new Office { Title = "Minister of Labour", TitleHe = "שר העבודה", TitleHeF = "שרת העבודה והרווחה" };
- Assert.AreEqual("שרת העבודה והרווחה", ContentNames.Of(he, own, golda), "the content's title_he_f wins");
- Assert.AreEqual("שר האוצר", ContentNames.Of(he, O("finance_minister"), C.People.Single(p => p.Id == "kaplan")));
- Assert.AreEqual("Minister of Finance", ContentNames.Of(Text, O("finance_minister"), golda));
- Assert.AreEqual(O("rationing_minister").Title, ContentNames.Of(he, O("rationing_minister"), golda), "no title_he: English");
+ Assert.AreEqual("שרת העבודה והרווחה", ContentNames.Of(he, own, golda, day), "the content's title_he_f wins");
+ Assert.AreEqual("שר האוצר", ContentNames.Of(he, O("finance_minister"), C.People.Single(p => p.Id == "kaplan"), day));
+ Assert.AreEqual("Minister of Finance", ContentNames.Of(Text, O("finance_minister"), golda, day));
+ Assert.AreEqual("שרת האספקה והקיצוב", ContentNames.Of(he, O("rationing_minister"), golda, day));
+ // The rationing title is the ministry's and holds only while it existed (owner on #1224, 21 October 2026): its last
+ // day is 31 October 1950; from 1 November 1950 the office keeps its English title, for a man or a woman.
+ var rationing = O("rationing_minister");
+ var lavon = C.People.Single(p => p.Id == "lavon");
+ Assert.AreEqual("שר האספקה והקיצוב", ContentNames.Of(he, rationing, lavon, new DateTime(1950, 10, 31)));
+ Assert.AreEqual(rationing.Title, ContentNames.Of(he, rationing, lavon, new DateTime(1950, 11, 1)), "after the ministry: English");
+ Assert.AreEqual(rationing.Title, ContentNames.Of(he, rationing, golda, new DateTime(1950, 11, 1)), "after the ministry: English");
}
/// <summary>#901: candidate refusal arguments are content ids from the sim; the Hebrew UI resolves and formats them.</summary>