From c4d9a9c5f6671f64ef40356622af121851f4fcea Mon Sep 17 00:00:00 2001 From: MysticBoy Date: Tue, 16 Oct 2018 10:42:17 +0800 Subject: [PATCH] All the strings have been extracted, and the complete translation has been completed. --- ILSpy/ContextMenuEntry.cs | 2 +- ILSpy/DebugSteps.xaml | 15 +- ILSpy/DebugSteps.xaml.cs | 2 +- ILSpy/MainWindow.xaml.cs | 2 +- ILSpy/OpenFromGacDialog.xaml | 4 +- ILSpy/Options/DecompilerSettingsPanel.xaml.cs | 2 +- ILSpy/Options/DisplaySettingsPanel.xaml | 4 +- ILSpy/Options/DisplaySettingsPanel.xaml.cs | 2 +- ILSpy/Options/MiscSettingsPanel.xaml.cs | 2 +- ILSpy/Options/OptionsDialog.xaml | 2 +- ILSpy/Options/OptionsDialog.xaml.cs | 5 +- ILSpy/Properties/Resources.Designer.cs | 135 ++++++++++++++++++ ILSpy/Properties/Resources.resx | 45 ++++++ ILSpy/Properties/Resources.zh-Hans.resx | 53 ++++++- 14 files changed, 251 insertions(+), 24 deletions(-) diff --git a/ILSpy/ContextMenuEntry.cs b/ILSpy/ContextMenuEntry.cs index 0bde81f81..f2a94ae09 100644 --- a/ILSpy/ContextMenuEntry.cs +++ b/ILSpy/ContextMenuEntry.cs @@ -219,7 +219,7 @@ namespace ICSharpCode.ILSpy needSeparatorForCategory = false; } MenuItem menuItem = new MenuItem(); - menuItem.Header = entryPair.Metadata.Header; + menuItem.Header = MainWindow.GetResourceString( entryPair.Metadata.Header); menuItem.InputGestureText = entryPair.Metadata.InputGestureText; if (!string.IsNullOrEmpty(entryPair.Metadata.Icon)) { menuItem.Icon = new Image { diff --git a/ILSpy/DebugSteps.xaml b/ILSpy/DebugSteps.xaml index 669fce140..95e672623 100644 --- a/ILSpy/DebugSteps.xaml +++ b/ILSpy/DebugSteps.xaml @@ -4,14 +4,15 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:ICSharpCode.ILSpy" + xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> - - - - + + + + @@ -21,9 +22,9 @@ - - - + + + diff --git a/ILSpy/DebugSteps.xaml.cs b/ILSpy/DebugSteps.xaml.cs index e5c1431e3..131530740 100644 --- a/ILSpy/DebugSteps.xaml.cs +++ b/ILSpy/DebugSteps.xaml.cs @@ -79,7 +79,7 @@ namespace ICSharpCode.ILSpy public static void Show() { - MainWindow.Instance.ShowInTopPane("Debug Steps", new DebugSteps()); + MainWindow.Instance.ShowInTopPane(Properties.Resources.DebugSteps, new DebugSteps()); } void IPane.Closed() diff --git a/ILSpy/MainWindow.xaml.cs b/ILSpy/MainWindow.xaml.cs index 21d285352..e502e72bc 100644 --- a/ILSpy/MainWindow.xaml.cs +++ b/ILSpy/MainWindow.xaml.cs @@ -182,7 +182,7 @@ namespace ICSharpCode.ILSpy } } - private static string GetResourceString(string key) + internal static string GetResourceString(string key) { var str = !string.IsNullOrEmpty(key)? Properties.Resources.ResourceManager.GetString(key):null; return string.IsNullOrEmpty(key)|| string.IsNullOrEmpty(str) ? key : str; diff --git a/ILSpy/OpenFromGacDialog.xaml b/ILSpy/OpenFromGacDialog.xaml index 240d86af4..3398075c1 100644 --- a/ILSpy/OpenFromGacDialog.xaml +++ b/ILSpy/OpenFromGacDialog.xaml @@ -40,8 +40,8 @@ -