From b17045a4577c2cff6136f41d2f81379751077828 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 1 Jun 2021 16:37:00 -0700 Subject: [PATCH] More internalization work. --- DeviceSettingsForm.Designer.cs | 82 ++------- DeviceSettingsForm.resx | 299 +++++++++++++++++++++++++++++++ FileViewer.cs | 67 ++++--- KVMControl.cs | 4 +- KVMSettingsForm.cs | 8 +- KVMStats.cs | 8 +- KVMViewer.cs | 34 ++-- MainForm.cs | 4 + MappingStats.cs | 8 +- MeshMapper.cs | 4 +- Properties/Resources.Designer.cs | 297 ++++++++++++++++++++++++++++++ Properties/Resources.resx | 99 ++++++++++ Translate.cs | 216 ++++++++++++++++++++++ UpdateForm.cs | 4 +- 14 files changed, 1001 insertions(+), 133 deletions(-) diff --git a/DeviceSettingsForm.Designer.cs b/DeviceSettingsForm.Designer.cs index 3d81bbf..b000ae9 100644 --- a/DeviceSettingsForm.Designer.cs +++ b/DeviceSettingsForm.Designer.cs @@ -44,27 +44,17 @@ // // groupBox1 // - this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Controls.Add(this.systemTrayCheckBox); this.groupBox1.Controls.Add(this.doubleClickComboBox); this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Location = new System.Drawing.Point(12, 12); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(294, 97); - this.groupBox1.TabIndex = 5; this.groupBox1.TabStop = false; - this.groupBox1.Text = "Settings"; // // systemTrayCheckBox // - this.systemTrayCheckBox.AutoSize = true; - this.systemTrayCheckBox.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.systemTrayCheckBox.Location = new System.Drawing.Point(14, 70); + resources.ApplyResources(this.systemTrayCheckBox, "systemTrayCheckBox"); this.systemTrayCheckBox.Name = "systemTrayCheckBox"; - this.systemTrayCheckBox.Size = new System.Drawing.Size(123, 17); - this.systemTrayCheckBox.TabIndex = 2; - this.systemTrayCheckBox.Text = "Show on system tray"; this.systemTrayCheckBox.UseVisualStyleBackColor = true; // // doubleClickComboBox @@ -72,107 +62,71 @@ this.doubleClickComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.doubleClickComboBox.FormattingEnabled = true; this.doubleClickComboBox.Items.AddRange(new object[] { - "Add Map...", - "Add Relay Map...", - "Remote Desktop...", - "Remote Files...", - "HTTP", - "HTTPS", - "SSH", - "SCP"}); - this.doubleClickComboBox.Location = new System.Drawing.Point(14, 43); + resources.GetString("doubleClickComboBox.Items"), + resources.GetString("doubleClickComboBox.Items1"), + resources.GetString("doubleClickComboBox.Items2"), + resources.GetString("doubleClickComboBox.Items3"), + resources.GetString("doubleClickComboBox.Items4"), + resources.GetString("doubleClickComboBox.Items5"), + resources.GetString("doubleClickComboBox.Items6"), + resources.GetString("doubleClickComboBox.Items7")}); + resources.ApplyResources(this.doubleClickComboBox, "doubleClickComboBox"); this.doubleClickComboBox.Name = "doubleClickComboBox"; - this.doubleClickComboBox.Size = new System.Drawing.Size(267, 21); - this.doubleClickComboBox.TabIndex = 1; // // label1 // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(12, 24); + resources.ApplyResources(this.label1, "label1"); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(100, 13); - this.label1.TabIndex = 0; - this.label1.Text = "Double Click Action"; // // okButton // - this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.okButton.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.okButton.Location = new System.Drawing.Point(150, 193); + resources.ApplyResources(this.okButton, "okButton"); this.okButton.Name = "okButton"; - this.okButton.Size = new System.Drawing.Size(75, 23); - this.okButton.TabIndex = 5; - this.okButton.Text = "OK"; this.okButton.UseVisualStyleBackColor = true; this.okButton.Click += new System.EventHandler(this.okButton_Click); // // cancelButton // - this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + resources.ApplyResources(this.cancelButton, "cancelButton"); this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.cancelButton.Location = new System.Drawing.Point(231, 193); this.cancelButton.Name = "cancelButton"; - this.cancelButton.Size = new System.Drawing.Size(75, 23); - this.cancelButton.TabIndex = 6; - this.cancelButton.Text = "Cancel"; this.cancelButton.UseVisualStyleBackColor = true; // // exp_KeyboardHookCheckBox // - this.exp_KeyboardHookCheckBox.AutoSize = true; - this.exp_KeyboardHookCheckBox.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.exp_KeyboardHookCheckBox.Location = new System.Drawing.Point(14, 22); + resources.ApplyResources(this.exp_KeyboardHookCheckBox, "exp_KeyboardHookCheckBox"); this.exp_KeyboardHookCheckBox.Name = "exp_KeyboardHookCheckBox"; - this.exp_KeyboardHookCheckBox.Size = new System.Drawing.Size(161, 17); - this.exp_KeyboardHookCheckBox.TabIndex = 3; - this.exp_KeyboardHookCheckBox.Text = "Enhanced keyboard capture"; this.exp_KeyboardHookCheckBox.UseVisualStyleBackColor = true; this.exp_KeyboardHookCheckBox.CheckedChanged += new System.EventHandler(this.exp_KeyboardHookCheckBox_CheckedChanged); // // exp_KeyboardHookPriorityCheckBox // - this.exp_KeyboardHookPriorityCheckBox.AutoSize = true; - this.exp_KeyboardHookPriorityCheckBox.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.exp_KeyboardHookPriorityCheckBox.Location = new System.Drawing.Point(14, 45); + resources.ApplyResources(this.exp_KeyboardHookPriorityCheckBox, "exp_KeyboardHookPriorityCheckBox"); this.exp_KeyboardHookPriorityCheckBox.Name = "exp_KeyboardHookPriorityCheckBox"; - this.exp_KeyboardHookPriorityCheckBox.Size = new System.Drawing.Size(149, 17); - this.exp_KeyboardHookPriorityCheckBox.TabIndex = 4; - this.exp_KeyboardHookPriorityCheckBox.Text = "Forward all keyboard keys"; this.exp_KeyboardHookPriorityCheckBox.UseVisualStyleBackColor = true; // // groupBox2 // - this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + resources.ApplyResources(this.groupBox2, "groupBox2"); this.groupBox2.Controls.Add(this.exp_KeyboardHookPriorityCheckBox); this.groupBox2.Controls.Add(this.exp_KeyboardHookCheckBox); - this.groupBox2.Location = new System.Drawing.Point(12, 115); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(294, 72); - this.groupBox2.TabIndex = 6; this.groupBox2.TabStop = false; - this.groupBox2.Text = "Desktop Settings"; // // DeviceSettingsForm // this.AcceptButton = this.okButton; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.cancelButton; - this.ClientSize = new System.Drawing.Size(318, 228); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.Controls.Add(this.okButton); this.Controls.Add(this.cancelButton); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "DeviceSettingsForm"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Device Settings"; this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.groupBox2.ResumeLayout(false); diff --git a/DeviceSettingsForm.resx b/DeviceSettingsForm.resx index b93e49a..e7a5d88 100644 --- a/DeviceSettingsForm.resx +++ b/DeviceSettingsForm.resx @@ -117,7 +117,294 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Top, Left, Right + + + + True + + + NoControl + + + 14, 70 + + + 123, 17 + + + 2 + + + Show on system tray + + + systemTrayCheckBox + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 0 + + + Add Map... + + + Add Relay Map... + + + Remote Desktop... + + + Remote Files... + + + HTTP + + + HTTPS + + + SSH + + + SCP + + + 14, 43 + + + 267, 21 + + + 1 + + + doubleClickComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 1 + + + True + + + 12, 24 + + + 100, 13 + + + 0 + + + Double Click Action + + + label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 2 + + + 12, 12 + + + 294, 97 + + + 5 + + + Settings + + + groupBox1 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + Bottom, Right + + + NoControl + + + 150, 193 + + + 75, 23 + + + 5 + + + OK + + + okButton + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + Bottom, Right + + + NoControl + + + 231, 193 + + + 75, 23 + + + 6 + + + Cancel + + + cancelButton + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + True + + + NoControl + + + 14, 22 + + + 161, 17 + + + 3 + + + Enhanced keyboard capture + + + exp_KeyboardHookCheckBox + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 1 + + + True + + + NoControl + + + 14, 45 + + + 149, 17 + + + 4 + + + Forward all keyboard keys + + + exp_KeyboardHookPriorityCheckBox + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 0 + + + Top, Bottom, Left, Right + + + 12, 115 + + + 294, 72 + + + 6 + + + Desktop Settings + + + groupBox2 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 6, 13 + + + 318, 228 + AAABAA0AMDAQAAEABABoBgAA1gAAACAgEAABAAQA6AIAAD4HAAAYGBAAAQAEAOgBAAAmCgAAEBAQAAEA @@ -1812,4 +2099,16 @@ AADAPwAAwD8AAMA/AADAPwAA + + CenterParent + + + Device Settings + + + DeviceSettingsForm + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/FileViewer.cs b/FileViewer.cs index cce4391..dbe7873 100644 --- a/FileViewer.cs +++ b/FileViewer.cs @@ -24,7 +24,6 @@ using System.Windows.Forms; using System.Collections.Generic; using System.Security.Cryptography; using System.Web.Script.Serialization; -using Microsoft.Win32; namespace MeshCentralRouter { @@ -103,8 +102,8 @@ namespace MeshCentralRouter leftListView.Items.Add(x); } localUpButton.Enabled = false; - localLabel.Text = "Local"; - mainToolTip.SetToolTip(localLabel, "Local"); + localLabel.Text = Translate.T(Properties.Resources.Local); + mainToolTip.SetToolTip(localLabel, Translate.T(Properties.Resources.Local)); } catch (Exception) { return false; } } @@ -125,7 +124,7 @@ namespace MeshCentralRouter FileInfo[] files = localFolder.GetFiles(); foreach (FileInfo file in files) { - if (file.Attributes.HasFlag(System.IO.FileAttributes.Hidden)) continue; + if (file.Attributes.HasFlag(FileAttributes.Hidden)) continue; string[] si = new string[2]; si[0] = file.Name; si[1] = "" + file.Length; @@ -134,8 +133,8 @@ namespace MeshCentralRouter leftListView.Items.Add(x); } localUpButton.Enabled = true; - localLabel.Text = "Local - " + localFolder.FullName; - mainToolTip.SetToolTip(localLabel, "Local - " + localFolder.FullName); + localLabel.Text = string.Format(Translate.T(Properties.Resources.LocalPlus), localFolder.FullName); + mainToolTip.SetToolTip(localLabel, string.Format(Translate.T(Properties.Resources.LocalPlus), localFolder.FullName)); } catch (Exception) { return false; } } @@ -158,18 +157,18 @@ namespace MeshCentralRouter rightListView.Items.Clear(); if ((remoteFolder == null) || (remoteFolder == "")) { - remoteLabel.Text = "Remote"; - mainToolTip.SetToolTip(remoteLabel, "Remote"); + remoteLabel.Text = Translate.T(Properties.Resources.Remote); + mainToolTip.SetToolTip(remoteLabel, Translate.T(Properties.Resources.Remote)); } else { if (node.agentid < 5) { - remoteLabel.Text = "Remote - " + remoteFolder.Replace("/", "\\"); - mainToolTip.SetToolTip(remoteLabel, "Remote - " + remoteFolder.Replace("/", "\\")); + remoteLabel.Text = string.Format(Translate.T(Properties.Resources.RemotePlus), remoteFolder.Replace("/", "\\")); + mainToolTip.SetToolTip(remoteLabel, string.Format(Translate.T(Properties.Resources.RemotePlus), remoteFolder.Replace("/", "\\"))); } else { - remoteLabel.Text = "Remote - " + remoteFolder; - mainToolTip.SetToolTip(remoteLabel, "Remote - " + remoteFolder); + remoteLabel.Text = string.Format(Translate.T(Properties.Resources.RemotePlus), remoteFolder); + mainToolTip.SetToolTip(remoteLabel, string.Format(Translate.T(Properties.Resources.RemotePlus), remoteFolder)); } } @@ -448,11 +447,11 @@ namespace MeshCentralRouter int msgid = -1; if ((jsonAction.ContainsKey("msg")) && (jsonAction["msg"] != null)) { msg = jsonAction["msg"].ToString(); } if (jsonAction.ContainsKey("msgid")) { msgid = (int)jsonAction["msgid"]; } - if (msgid == 1) { msg = "Waiting for user to grant access..."; } - if (msgid == 2) { msg = "Denied"; } - if (msgid == 3) { msg = "Failed to start remote terminal session"; } // , {0} ({1}) - if (msgid == 4) { msg = "Timeout"; } - if (msgid == 5) { msg = "Received invalid network data"; } + if (msgid == 1) { msg = Translate.T(Properties.Resources.WaitingForUserToGrantAccess); } + if (msgid == 2) { msg = Translate.T(Properties.Resources.Denied); } + if (msgid == 3) { msg = Translate.T(Properties.Resources.FailedToStartRemoteTerminalSession); } + if (msgid == 4) { msg = Translate.T(Properties.Resources.Timeout); } + if (msgid == 5) { msg = Translate.T(Properties.Resources.ReceivedInvalidNetworkData); } displayMessage(msg); break; } @@ -579,8 +578,8 @@ namespace MeshCentralRouter switch (state) { case 0: // Disconnected - mainToolStripStatusLabel.Text = "Disconnected"; - connectButton.Text = "Connect"; + mainToolStripStatusLabel.Text = Translate.T(Properties.Resources.Disconnected); + connectButton.Text = Translate.T(Properties.Resources.Connect); remoteRefreshButton.Enabled = false; remoteUpButton.Enabled = false; remoteRootButton.Enabled = false; @@ -589,20 +588,20 @@ namespace MeshCentralRouter remoteFolder = null; break; case 1: // Connecting - mainToolStripStatusLabel.Text = "Connecting..."; - connectButton.Text = "Disconnect"; + mainToolStripStatusLabel.Text = Translate.T(Properties.Resources.Connecting); + connectButton.Text = Translate.T(Properties.Resources.Disconnect); break; case 2: // Setup - mainToolStripStatusLabel.Text = "Setup..."; - connectButton.Text = "Disconnect"; + mainToolStripStatusLabel.Text = Translate.T(Properties.Resources.Setup); + connectButton.Text = Translate.T(Properties.Resources.Disconnect); break; case 3: // Connected - string label = "Connected"; - if (sessionIsRecorded) { label += ", Recorded Session"; } - if ((userSessions != null) && (userSessions.Count > 1)) { label += string.Format(", {0} users", userSessions.Count); } + string label = Translate.T(Properties.Resources.Connected); + if (sessionIsRecorded) { label += Translate.T(Properties.Resources.RecordedSession); } + if ((userSessions != null) && (userSessions.Count > 1)) { label += string.Format(Translate.T(Properties.Resources.AddXUsers), userSessions.Count); } label += "."; mainToolStripStatusLabel.Text = label; - connectButton.Text = "Disconnect"; + connectButton.Text = Translate.T(Properties.Resources.Disconnect); break; } @@ -736,7 +735,7 @@ namespace MeshCentralRouter private void remoteNewFolderButton_Click(object sender, EventArgs e) { if (remoteFolder == null) return; - FilenamePromptForm f = new FilenamePromptForm("Create Folder", ""); + FilenamePromptForm f = new FilenamePromptForm(Translate.T(Properties.Resources.CreateFolder), ""); if (f.ShowDialog(this) == DialogResult.OK) { string r; @@ -814,8 +813,8 @@ namespace MeshCentralRouter ArrayList filesArray = new ArrayList(); foreach (ListViewItem l in rightListView.SelectedItems) { filesArray.Add(l.Text); if (l.ImageIndex == 1) { rec = true; } } string[] files = (string[])filesArray.ToArray(typeof(string)); - string msg = string.Format("Remove {0} items?", files.Length); - if (files.Length == 1) { msg = "Remove 1 item?"; } + string msg = string.Format(Translate.T(Properties.Resources.RemoveXItems), files.Length); + if (files.Length == 1) { msg = Translate.T(Properties.Resources.Remove1Item); } FileDeletePromptForm f = new FileDeletePromptForm(msg, rec); if (f.ShowDialog(this) == DialogResult.OK) { @@ -845,7 +844,7 @@ namespace MeshCentralRouter { string oldname = rightListView.SelectedItems[0].Text; if ((rightListView.SelectedItems.Count != 1) || (remoteFolder == null)) return; - FilenamePromptForm f = new FilenamePromptForm("Rename", oldname); + FilenamePromptForm f = new FilenamePromptForm(Translate.T(Properties.Resources.Rename), oldname); if (f.ShowDialog(this) == DialogResult.OK) { if (oldname == f.filename) return; @@ -1095,7 +1094,7 @@ namespace MeshCentralRouter private void localNewFolderButton_Click(object sender, EventArgs e) { if (localFolder == null) return; - FilenamePromptForm f = new FilenamePromptForm("Create Folder", ""); + FilenamePromptForm f = new FilenamePromptForm(Translate.T(Properties.Resources.CreateFolder), ""); if (f.ShowDialog(this) == DialogResult.OK) { Directory.CreateDirectory(Path.Combine(localFolder.FullName, f.filename)); @@ -1109,8 +1108,8 @@ namespace MeshCentralRouter ArrayList filesArray = new ArrayList(); foreach (ListViewItem l in leftListView.SelectedItems) { filesArray.Add(l.Text); if (l.ImageIndex == 1) { rec = true; } } string[] files = (string[])filesArray.ToArray(typeof(string)); - string msg = string.Format("Remove {0} items?", files.Length); - if (files.Length == 1) { msg = "Remove 1 item?"; } + string msg = string.Format(Translate.T(Properties.Resources.RemoveXItems), files.Length); + if (files.Length == 1) { msg = Translate.T(Properties.Resources.Remove1Item); } FileDeletePromptForm f = new FileDeletePromptForm(msg, rec); if (f.ShowDialog(this) == DialogResult.OK) { diff --git a/KVMControl.cs b/KVMControl.cs index ec235fa..4206538 100644 --- a/KVMControl.cs +++ b/KVMControl.cs @@ -278,11 +278,11 @@ namespace MeshCentralRouter ushort num = (ushort)((buffer[off + 6 + i * 2] << 8) + buffer[off + 7 + i * 2]); if (num == 0xFFFF) { - displays.Add("All Displays"); + displays.Add(Translate.T(Properties.Resources.AllDisplays)); } else { - displays.Add("Display " + num); + displays.Add(string.Format(Translate.T(Properties.Resources.DisplayX), num)); } } } diff --git a/KVMSettingsForm.cs b/KVMSettingsForm.cs index bccbaeb..e157190 100644 --- a/KVMSettingsForm.cs +++ b/KVMSettingsForm.cs @@ -44,10 +44,10 @@ namespace MeshCentralRouter scalingComboBox.Items.Add(new DropListItem(384, "37.5%")); scalingComboBox.Items.Add(new DropListItem(256, "25%")); scalingComboBox.Items.Add(new DropListItem(128, "12.5%")); - frameRateComboBox.Items.Add(new DropListItem(50, "Fast")); - frameRateComboBox.Items.Add(new DropListItem(100, "Medium")); - frameRateComboBox.Items.Add(new DropListItem(400, "Slow")); - frameRateComboBox.Items.Add(new DropListItem(1000, "Very slow")); + frameRateComboBox.Items.Add(new DropListItem(50, Translate.T(Properties.Resources.Fast))); + frameRateComboBox.Items.Add(new DropListItem(100, Translate.T(Properties.Resources.Medium))); + frameRateComboBox.Items.Add(new DropListItem(400, Translate.T(Properties.Resources.Slow))); + frameRateComboBox.Items.Add(new DropListItem(1000, Translate.T(Properties.Resources.VerySlow))); qualityComboBox.SelectedIndex = 4; scalingComboBox.SelectedIndex = 0; frameRateComboBox.SelectedIndex = 1; diff --git a/KVMStats.cs b/KVMStats.cs index 4455c24..494f905 100644 --- a/KVMStats.cs +++ b/KVMStats.cs @@ -32,10 +32,10 @@ namespace MeshCentralRouter private void refreshTimer_Tick(object sender, EventArgs e) { - kvmInBytesLabel.Text = string.Format(((viewer.bytesIn == 1)?"{0} Byte":"{0} Bytes"), viewer.bytesIn); - kvmOutBytesLabel.Text = string.Format(((viewer.bytesOut == 1) ? "{0} Byte" : "{0} Bytes"), viewer.bytesOut); - kvmCompInBytesLabel.Text = string.Format(((viewer.bytesInCompressed == 1) ? "{0} Byte" : "{0} Bytes"), viewer.bytesInCompressed); - kvmCompOutBytesLabel.Text = string.Format(((viewer.bytesOutCompressed == 1) ? "{0} Byte" : "{0} Bytes"), viewer.bytesOutCompressed); + kvmInBytesLabel.Text = string.Format(((viewer.bytesIn == 1)? Translate.T(Properties.Resources.OneByte): Translate.T(Properties.Resources.XBytes)), viewer.bytesIn); + kvmOutBytesLabel.Text = string.Format(((viewer.bytesOut == 1) ? Translate.T(Properties.Resources.OneByte) : Translate.T(Properties.Resources.XBytes)), viewer.bytesOut); + kvmCompInBytesLabel.Text = string.Format(((viewer.bytesInCompressed == 1) ? Translate.T(Properties.Resources.OneByte) : Translate.T(Properties.Resources.XBytes)), viewer.bytesInCompressed); + kvmCompOutBytesLabel.Text = string.Format(((viewer.bytesOutCompressed == 1) ? Translate.T(Properties.Resources.OneByte) : Translate.T(Properties.Resources.XBytes)), viewer.bytesOutCompressed); if (viewer.bytesIn == 0) { inRatioLabel.Text = "0%"; } else { diff --git a/KVMViewer.cs b/KVMViewer.cs index b58a13b..72400cf 100644 --- a/KVMViewer.cs +++ b/KVMViewer.cs @@ -222,11 +222,11 @@ namespace MeshCentralRouter int msgid = -1; if ((jsonAction.ContainsKey("msg")) && (jsonAction["msg"] != null)) { msg = jsonAction["msg"].ToString(); } if (jsonAction.ContainsKey("msgid")) { msgid = (int)jsonAction["msgid"]; } - if (msgid == 1) { msg = "Waiting for user to grant access..."; } - if (msgid == 2) { msg = "Denied"; } - if (msgid == 3) { msg = "Failed to start remote terminal session"; } // , {0} ({1}) - if (msgid == 4) { msg = "Timeout"; } - if (msgid == 5) { msg = "Received invalid network data"; } + if (msgid == 1) { msg = Translate.T(Properties.Resources.WaitingForUserToGrantAccess); } + if (msgid == 2) { msg = Translate.T(Properties.Resources.Denied); } + if (msgid == 3) { msg = Translate.T(Properties.Resources.FailedToStartRemoteDesktopSession); } + if (msgid == 4) { msg = Translate.T(Properties.Resources.Timeout); } + if (msgid == 5) { msg = Translate.T(Properties.Resources.ReceivedInvalidNetworkData); } displayMessage(msg); break; } @@ -273,32 +273,32 @@ namespace MeshCentralRouter switch (state) { case 0: // Disconnected - mainToolStripStatusLabel.Text = "Disconnected"; + mainToolStripStatusLabel.Text = Translate.T(Properties.Resources.Disconnected); displaySelectComboBox.Visible = false; kvmControl.Visible = false; kvmControl.screenWidth = 0; kvmControl.screenHeight = 0; - connectButton.Text = "Connect"; + connectButton.Text = Translate.T(Properties.Resources.Connect); break; case 1: // Connecting - mainToolStripStatusLabel.Text = "Connecting..."; + mainToolStripStatusLabel.Text = Translate.T(Properties.Resources.Connecting); displaySelectComboBox.Visible = false; kvmControl.Visible = false; - connectButton.Text = "Disconnect"; + connectButton.Text = Translate.T(Properties.Resources.Disconnect); break; case 2: // Setup mainToolStripStatusLabel.Text = "Setup..."; displaySelectComboBox.Visible = false; kvmControl.Visible = false; - connectButton.Text = "Disconnect"; + connectButton.Text = Translate.T(Properties.Resources.Disconnect); break; case 3: // Connected - string label = "Connected"; - if (sessionIsRecorded) { label += ", Recorded Session"; } - if ((userSessions != null) && (userSessions.Count > 1)) { label += string.Format(", {0} users", userSessions.Count); } + string label = Translate.T(Properties.Resources.Connected); + if (sessionIsRecorded) { label += Translate.T(Properties.Resources.RecordedSession); } + if ((userSessions != null) && (userSessions.Count > 1)) { label += string.Format(Translate.T(Properties.Resources.AddXUsers), userSessions.Count); } label += "."; mainToolStripStatusLabel.Text = label; - connectButton.Text = "Disconnect"; + connectButton.Text = Translate.T(Properties.Resources.Disconnect); kvmControl.SendCompressionLevel(); break; } @@ -393,11 +393,11 @@ namespace MeshCentralRouter displaySelectComboBox.Items.AddRange(kvmControl.displays.ToArray()); if (kvmControl.currentDisp == 0xFFFF) { - displaySelectComboBox.SelectedItem = "All Displays"; + displaySelectComboBox.SelectedItem = Translate.T(Properties.Resources.AllDisplays); } else { - displaySelectComboBox.SelectedItem = "Display " + kvmControl.currentDisp; + displaySelectComboBox.SelectedItem = string.Format(Translate.T(Properties.Resources.DisplayX), kvmControl.currentDisp); } } else @@ -411,7 +411,7 @@ namespace MeshCentralRouter { string displayText = displaySelectComboBox.SelectedItem.ToString(); int displaynum = 0; - if (displayText == "All Displays") displaynum = 0xFFFF; + if (displayText == Translate.T(Properties.Resources.AllDisplays)) displaynum = 0xFFFF; if (displaynum != 0 || int.TryParse(displayText.Substring(8), out displaynum)) { if (kvmControl != null) kvmControl.SendDisplay(displaynum); diff --git a/MainForm.cs b/MainForm.cs index ce13587..969e41d 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -155,6 +155,10 @@ namespace MeshCentralRouter InitializeComponent(); Translate.TranslateControl(this); Translate.TranslateListView(devicesListView); + Translate.TranslateContextMenu(trayIconContextMenuStrip); + Translate.TranslateContextMenu(mainContextMenuStrip); + Translate.TranslateContextMenu(mappingsContextMenuStrip); + Translate.TranslateContextMenu(devicesContextMenuStrip); mainPanel.Controls.Add(panel1); mainPanel.Controls.Add(panel2); mainPanel.Controls.Add(panel3); diff --git a/MappingStats.cs b/MappingStats.cs index 5d664f8..559738b 100644 --- a/MappingStats.cs +++ b/MappingStats.cs @@ -32,10 +32,10 @@ namespace MeshCentralRouter private void refreshTimer_Tick(object sender, EventArgs e) { - kvmInBytesLabel.Text = string.Format(((mapControl.mapper.bytesToClient == 1)?"{0} Byte":"{0} Bytes"), mapControl.mapper.bytesToClient); - kvmOutBytesLabel.Text = string.Format(((mapControl.mapper.bytesToServer == 1) ? "{0} Byte" : "{0} Bytes"), mapControl.mapper.bytesToServer); - kvmCompInBytesLabel.Text = string.Format(((mapControl.mapper.bytesToClientCompressed == 1) ? "{0} Byte" : "{0} Bytes"), mapControl.mapper.bytesToClientCompressed); - kvmCompOutBytesLabel.Text = string.Format(((mapControl.mapper.bytesToServerCompressed == 1) ? "{0} Byte" : "{0} Bytes"), mapControl.mapper.bytesToServerCompressed); + kvmInBytesLabel.Text = string.Format(((mapControl.mapper.bytesToClient == 1) ? Translate.T(Properties.Resources.OneByte) : Translate.T(Properties.Resources.XBytes)), mapControl.mapper.bytesToClient); + kvmOutBytesLabel.Text = string.Format(((mapControl.mapper.bytesToServer == 1) ? Translate.T(Properties.Resources.OneByte) : Translate.T(Properties.Resources.XBytes)), mapControl.mapper.bytesToServer); + kvmCompInBytesLabel.Text = string.Format(((mapControl.mapper.bytesToClientCompressed == 1) ? Translate.T(Properties.Resources.OneByte) : Translate.T(Properties.Resources.XBytes)), mapControl.mapper.bytesToClientCompressed); + kvmCompOutBytesLabel.Text = string.Format(((mapControl.mapper.bytesToServerCompressed == 1) ? Translate.T(Properties.Resources.OneByte) : Translate.T(Properties.Resources.XBytes)), mapControl.mapper.bytesToServerCompressed); if (mapControl.mapper.bytesToClient == 0) { inRatioLabel.Text = "0%"; } else { diff --git a/MeshMapper.cs b/MeshMapper.cs index eb622af..c0d4099 100644 --- a/MeshMapper.cs +++ b/MeshMapper.cs @@ -138,9 +138,9 @@ namespace MeshCentralRouter else if (state == 1) { if (remoteip == null) { - msg = "Port " + localport + " to port " + remoteport; + msg = string.Format(Translate.T(Properties.Resources.PortXtoPortY), localport, remoteport); } else { - msg = "Port " + localport + " to " + remoteip + ":" + remoteport; + msg = string.Format(Translate.T(Properties.Resources.PortXtoIPPortY), localport, remoteip, remoteport); } if (totalConnectCounter == 1) { msg += Translate.T(Properties.Resources.OneConnection); } if (totalConnectCounter > 1) { msg += string.Format(Translate.T(Properties.Resources.ManyConnections), totalConnectCounter); } diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index a7d8699..65100bd 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -60,6 +60,15 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to , {0} users. + /// + internal static string AddXUsers { + get { + return ResourceManager.GetString("AddXUsers", resourceCulture); + } + } + /// /// Looks up a localized string similar to Agent. /// @@ -69,6 +78,15 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to All Displays. + /// + internal static string AllDisplays { + get { + return ResourceManager.GetString("AllDisplays", resourceCulture); + } + } + /// /// Looks up a localized string similar to AMT. /// @@ -117,6 +135,42 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to Connect. + /// + internal static string Connect { + get { + return ResourceManager.GetString("Connect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connected. + /// + internal static string Connected { + get { + return ResourceManager.GetString("Connected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connecting.... + /// + internal static string Connecting { + get { + return ResourceManager.GetString("Connecting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create Folder. + /// + internal static string CreateFolder { + get { + return ResourceManager.GetString("CreateFolder", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -127,6 +181,42 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to Denied. + /// + internal static string Denied { + get { + return ResourceManager.GetString("Denied", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Disconnect. + /// + internal static string Disconnect { + get { + return ResourceManager.GetString("Disconnect", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Disconnected. + /// + internal static string Disconnected { + get { + return ResourceManager.GetString("Disconnected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Display {0}. + /// + internal static string DisplayX { + get { + return ResourceManager.GetString("DisplayX", resourceCulture); + } + } + /// /// Looks up a localized string similar to Don't ask for {0} days.. /// @@ -164,6 +254,33 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to Failed to start remote desktop session. + /// + internal static string FailedToStartRemoteDesktopSession { + get { + return ResourceManager.GetString("FailedToStartRemoteDesktopSession", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to start remote terminal session. + /// + internal static string FailedToStartRemoteTerminalSession { + get { + return ResourceManager.GetString("FailedToStartRemoteTerminalSession", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fast. + /// + internal static string Fast { + get { + return ResourceManager.GetString("Fast", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -273,6 +390,15 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to Invalid download.. + /// + internal static string InvalidDownload { + get { + return ResourceManager.GetString("InvalidDownload", resourceCulture); + } + } + /// /// Looks up a localized string similar to Invalid username or password. /// @@ -309,6 +435,15 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to Local - {0}. + /// + internal static string LocalPlus { + get { + return ResourceManager.GetString("LocalPlus", resourceCulture); + } + } + /// /// Looks up a localized string similar to , {0} connections.. /// @@ -328,6 +463,15 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to Medium. + /// + internal static string Medium { + get { + return ResourceManager.GetString("Medium", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -374,6 +518,15 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to {0} Byte. + /// + internal static string OneByte { + get { + return ResourceManager.GetString("OneByte", resourceCulture); + } + } + /// /// Looks up a localized string similar to , 1 connection.. /// @@ -392,6 +545,24 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to Port {0} to {1}:{2}. + /// + internal static string PortXtoIPPortY { + get { + return ResourceManager.GetString("PortXtoIPPortY", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Port {0} to port {1}. + /// + internal static string PortXtoPortY { + get { + return ResourceManager.GetString("PortXtoPortY", resourceCulture); + } + } + /// /// Looks up a localized string similar to PuTTY SSH client. /// @@ -401,6 +572,24 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to Received invalid network data. + /// + internal static string ReceivedInvalidNetworkData { + get { + return ResourceManager.GetString("ReceivedInvalidNetworkData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to , Recorded Session. + /// + internal static string RecordedSession { + get { + return ResourceManager.GetString("RecordedSession", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -420,6 +609,51 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to Remote. + /// + internal static string Remote { + get { + return ResourceManager.GetString("Remote", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remote - {0}. + /// + internal static string RemotePlus { + get { + return ResourceManager.GetString("RemotePlus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove 1 item?. + /// + internal static string Remove1Item { + get { + return ResourceManager.GetString("Remove1Item", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove {0} items?. + /// + internal static string RemoveXItems { + get { + return ResourceManager.GetString("RemoveXItems", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Rename. + /// + internal static string Rename { + get { + return ResourceManager.GetString("Rename", resourceCulture); + } + } + /// /// Looks up a localized string similar to Search. /// @@ -447,6 +681,24 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to Setup.... + /// + internal static string Setup { + get { + return ResourceManager.GetString("Setup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Slow. + /// + internal static string Slow { + get { + return ResourceManager.GetString("Slow", resourceCulture); + } + } + /// /// Looks up a localized string similar to SMS sent. /// @@ -483,6 +735,15 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to Timeout. + /// + internal static string Timeout { + get { + return ResourceManager.GetString("Timeout", resourceCulture); + } + } + /// /// Looks up a localized string similar to Two-factor Authentication. /// @@ -510,6 +771,33 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to Updating.... + /// + internal static string Updating { + get { + return ResourceManager.GetString("Updating", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Very slow. + /// + internal static string VerySlow { + get { + return ResourceManager.GetString("VerySlow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Waiting for user to grant access.... + /// + internal static string WaitingForUserToGrantAccess { + get { + return ResourceManager.GetString("WaitingForUserToGrantAccess", resourceCulture); + } + } + /// /// Looks up a localized string similar to WinSCP client. /// @@ -519,6 +807,15 @@ namespace MeshCentralRouter.Properties { } } + /// + /// Looks up a localized string similar to {0} Bytes. + /// + internal static string XBytes { + get { + return ResourceManager.GetString("XBytes", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/Properties/Resources.resx b/Properties/Resources.resx index dd59d0f..052d522 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -271,4 +271,103 @@ Local + + , {0} users + + + Connect + + + Connected + + + Connecting... + + + Create Folder + + + Denied + + + Disconnect + + + Disconnected + + + Failed to start remote terminal session + + + Local - {0} + + + Received invalid network data + + + , Recorded Session + + + Remote + + + Remote - {0} + + + Remove 1 item? + + + Remove {0} items? + + + Rename + + + Setup... + + + Timeout + + + Waiting for user to grant access... + + + All Displays + + + Display {0} + + + Failed to start remote desktop session + + + Fast + + + Medium + + + {0} Byte + + + Slow + + + Very slow + + + {0} Bytes + + + Port {0} to {1}:{2} + + + Port {0} to port {1} + + + Invalid download. + + + Updating... + \ No newline at end of file diff --git a/Translate.cs b/Translate.cs index 09a1cb3..afbc4c3 100644 --- a/Translate.cs +++ b/Translate.cs @@ -36,6 +36,12 @@ namespace MeshCentralRouter {"es","Gfmmvoormt Wzgz"} } }, + { + "Disconnected", + new Dictionary() { + {"es","Wrhxlmmvxgvw"} + } + }, { "MeshCentral Router", new Dictionary() { @@ -48,6 +54,12 @@ namespace MeshCentralRouter {"es","HNH"} } }, + { + "Display {0}", + new Dictionary() { + {"es","Wrhkozb {0}"} + } + }, { "Sort by &Name", new Dictionary() { @@ -66,6 +78,12 @@ namespace MeshCentralRouter {"es","Kzhhdliw"} } }, + { + "Disconnect", + new Dictionary() { + {"es","Wrhxlmmvxg"} + } + }, { "Agent", new Dictionary() { @@ -90,6 +108,12 @@ namespace MeshCentralRouter {"es","Vnzro"} } }, + { + "Double Click Action", + new Dictionary() { + {"es","Wlfyov Xorxp Zxgrlm"} + } + }, { "Unable to connect", new Dictionary() { @@ -120,6 +144,18 @@ namespace MeshCentralRouter {"es","Xlmmvxgrlm"} } }, + { + "Slow", + new Dictionary() { + {"es","Hold"} + } + }, + { + "Remove {0} items?", + new Dictionary() { + {"es","Ivnlev {0} rgvnh?"} + } + }, { "PuTTY SSH client", new Dictionary() { @@ -210,6 +246,12 @@ namespace MeshCentralRouter {"es","Yzxp"} } }, + { + "All Displays", + new Dictionary() { + {"es","Zoo Wrhkozbh"} + } + }, { "Remote Desktop", new Dictionary() { @@ -228,6 +270,12 @@ namespace MeshCentralRouter {"es","NvhsXvmgizo Ilfgvi Rmhgzoozgrlm"} } }, + { + "{0} Bytes", + new Dictionary() { + {"es","{0} Ybgvh"} + } + }, { "No Devices", new Dictionary() { @@ -246,6 +294,12 @@ namespace MeshCentralRouter {"es","Yrmw olxzo klig gl zoo mvgdlip rmgviuzxvh"} } }, + { + "Port {0} to {1}:{2}", + new Dictionary() { + {"es","Klig {0} gl {1}:{2}"} + } + }, { "Installation", new Dictionary() { @@ -300,6 +354,12 @@ namespace MeshCentralRouter {"es","Hgzgv"} } }, + { + "Failed to start remote terminal session", + new Dictionary() { + {"es","Uzrovw gl hgzig ivnlgv gvinrmzo hvhhrlm"} + } + }, { "Ask Consent", new Dictionary() { @@ -336,12 +396,24 @@ namespace MeshCentralRouter {"es","Hvmw glpvm gl ivtrhgvivw kslmv mfnyvi?"} } }, + { + "Local - {0}", + new Dictionary() { + {"es","Olxzo - {0}"} + } + }, { "Unable to bind to local port", new Dictionary() { {"es","Fmzyov gl yrmw gl olxzo klig"} } }, + { + "Create Folder", + new Dictionary() { + {"es","Xivzgv Ulowvi"} + } + }, { "Open...", new Dictionary() { @@ -402,6 +474,12 @@ namespace MeshCentralRouter {"es","Klig Nzkkrmt"} } }, + { + "Failed to start remote desktop session", + new Dictionary() { + {"es","Uzrovw gl hgzig ivnlgv wvhpglk hvhhrlm"} + } + }, { "Languages", new Dictionary() { @@ -468,6 +546,12 @@ namespace MeshCentralRouter {"es","&Hzev Nzkkrmth..."} } }, + { + "Desktop Settings", + new Dictionary() { + {"es","Wvhpglk Hvggrmth"} + } + }, { "Stats...", new Dictionary() { @@ -480,6 +564,12 @@ namespace MeshCentralRouter {"es","Fhvimznv"} } }, + { + "Port {0} to port {1}", + new Dictionary() { + {"es","Klig {0} gl klig {1}"} + } + }, { ", {0} connections.", new Dictionary() { @@ -498,6 +588,12 @@ namespace MeshCentralRouter {"es","&Wvovgv"} } }, + { + "Timeout", + new Dictionary() { + {"es","Grnvlfg"} + } + }, { "E&xit", new Dictionary() { @@ -516,6 +612,12 @@ namespace MeshCentralRouter {"es","Vnzro evirurxzgrlm ivjfrivw"} } }, + { + "Remote - {0}", + new Dictionary() { + {"es","Ivnlgv - {0}"} + } + }, { "Frame rate", new Dictionary() { @@ -540,6 +642,18 @@ namespace MeshCentralRouter {"es","Ivnlgv Urovh..."} } }, + { + "Enhanced keyboard capture", + new Dictionary() { + {"es","Vmszmxvw pvbylziw xzkgfiv"} + } + }, + { + "Device Settings", + new Dictionary() { + {"es","Wverxv Hvggrmth"} + } + }, { "R&efresh", new Dictionary() { @@ -570,6 +684,12 @@ namespace MeshCentralRouter {"es","Ivnvnyvi gsrh xvigrurxzgv"} } }, + { + "Invalid download.", + new Dictionary() { + {"es","Rmezorw wldmolzw."} + } + }, { "(Individual Devices)", new Dictionary() { @@ -594,6 +714,12 @@ namespace MeshCentralRouter {"es","Rmxlnrmt Ybgvh"} } }, + { + "Denied", + new Dictionary() { + {"es","Wvmrvw"} + } + }, { "Relay", new Dictionary() { @@ -606,6 +732,12 @@ namespace MeshCentralRouter {"es","hgzgfhHgirk1"} } }, + { + ", {0} users", + new Dictionary() { + {"es",", {0} fhvih"} + } + }, { "SMS sent", new Dictionary() { @@ -696,6 +828,12 @@ namespace MeshCentralRouter {"es","Nzkkrmt Hvggrmth"} } }, + { + "Fast", + new Dictionary() { + {"es","Uzhg"} + } + }, { "S&ettings...", new Dictionary() { @@ -726,12 +864,36 @@ namespace MeshCentralRouter {"es","Olxzo"} } }, + { + "Connected", + new Dictionary() { + {"es","Xlmmvxgvw"} + } + }, + { + "Rename", + new Dictionary() { + {"es","Ivmznv"} + } + }, { "Remote Desktop Settings", new Dictionary() { {"es","Ivnlgv Wvhpglk Hvggrmth"} } }, + { + "Connecting...", + new Dictionary() { + {"es","Xlmmvxgrmt..."} + } + }, + { + "Very slow", + new Dictionary() { + {"es","Evib hold"} + } + }, { "Stopped.", new Dictionary() { @@ -750,12 +912,24 @@ namespace MeshCentralRouter {"es","Zkkorxzgrlm Ormp"} } }, + { + "{0} Byte", + new Dictionary() { + {"es","{0} Ybgv"} + } + }, { "---", new Dictionary() { } }, + { + "Setup...", + new Dictionary() { + {"es","Hvgfk..."} + } + }, { "This server presented a un-trusted certificate. This may indicate that this is not the correct server or that the server does not have a valid certificate. It is not recommanded, but you can press the ignore button to continue connection to this server.", new Dictionary() { @@ -798,6 +972,12 @@ namespace MeshCentralRouter {"es","Ml Hvzixs Ivhfogh"} } }, + { + "Received invalid network data", + new Dictionary() { + {"es","Ivxvrevw rmezorw mvgdlip wzgz"} + } + }, { "Stats", new Dictionary() { @@ -810,6 +990,12 @@ namespace MeshCentralRouter {"es","Fhv Ivnlgv Pvbylziw Nzk"} } }, + { + "Forward all keyboard keys", + new Dictionary() { + {"es","Ulidziw zoo pvbylziw pvbh"} + } + }, { "Path", new Dictionary() { @@ -846,6 +1032,12 @@ namespace MeshCentralRouter {"es","HXK"} } }, + { + "Medium", + new Dictionary() { + {"es","Nvwrfn"} + } + }, { "Remote desktop quality, scaling and frame rate settings. These can be adjusted depending on the quality of the network connection.", new Dictionary() { @@ -894,12 +1086,30 @@ namespace MeshCentralRouter {"es","Oltrm"} } }, + { + "Waiting for user to grant access...", + new Dictionary() { + {"es","Dzrgrmt uli fhvi gl tizmg zxxvhh..."} + } + }, + { + "Updating...", + new Dictionary() { + {"es","Fkwzgrmt..."} + } + }, { "Ignore", new Dictionary() { {"es","Rtmliv"} } }, + { + "Remove 1 item?", + new Dictionary() { + {"es","Ivnlev 1 rgvn?"} + } + }, { "RDP Port", new Dictionary() { @@ -942,6 +1152,12 @@ namespace MeshCentralRouter {"es","Wverxv Tilfk"} } }, + { + ", Recorded Session", + new Dictionary() { + {"es",", Ivxliwvw Hvhhrlm"} + } + }, { "&Rename", new Dictionary() { diff --git a/UpdateForm.cs b/UpdateForm.cs index aa191b2..61194b5 100644 --- a/UpdateForm.cs +++ b/UpdateForm.cs @@ -132,10 +132,10 @@ namespace MeshCentralRouter using (var sha384 = SHA384Managed.Create()) { using (var stream = File.OpenRead(System.Reflection.Assembly.GetEntryAssembly().Location + ".update.exe")) { downloadHash = sha384.ComputeHash(stream); } } string downloadHashHex = BitConverter.ToString(downloadHash).Replace("-", string.Empty).ToLower(); if (downloadHashHex != hash) { - updateMessage("Invalid download.", 2); + updateMessage(Translate.T(Properties.Resources.InvalidDownload), 2); File.Delete(System.Reflection.Assembly.GetEntryAssembly().Location + ".update.exe"); } else { - updateMessage("Updating...", 0); + updateMessage(Translate.T(Properties.Resources.Updating), 0); Process.Start(System.Reflection.Assembly.GetEntryAssembly().Location + ".update.exe", "-update:" + System.Reflection.Assembly.GetEntryAssembly().Location + " " + string.Join(" ", args)); Application.Exit(); }