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.

Hebrew: the winery and vineyards read in Hebrew (#1781) (#1786)

EllaSharakanski3a45fb9d9c98
diff --git a/changelog.d/1781-winery-vineyards-he.md b/changelog.d/1781-winery-vineyards-he.md
new file mode 100644
index 000000000..87942add6
--- /dev/null
+++ b/changelog.d/1781-winery-vineyards-he.md
@@ -0,0 +1,8 @@
+### Fixed
+
+- The Hebrew city panel no longer shows "a winery" and "vineyards" in English inside a Hebrew line (#1781). The
+ `winery` project kind gets a `name_he` like its three siblings, and the resource it requires is named by a
+ `city.resource.<id>` UI string in both languages. The resource's name lives in the strings rather than in
+ `content/`, because a resource is a record nested inside a city and the translation contract binds only a
+ `<file>#<list>.<id>.<field>` key (`HebrewOverlay.Bindings`). Both wordings are `agent-checked`, for the native read
+ under #564.
diff --git a/content/projects.yaml b/content/projects.yaml
index 2b780b92a..61f42c368 100644
--- a/content/projects.yaml
+++ b/content/projects.yaml
@@ -22,4 +22,4 @@ projects:
- { id: housing, name: a housing project, name_he: מיזם דיור, name_he_review: agent-checked, cost: 6, turns: 6, capacity: 5, condition: 0.03, job_slots: 0 } # DESIGN VALUE: owner-set balance, not a historical figure (D-C6, D-A3, D-D3; Q-PROJ-1, Q-HOUSE-3: permanent housing)
- { id: transit_camp, name: a transit camp, name_he: מעברה, name_he_review: agent-checked, cost: 1.5, turns: 1, capacity: 5, condition: -0.02, job_slots: 0 } # DESIGN VALUE: owner-set balance, not a historical figure (D-C6, D-A3, D-D3; Q-PROJ-1, Q-HOUSE-3: the low-condition type)
- { id: industry, name: an industry project, name_he: מיזם תעשייה, name_he_review: agent-checked, cost: 2, turns: 6, capacity: 0, condition: 0, job_slots: 5 } # DESIGN VALUE: owner-set balance, not a historical figure (D-C6, D-A3; Q-PROJ-1: job slots)
- - { id: winery, name: a winery, cost: 2, turns: 6, capacity: 0, condition: 0, job_slots: 10, requires: vineyards } # DESIGN VALUE: owner-set balance, not a historical figure (D-D8, D-C6; Q-SPEC-2: the specialised industry)
+ - { id: winery, name: a winery, name_he: יקב, name_he_review: agent-checked, cost: 2, turns: 6, capacity: 0, condition: 0, job_slots: 10, requires: vineyards } # DESIGN VALUE: owner-set balance, not a historical figure (D-D8, D-C6; Q-SPEC-2: the specialised industry)
diff --git a/unity/Assets/Scripts/UI/GddHexPanel.cs b/unity/Assets/Scripts/UI/GddHexPanel.cs
index 0a3c2a9e2..9170229a3 100644
--- a/unity/Assets/Scripts/UI/GddHexPanel.cs
+++ b/unity/Assets/Scripts/UI/GddHexPanel.cs
@@ -393,13 +393,20 @@ namespace Statecraft.Game.UI
{
case "maabarot_policy": case "not_land": return text["info.map_action_reason." + reason.Kind];
case "occupied": return text.Format("info.map_action_reason.occupied", text["info.map_action." + reason.Values[0]]);
- case "no_resource": return text.Format("city.project_reason.no_resource", townName(reason.Values[0]), reason.Values[1],
+ case "no_resource": return text.Format("city.project_reason.no_resource", townName(reason.Values[0]), ResourceName(text, reason.Values[1]),
ContentNames.Of(text, c.ProjectKinds.First(x => x.Id == reason.Values[2])));
case "turn_cap": return text.Format("city.project_reason.turn_cap", int.Parse(reason.Values[0], CultureInfo.InvariantCulture));
default: return reason.Text;
}
}
+ /// <summary>A resource's name in the UI's language (#1781), by its id. A resource is a record nested inside a
+ /// city, so it cannot carry its own name_he: the translation contract binds a &lt;file&gt;#&lt;list&gt;.&lt;id&gt;.&lt;field&gt;
+ /// key only (HebrewOverlay.Bindings), and a nested record has no such key. The name is a UI string instead, and
+ /// without one the id stands, which is what the line showed before.</summary>
+ static string ResourceName(UiText text, string id) =>
+ text.Has("city.resource." + id) ? text["city.resource." + id] : id;
+
/// <summary>"1 group" or "n groups" (population groups, D-A1), in the UI's language.</summary>
public static string Groups(UiText t, int n) => n == 1 ? t["city.groups_one"] : t.Format("city.groups", n);
/// <summary>"1 turn" or "n turns", in the UI's language.</summary>
diff --git a/unity/Assets/Tests/EditMode/CityProjectPanelTests.cs b/unity/Assets/Tests/EditMode/CityProjectPanelTests.cs
index 768ea5e21..520333668 100644
--- a/unity/Assets/Tests/EditMode/CityProjectPanelTests.cs
+++ b/unity/Assets/Tests/EditMode/CityProjectPanelTests.cs
@@ -224,7 +224,7 @@ public class CityProjectPanelTests
var expected = why switch
{
"policy" => t["info.map_action_reason.maabarot_policy"],
- "resource" => t.Format("city.project_reason.no_resource", Towns[City], "vineyards", ContentNames.Of(t, winery)),
+ "resource" => t.Format("city.project_reason.no_resource", Towns[City], t["city.resource.vineyards"], ContentNames.Of(t, winery)),
"sea" => t["info.map_action_reason.not_land"],
"placement" => t.Format("info.map_action_reason.occupied", t["info.map_action.housing"]),
_ => t.Format("city.project_reason.turn_cap", C.RulesAt(s0.Date).MapActionsPerTurn),
@@ -277,4 +277,24 @@ public class CityProjectPanelTests
Assert.IsNull(ui.Root.Q("city-project-for"));
Assert.IsNull(ui.Root.Q("city-project-housing"));
}
+
+ /// <summary>#1781: the Hebrew refusal names the resource and the kind in Hebrew, with no Latin letters left in the
+ /// line. Before this, `winery` had no name_he and the resource had no name at all, so a Hebrew player read
+ /// "ב־תל אביב אין vineyards עבור a winery". This uses the real content's kind rather than a fixture, because the
+ /// point is the shipped wording.</summary>
+ [Test]
+ public void TheHebrewRefusalForTheRealWineryHasNoEnglishWords()
+ {
+ var kind = C.ProjectKinds.First(x => x.Id == "winery");
+ Assert.AreEqual("vineyards", kind.Requires, "precondition: the winery is the kind that requires a resource");
+ Assert.IsTrue(He.Has("city.resource." + kind.Requires), "the required resource is named in the Hebrew strings");
+ // The town name comes from the settlement's own name_he and is not this issue's scope, so the line is built
+ // with a Hebrew town to isolate the two words that were English: the resource and the kind.
+ var line = He.Format("city.project_reason.no_resource", "\u05ea\u05dc \u05d0\u05d1\u05d9\u05d1",
+ He["city.resource." + kind.Requires], ContentNames.Of(He, kind));
+ Assert.IsFalse(System.Text.RegularExpressions.Regex.IsMatch(line, "[A-Za-z]"),
+ "no Latin letters left in the Hebrew refusal: " + line);
+ StringAssert.Contains("\u05db\u05e8\u05de\u05d9\u05dd", line); // כרמים
+ StringAssert.Contains("\u05d9\u05e7\u05d1", line); // יקב
+ }
}
diff --git a/unity/Assets/UI/strings.en.yaml b/unity/Assets/UI/strings.en.yaml
index 4bb365928..47fd5780d 100644
--- a/unity/Assets/UI/strings.en.yaml
+++ b/unity/Assets/UI/strings.en.yaml
@@ -695,6 +695,10 @@ city.project_ordered: "Ordered: {0}"
city.project_building: "{0} for {1}: {2} left"
city.project_built: "{0} for {1}, finished on {2}"
city.project_reason.no_resource: "{0} has no {1} for {2}"
+# A city resource's name, by its id in cities.yaml `resources:` (#1781). A resource is a record inside a city, not a
+# top-level row, so it is named here rather than in content: the translation contract binds a <file>#<list>.<id>.<field>
+# key only (HebrewOverlay.Bindings), and a nested record has no such key. Without an entry the id stands.
+city.resource.vineyards: "vineyards"
city.project_reason.turn_cap: "No more than {0} city projects in one turn"
# The toggle that folds a city's own projects on a stacked bar or a short window (owner ruling on #1150).
city.projects_toggle: "City projects ({0})"
diff --git a/unity/Assets/UI/strings.he.yaml b/unity/Assets/UI/strings.he.yaml
index 093c8b105..b3d716737 100644
--- a/unity/Assets/UI/strings.he.yaml
+++ b/unity/Assets/UI/strings.he.yaml
@@ -747,14 +747,18 @@ pioneer.card.working: "בעבודה ב{0}"
pioneer.card.stop_first: "כדי לחזור לחיים אזרחיים, הפסיקו את העבודה בשורת המיזם."
pioneer.card.work_ordered: "לקבוצה זו ניתנה הוראת בנייה או הפסקת עבודה. הסירו את ההוראה כדי לחזור לחיים אזרחיים."
# City projects on the chosen hex (#1122). The kind names come from content/projects.yaml name_he, nouns ("מעברה"), so
-# every sentence takes them as nouns; "הקמת" keeps the order line's gender neutral. The resource id in no_resource has no
-# Hebrew name yet (no content kind requires one). For the native reviewer (#564).
+# every sentence takes them as nouns; "הקמת" keeps the order line's gender neutral. The resource in no_resource is
+# named by a city.resource.<id> string below (#1781; the winery requires vineyards), so that line is Hebrew
+# throughout. For the native reviewer (#564).
city.project_for: "מיזם עבור {0}"
city.project_start: "הקמת {0}: {1}, {2}"
city.project_ordered: "הוזמנה הקמת {0}"
city.project_building: "{0} עבור {1}: עוד {2}"
city.project_built: "{0} עבור {1}: הבנייה הושלמה ב־{2}"
city.project_reason.no_resource: "ב{0} אין {1} עבור {2}"
+# A city resource's name by its id (#1781); see the English file for why it lives here and not in content.
+# "כרמים" is he.wiki's כרם (a vineyard, where vines are grown), in the plural. For the native reviewer (#564).
+city.resource.vineyards: "כרמים"
# turn_cap: approved by Beri, a native speaker, on #1267 (21 Oct 2026).
city.project_reason.turn_cap: "אי אפשר להתחיל יותר מ־{0} מיזמים עירוניים בתור אחד"
# The toggle that folds a city's own projects on a stacked bar or a short window (owner ruling on #1150), {0} the