Skip to content

Commit 2676ee3

Browse files
committed
Add missing sub-cell translation string and allow translating infantry sub-cells
1 parent c6d45fc commit 2676ee3

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/TSMapEditor/Config/Translations/en/Translation_en.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,16 @@ BuildingWithPropertyTypeExtension.HighestThreat=Highest threat
195195
BuildingWithPropertyTypeExtension.Nearest=Nearest
196196
BuildingWithPropertyTypeExtension.Farthest=Farthest
197197
198+
; *************************************************
199+
; SubCell
200+
; *************************************************
201+
202+
SubCell.None=None
203+
SubCell.Top=Top
204+
SubCell.Right=Right
205+
SubCell.Left=Left
206+
SubCell.Bottom=Bottom
207+
198208
; *************************************************
199209
; Keyboard Commands
200210
; *************************************************
@@ -755,6 +765,7 @@ HousesWindow.DisableAIRepairs.Description.v2=This disables the "AI Repairable" f
755765
InfantryOptionsWindow.lblHeader.Text=Infantry Options
756766
InfantryOptionsWindow.lblSelectedInfantry.Text=Selected Infantry:
757767
InfantryOptionsWindow.lblSelectedInfantryValue.Text=Dynamically filled
768+
InfantryOptionsWindow.lblSelectedInfantryValue.Format={0}, sub cell: {1}
758769
InfantryOptionsWindow.lblStrength.Text=Strength:
759770
InfantryOptionsWindow.lblMission.Text=Mission:
760771
InfantryOptionsWindow.lblVeterancy.Text=Veterancy:

src/TSMapEditor/UI/Windows/InfantryOptionsWindow.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ public void Open(Infantry infantry)
108108

109109
private void RefreshValues()
110110
{
111-
lblSelectedInfantryValue.Text = infantry.ObjectType.GetEditorDisplayName() + ", sub cell: " + infantry.SubCell;
111+
string subCellString = Translate("SubCell." + infantry.SubCell.ToString(), infantry.SubCell.ToString());
112+
113+
lblSelectedInfantryValue.Text = string.Format(Translate(this, nameof(lblSelectedInfantryValue) + ".Format", "{0}, sub cell: {1}"), infantry.ObjectType.GetEditorDisplayName(), subCellString);
112114
trbStrength.Value = infantry.HP;
113115
ddMission.SelectedIndex = ddMission.Items.FindIndex(item => item.Text == infantry.Mission);
114116
int veterancyIndex = ddVeterancy.Items.FindIndex(i => (int)i.Tag == infantry.Veterancy);

0 commit comments

Comments
 (0)