Skip to content

Commit afa6e1c

Browse files
committed
Translate ToggleSwitch ON/OFF labels (fix #4375)
1 parent 2e86e9e commit afa6e1c

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/UniGetUI/Controls/OperationWidgets/OperationControl.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,6 @@ public List<MenuFlyoutItemBase> GetOperationOptions()
611611
};
612612
optionsMenu.Add(details);
613613

614-
615614
var installationSettings = new BetterMenuItem
616615
{
617616
Text = CoreTools.Translate("Installation options"),

src/UniGetUI/Controls/SettingsWidgets/CheckboxButtonCard.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ public CheckboxButtonCard()
6969
};
7070
_checkbox = new ToggleSwitch()
7171
{
72-
Margin = new Thickness(0, 0, 8, 0)
72+
Margin = new Thickness(0, 0, 8, 0),
73+
OnContent = new TextBlock() { Text = CoreTools.Translate("Enabled") },
74+
OffContent = new TextBlock() { Text = CoreTools.Translate("Disabled") },
7375
};
7476
_textblock = new TextBlock()
7577
{

src/UniGetUI/Controls/SettingsWidgets/CheckboxCard.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ public CheckboxCard()
6565
{
6666
_checkbox = new ToggleSwitch()
6767
{
68-
Margin = new Thickness(0, 0, 8, 0)
68+
Margin = new Thickness(0, 0, 8, 0),
69+
OnContent = new TextBlock() { Text = CoreTools.Translate("Enabled") },
70+
OffContent = new TextBlock() { Text = CoreTools.Translate("Disabled") },
6971
};
7072
_textblock = new TextBlock()
7173
{

src/UniGetUI/Controls/SettingsWidgets/SecureCheckboxCard.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ public SecureCheckboxCard()
6969
{
7070
_checkbox = new ToggleSwitch()
7171
{
72-
Margin = new Thickness(0, 0, 8, 0)
72+
Margin = new Thickness(0, 0, 8, 0),
73+
OnContent = new TextBlock() { Text = CoreTools.Translate("Enabled") },
74+
OffContent = new TextBlock() { Text = CoreTools.Translate("Disabled") },
7375
};
7476

7577
_loading = new ProgressRing() { IsIndeterminate = true, Visibility = Visibility.Collapsed};

0 commit comments

Comments
 (0)