From c062df5b3f168cfaa6e92e5b4f5c1c3ed710444e Mon Sep 17 00:00:00 2001 From: Antoine Aflalo Date: Fri, 2 Apr 2021 16:57:51 -0400 Subject: [PATCH] feat(Mute): Add localization and proper spacing --- .../Localization/SettingsStrings.Designer.cs | 9 +++++ .../Localization/SettingsStrings.fr.resx | 3 ++ SoundSwitch/Localization/SettingsStrings.resx | 3 ++ SoundSwitch/UI/Forms/Settings.Designer.cs | 38 +++++++++---------- SoundSwitch/UI/Forms/Settings.cs | 2 + 5 files changed, 36 insertions(+), 19 deletions(-) diff --git a/SoundSwitch/Localization/SettingsStrings.Designer.cs b/SoundSwitch/Localization/SettingsStrings.Designer.cs index 67dc0a6802..b38d043861 100644 --- a/SoundSwitch/Localization/SettingsStrings.Designer.cs +++ b/SoundSwitch/Localization/SettingsStrings.Designer.cs @@ -345,6 +345,15 @@ internal static string languageRestartRequiredCaption { } } + /// + /// Looks up a localized string similar to Toggle mute. + /// + internal static string mute_toggle_label { + get { + return ResourceManager.GetString("mute.toggle.label", resourceCulture); + } + } + /// /// Looks up a localized string similar to Notification. /// diff --git a/SoundSwitch/Localization/SettingsStrings.fr.resx b/SoundSwitch/Localization/SettingsStrings.fr.resx index d141b43200..58f1aaf38f 100644 --- a/SoundSwitch/Localization/SettingsStrings.fr.resx +++ b/SoundSwitch/Localization/SettingsStrings.fr.resx @@ -436,4 +436,7 @@ Restaurer l'état du système quand l'application est fermée. {0} est réactivé. + + Sourdine + \ No newline at end of file diff --git a/SoundSwitch/Localization/SettingsStrings.resx b/SoundSwitch/Localization/SettingsStrings.resx index 7efa1942fa..333e5ca78d 100644 --- a/SoundSwitch/Localization/SettingsStrings.resx +++ b/SoundSwitch/Localization/SettingsStrings.resx @@ -456,4 +456,7 @@ Restore the state of the system when the application is closed. {0} is now unmuted. + + Toggle mute + \ No newline at end of file diff --git a/SoundSwitch/UI/Forms/Settings.Designer.cs b/SoundSwitch/UI/Forms/Settings.Designer.cs index a4ed2bd304..08ad80c19f 100644 --- a/SoundSwitch/UI/Forms/Settings.Designer.cs +++ b/SoundSwitch/UI/Forms/Settings.Designer.cs @@ -32,8 +32,8 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - System.Windows.Forms.ListViewGroup listViewGroup5 = new System.Windows.Forms.ListViewGroup("Selected", System.Windows.Forms.HorizontalAlignment.Center); - System.Windows.Forms.ListViewGroup listViewGroup6 = new System.Windows.Forms.ListViewGroup("Selected", System.Windows.Forms.HorizontalAlignment.Center); + System.Windows.Forms.ListViewGroup listViewGroup1 = new System.Windows.Forms.ListViewGroup("Selected", System.Windows.Forms.HorizontalAlignment.Center); + System.Windows.Forms.ListViewGroup listViewGroup2 = new System.Windows.Forms.ListViewGroup("Selected", System.Windows.Forms.HorizontalAlignment.Center); this.startWithWindowsCheckBox = new System.Windows.Forms.CheckBox(); this.closeButton = new System.Windows.Forms.Button(); this.switchCommunicationDeviceCheckBox = new System.Windows.Forms.CheckBox(); @@ -153,14 +153,14 @@ private void InitializeComponent() this.playbackListView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.playbackListView.CheckBoxes = true; this.playbackListView.Dock = System.Windows.Forms.DockStyle.Fill; - listViewGroup5.Footer = ""; - listViewGroup5.Header = "Selected"; - listViewGroup5.HeaderAlignment = System.Windows.Forms.HorizontalAlignment.Center; - listViewGroup5.Name = "selectedGroup"; - listViewGroup5.Subtitle = ""; - listViewGroup5.TaskLink = ""; + listViewGroup1.Footer = ""; + listViewGroup1.Header = "Selected"; + listViewGroup1.HeaderAlignment = System.Windows.Forms.HorizontalAlignment.Center; + listViewGroup1.Name = "selectedGroup"; + listViewGroup1.Subtitle = ""; + listViewGroup1.TaskLink = ""; this.playbackListView.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] { - listViewGroup5}); + listViewGroup1}); this.playbackListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; this.playbackListView.HideSelection = false; this.playbackListView.Location = new System.Drawing.Point(3, 3); @@ -187,14 +187,14 @@ private void InitializeComponent() this.recordingListView.BorderStyle = System.Windows.Forms.BorderStyle.None; this.recordingListView.CheckBoxes = true; this.recordingListView.Dock = System.Windows.Forms.DockStyle.Fill; - listViewGroup6.Footer = ""; - listViewGroup6.Header = "Selected"; - listViewGroup6.HeaderAlignment = System.Windows.Forms.HorizontalAlignment.Center; - listViewGroup6.Name = "selectedGroup"; - listViewGroup6.Subtitle = ""; - listViewGroup6.TaskLink = ""; + listViewGroup2.Footer = ""; + listViewGroup2.Header = "Selected"; + listViewGroup2.HeaderAlignment = System.Windows.Forms.HorizontalAlignment.Center; + listViewGroup2.Name = "selectedGroup"; + listViewGroup2.Subtitle = ""; + listViewGroup2.TaskLink = ""; this.recordingListView.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] { - listViewGroup6}); + listViewGroup2}); this.recordingListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; this.recordingListView.HideSelection = false; this.recordingListView.Location = new System.Drawing.Point(3, 3); @@ -560,7 +560,7 @@ private void InitializeComponent() // this.toggleMuteLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.toggleMuteLabel.AutoSize = true; - this.toggleMuteLabel.Location = new System.Drawing.Point(362, 427); + this.toggleMuteLabel.Location = new System.Drawing.Point(362, 428); this.toggleMuteLabel.Name = "toggleMuteLabel"; this.toggleMuteLabel.Size = new System.Drawing.Size(73, 15); this.toggleMuteLabel.TabIndex = 22; @@ -569,7 +569,7 @@ private void InitializeComponent() // muteHotKey // this.muteHotKey.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.muteHotKey.Location = new System.Drawing.Point(441, 424); + this.muteHotKey.Location = new System.Drawing.Point(441, 425); this.muteHotKey.Name = "muteHotKey"; this.muteHotKey.Size = new System.Drawing.Size(138, 23); this.muteHotKey.TabIndex = 24; @@ -580,7 +580,7 @@ private void InitializeComponent() // this.muteHotKeyCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.muteHotKeyCheckbox.AutoSize = true; - this.muteHotKeyCheckbox.Location = new System.Drawing.Point(585, 427); + this.muteHotKeyCheckbox.Location = new System.Drawing.Point(585, 428); this.muteHotKeyCheckbox.Name = "muteHotKeyCheckbox"; this.muteHotKeyCheckbox.Size = new System.Drawing.Size(100, 19); this.muteHotKeyCheckbox.TabIndex = 23; diff --git a/SoundSwitch/UI/Forms/Settings.cs b/SoundSwitch/UI/Forms/Settings.cs index c086a79c58..fbd6ebf1e7 100644 --- a/SoundSwitch/UI/Forms/Settings.cs +++ b/SoundSwitch/UI/Forms/Settings.cs @@ -336,6 +336,8 @@ private void LocalizeForm() // Misc hotkeysCheckBox.Text = SettingsStrings.hotkeyEnabled; closeButton.Text = SettingsStrings.close; + toggleMuteLabel.Text = SettingsStrings.mute_toggle_label; + muteHotKeyCheckbox.Text = SettingsStrings.hotkeyEnabled; }