Skip to content

Commit fdfc5d6

Browse files
committed
Output-specific localization
1 parent f5f2d73 commit fdfc5d6

3 files changed

Lines changed: 18 additions & 13 deletions

File tree

Content.Client/_Starlight/Chemistry/UI/ModernChemMasterWindow.xaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@
125125
<!-- TAB: Output / Pills n' Bottles -->
126126
<BoxContainer Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True" Margin="5" SeparationOverride="10">
127127

128-
<!-- Output container header + eject -->
128+
<!-- Output containers header + eject -->
129129
<BoxContainer Orientation="Horizontal">
130-
<Label Text="{Loc 'chem-master-window-container-label'}" />
130+
<Label Text="{Loc 'chem-master-window-containers-label'}" />
131131
<Control HorizontalExpand="True" />
132132
<Button MinSize="80 0" Name="OutputEjectButton" Access="Public"
133133
Text="{Loc 'chem-master-window-eject-button'}" />
@@ -141,7 +141,7 @@
141141
</PanelContainer.PanelOverride>
142142
<ScrollContainer HorizontalExpand="True">
143143
<BoxContainer Name="OutputInputContainerInfo" Orientation="Vertical" Margin="4" HorizontalExpand="True">
144-
<Label Text="{Loc 'chem-master-window-no-container-loaded-text'}" />
144+
<Label Text="{Loc 'chem-master-window-no-input-container-loaded-text'}" />
145145
</BoxContainer>
146146
</ScrollContainer>
147147
</PanelContainer>
@@ -151,7 +151,7 @@
151151
</PanelContainer.PanelOverride>
152152
<ScrollContainer HorizontalExpand="True">
153153
<BoxContainer Name="OutputContainerInfo" Orientation="Vertical" Margin="4" HorizontalExpand="True">
154-
<Label Text="{Loc 'chem-master-window-no-container-loaded-text'}" />
154+
<Label Text="{Loc 'chem-master-window-no-output-container-loaded-text'}" />
155155
</BoxContainer>
156156
</ScrollContainer>
157157
</PanelContainer>
@@ -294,7 +294,7 @@
294294

295295
<BoxContainer Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True" Margin="5" SeparationOverride="10">
296296
<BoxContainer Orientation="Horizontal">
297-
<Label Text="{Loc 'chem-master-window-container-label'}" />
297+
<Label Text="{Loc 'chem-master-window-containers-label'}" />
298298
<Control HorizontalExpand="True" />
299299
<Button MinSize="80 0" Name="OutputEjectButtonClassic" Access="Public" Text="{Loc 'chem-master-window-eject-button'}" />
300300
</BoxContainer>
@@ -306,7 +306,7 @@
306306
</PanelContainer.PanelOverride>
307307
<ScrollContainer HorizontalExpand="True">
308308
<BoxContainer Name="OutputInputContainerInfoClassic" Orientation="Vertical" Margin="4" HorizontalExpand="True">
309-
<Label Text="{Loc 'chem-master-window-no-container-loaded-text'}" />
309+
<Label Text="{Loc 'chem-master-window-no-input-container-loaded-text'}" />
310310
</BoxContainer>
311311
</ScrollContainer>
312312
</PanelContainer>
@@ -316,7 +316,7 @@
316316
</PanelContainer.PanelOverride>
317317
<ScrollContainer HorizontalExpand="True">
318318
<BoxContainer Name="OutputContainerInfoClassic" Orientation="Vertical" Margin="4" HorizontalExpand="True">
319-
<Label Text="{Loc 'chem-master-window-no-container-loaded-text'}" />
319+
<Label Text="{Loc 'chem-master-window-no-output-container-loaded-text'}" />
320320
</BoxContainer>
321321
</ScrollContainer>
322322
</PanelContainer>

Content.Client/_Starlight/Chemistry/UI/ModernChemMasterWindow.xaml.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -584,13 +584,13 @@ private void UpdatePanelInfo(ChemMasterBoundUserInterfaceState state)
584584

585585
// Modern layout containers
586586
BuildContainerUI(InputContainerInfo, state.InputContainerInfo, true, modernMode: true);
587-
BuildContainerUI(OutputContainerInfo, state.OutputContainerInfo, false, modernMode: true);
588-
BuildContainerUI(OutputInputContainerInfo, state.InputContainerInfo, false, modernMode: false);
587+
BuildContainerUI(OutputContainerInfo, state.OutputContainerInfo, false, modernMode: true, "chem-master-window-no-output-container-loaded-text");
588+
BuildContainerUI(OutputInputContainerInfo, state.InputContainerInfo, false, modernMode: false, "chem-master-window-no-input-container-loaded-text");
589589

590590
// Classic layout containers
591591
BuildContainerUI(InputContainerInfoClassic, state.InputContainerInfo, true, modernMode: false);
592-
BuildContainerUI(OutputContainerInfoClassic, state.OutputContainerInfo, false, modernMode: false);
593-
BuildContainerUI(OutputInputContainerInfoClassic, state.InputContainerInfo, false, modernMode: false);
592+
BuildContainerUI(OutputContainerInfoClassic, state.OutputContainerInfo, false, modernMode: false, "chem-master-window-no-output-container-loaded-text");
593+
BuildContainerUI(OutputInputContainerInfoClassic, state.InputContainerInfo, false, modernMode: false, "chem-master-window-no-input-container-loaded-text");
594594

595595
BufferInfo.Children.Clear();
596596
BufferInfoClassic.Children.Clear();
@@ -664,13 +664,13 @@ void AddBufferHeader(BoxContainer target)
664664
UpdateReagentPrototypes(SearchBar.Text);
665665
}
666666

667-
private void BuildContainerUI(Control control, ContainerInfo? info, bool addReagentButtons, bool modernMode)
667+
private void BuildContainerUI(Control control, ContainerInfo? info, bool addReagentButtons, bool modernMode, string emptyLoc = "chem-master-window-no-container-loaded-text")
668668
{
669669
control.Children.Clear();
670670

671671
if (info is null)
672672
{
673-
control.Children.Add(new Label { Text = Loc.GetString("chem-master-window-no-container-loaded-text") });
673+
control.Children.Add(new Label { Text = Loc.GetString(emptyLoc) });
674674
return;
675675
}
676676

Resources/Locale/en-US/_Starlight/chemistry/components/chem-master-component.ftl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,8 @@ chem-master-window-mode-modern = Modern Layout
1515
chem-master-window-amount-label = Amount
1616
chem-master-window-custom-amount-tooltip = Enter a custom amount and press # to dispense that amount.
1717
chem-master-window-custom-amount-placeholder = Enter a custom amount ...
18+
19+
# Output tab
20+
chem-master-window-containers-label = Containers
21+
chem-master-window-no-input-container-loaded-text = No input container loaded.
22+
chem-master-window-no-output-container-loaded-text = No output container loaded.

0 commit comments

Comments
 (0)