Browse Source

which is not completed, will continue to translate!

pull/1299/head
MysticBoy 7 years ago
parent
commit
d9bc0ec79c
  1. 3
      ILSpy/Analyzers/AnalyzeCommand.cs
  2. 17
      ILSpy/CreateListDialog.xaml
  3. 3
      ILSpy/MainWindow.xaml
  4. 14
      ILSpy/NugetPackageBrowserDialog.xaml
  5. 24
      ILSpy/OpenFromGacDialog.xaml
  6. 22
      ILSpy/OpenListDialog.xaml
  7. 234
      ILSpy/Properties/Resources.Designer.cs
  8. 81
      ILSpy/Properties/Resources.resx
  9. 159
      ILSpy/Properties/Resources.zh-Hans.resx
  10. 9
      ILSpy/Search/SearchPane.cs
  11. 8
      ILSpy/TextView/DecompilerTextView.cs
  12. 2
      ILSpy/TextView/EditorCommands.cs
  13. 2
      ILSpy/TextView/FoldingCommands.cs

3
ILSpy/Analyzers/AnalyzeCommand.cs

@ -20,11 +20,12 @@ using System;
using System.Linq; using System.Linq;
using System.Windows.Input; using System.Windows.Input;
using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.TreeNodes; using ICSharpCode.ILSpy.TreeNodes;
namespace ICSharpCode.ILSpy.Analyzers namespace ICSharpCode.ILSpy.Analyzers
{ {
[ExportContextMenuEntry(Header = "Analyze", Icon = "images/Search.png", Category = "Analyze", InputGestureText = "Ctrl+R", Order = 100)] [ExportContextMenuEntry(Header = nameof(Resources.Analyze), Icon = "images/Search.png", Category = nameof(Resources.Analyze), InputGestureText = "Ctrl+R", Order = 100)]
internal sealed class AnalyzeCommand : SimpleCommand, IContextMenuEntry internal sealed class AnalyzeCommand : SimpleCommand, IContextMenuEntry
{ {
public bool IsVisible(TextViewContext context) public bool IsVisible(TextViewContext context)

17
ILSpy/CreateListDialog.xaml

@ -1,6 +1,9 @@
<Window <Window
x:Class="ICSharpCode.ILSpy.CreateListDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls" x:Class="ICSharpCode.ILSpy.CreateListDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Title="New list" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
Title="{x:Static properties:Resources.List}"
Style="{DynamicResource DialogWindow}" Style="{DynamicResource DialogWindow}"
WindowStartupLocation="CenterOwner" WindowStartupLocation="CenterOwner"
ResizeMode="NoResize" ResizeMode="NoResize"
@ -13,12 +16,12 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel> <StackPanel>
<Label>Enter a list name:</Label> <Label Content="{x:Static properties:Resources.EnterListName}"/>
<TextBox Margin="8,8" Name="ListName" TextChanged="TextBox_TextChanged"></TextBox> <TextBox Margin="8,8" Name="ListName" TextChanged="TextBox_TextChanged"></TextBox>
</StackPanel> </StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="8,0"> <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="8,0">
<Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click">Create</Button> <Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click" Content="{x:Static properties:Resources.Create}"/>
<Button IsCancel="True" Margin="2,0">Cancel</Button> <Button IsCancel="True" Margin="2,0" Content="{x:Static properties:Resources.Cancel}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Window> </Window>

3
ILSpy/MainWindow.xaml

@ -3,7 +3,8 @@
x:Class="ICSharpCode.ILSpy.MainWindow" x:Class="ICSharpCode.ILSpy.MainWindow"
x:ClassModifier="public" x:ClassModifier="public"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:tv="clr-namespace:ICSharpCode.TreeView;assembly=ICSharpCode.TreeView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:tv="clr-namespace:ICSharpCode.TreeView;assembly=ICSharpCode.TreeView"
xmlns:local="clr-namespace:ICSharpCode.ILSpy" xmlns:textView="clr-namespace:ICSharpCode.ILSpy.TextView" xmlns:local="clr-namespace:ICSharpCode.ILSpy"
xmlns:textView="clr-namespace:ICSharpCode.ILSpy.TextView"
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls" xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties" xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
Title="ILSpy" Title="ILSpy"

14
ILSpy/NugetPackageBrowserDialog.xaml

@ -1,8 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Window <Window
x:Class="ICSharpCode.ILSpy.NugetPackageBrowserDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls" x:Class="ICSharpCode.ILSpy.NugetPackageBrowserDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
xmlns:treeview="http://icsharpcode.net/sharpdevelop/treeview" xmlns:treeview="http://icsharpcode.net/sharpdevelop/treeview"
Title="Nuget Package Browser" Title="{x:Static properties:Resources.NugetPackageBrowser}"
Style="{DynamicResource DialogWindow}" Style="{DynamicResource DialogWindow}"
WindowStartupLocation="CenterOwner" WindowStartupLocation="CenterOwner"
ResizeMode="CanResizeWithGrip" ResizeMode="CanResizeWithGrip"
@ -20,7 +24,7 @@
<RowDefinition <RowDefinition
Height="Auto" /> Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="Select assemblies to open:" Margin="5" /> <TextBlock Text="{x:Static properties:Resources.SelectAssembliesOpen}" Margin="5" />
<ListBox ItemsSource="{Binding Package.Entries}" Grid.Row="1"> <ListBox ItemsSource="{Binding Package.Entries}" Grid.Row="1">
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
@ -29,8 +33,8 @@
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right"> <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
<Button IsDefault="True" Margin="2,0" IsEnabled="{Binding HasSelection}" Name="okButton" Click="OKButton_Click">Open</Button> <Button IsDefault="True" Margin="2,0" IsEnabled="{Binding HasSelection}" Name="okButton" Click="OKButton_Click" Content="{x:Static properties:Resources.Open}"/>
<Button IsCancel="True" Margin="2,0">Cancel</Button> <Button IsCancel="True" Margin="2,0" Content="{x:Static properties:Resources.Cancel}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Window> </Window>

24
ILSpy/OpenFromGacDialog.xaml

@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Window <Window
x:Class="ICSharpCode.ILSpy.OpenFromGacDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls" x:Class="ICSharpCode.ILSpy.OpenFromGacDialog"
Title="Open From GAC" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
Title="{x:Static properties:Resources.OpenFrom}"
Style="{DynamicResource DialogWindow}" Style="{DynamicResource DialogWindow}"
WindowStartupLocation="CenterOwner" WindowStartupLocation="CenterOwner"
ResizeMode="CanResizeWithGrip" ResizeMode="CanResizeWithGrip"
@ -21,23 +25,23 @@
Height="Auto" /> Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<DockPanel> <DockPanel>
<Label DockPanel.Dock="Left" Target="{Binding ElementName=filterTextBox}">_Search:</Label> <Label DockPanel.Dock="Left" Target="{Binding ElementName=filterTextBox}" Content="{x:Static properties:Resources._Search}"/>
<TextBox Name="filterTextBox" TextChanged="FilterTextBox_TextChanged" /> <TextBox Name="filterTextBox" TextChanged="FilterTextBox_TextChanged" />
</DockPanel> </DockPanel>
<ListView Name="listView" Grid.Row="1" Margin="0, 8" controls:SortableGridViewColumn.SortMode="Automatic" SelectionChanged="ListView_SelectionChanged"> <ListView Name="listView" Grid.Row="1" Margin="0, 8" controls:SortableGridViewColumn.SortMode="Automatic" SelectionChanged="ListView_SelectionChanged">
<ListView.View> <ListView.View>
<GridView> <GridView>
<controls:SortableGridViewColumn x:Name="nameColumn" Width="300" Header="Reference Name" DisplayMemberBinding="{Binding ShortName}" /> <controls:SortableGridViewColumn x:Name="nameColumn" Width="300" Header="{x:Static properties:Resources.ReferenceName}" DisplayMemberBinding="{Binding ShortName}" />
<controls:SortableGridViewColumn Width="75" Header="Version" DisplayMemberBinding="{Binding Version}" /> <controls:SortableGridViewColumn Width="75" Header="{x:Static properties:Resources.Version}" DisplayMemberBinding="{Binding Version}" />
<controls:SortableGridViewColumn Width="65" Header="Culture" DisplayMemberBinding="{Binding Culture}" /> <controls:SortableGridViewColumn Width="65" Header="{x:Static properties:Resources.Culture}" DisplayMemberBinding="{Binding Culture}" />
<controls:SortableGridViewColumn Width="115" Header="Public Key Token" DisplayMemberBinding="{Binding PublicKeyToken}" /> <controls:SortableGridViewColumn Width="115" Header="{x:Static properties:Resources.PublicToken}" DisplayMemberBinding="{Binding PublicKeyToken}" />
<controls:SortableGridViewColumn Width="1000" Header="Location" DisplayMemberBinding="{Binding FileName}" /> <controls:SortableGridViewColumn Width="1000" Header="{x:Static properties:Resources.Location}" DisplayMemberBinding="{Binding FileName}" />
</GridView> </GridView>
</ListView.View> </ListView.View>
</ListView> </ListView>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right"> <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
<Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click">_Open</Button> <Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click" Content="_Open"/>
<Button IsCancel="True" Margin="2,0">Cancel</Button> <Button IsCancel="True" Margin="2,0" Content="Cancel"/>
</StackPanel> </StackPanel>
<ProgressBar Grid.Row="1" Height="10" HorizontalAlignment="Stretch" Name="gacReadingProgressBar" VerticalAlignment="Bottom" Visibility="Hidden" /> <ProgressBar Grid.Row="1" Height="10" HorizontalAlignment="Stretch" Name="gacReadingProgressBar" VerticalAlignment="Bottom" Visibility="Hidden" />
</Grid> </Grid>

22
ILSpy/OpenListDialog.xaml

@ -1,6 +1,10 @@
<Window <Window
x:Class="ICSharpCode.ILSpy.OpenListDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls" x:Class="ICSharpCode.ILSpy.OpenListDialog"
Title="Open List" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
Title="{x:Static properties:Resources.OpenList}"
Style="{DynamicResource DialogWindow}" Style="{DynamicResource DialogWindow}"
WindowStartupLocation="CenterOwner" WindowStartupLocation="CenterOwner"
ResizeMode="CanResizeWithGrip" ResizeMode="CanResizeWithGrip"
@ -16,26 +20,26 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel> <StackPanel>
<Label>Select a list:</Label> <Label Content="{x:Static properties:Resources.SelectList}"/>
</StackPanel> </StackPanel>
<ListView Name="listView" Grid.Row="1" Margin="0, 8" controls:SortableGridViewColumn.SortMode="Automatic" SelectionChanged="ListView_SelectionChanged" <ListView Name="listView" Grid.Row="1" Margin="0, 8" controls:SortableGridViewColumn.SortMode="Automatic" SelectionChanged="ListView_SelectionChanged"
Loaded="listView_Loaded" SelectionMode="Single" MouseDoubleClick="listView_MouseDoubleClick"> Loaded="listView_Loaded" SelectionMode="Single" MouseDoubleClick="listView_MouseDoubleClick">
<ListView.View> <ListView.View>
<GridView> <GridView>
<controls:SortableGridViewColumn x:Name="nameColumn" Header="Name" DisplayMemberBinding="{Binding .}" /> <controls:SortableGridViewColumn x:Name="nameColumn" Header="{x:Static properties:Resources.Name}" DisplayMemberBinding="{Binding .}" />
</GridView> </GridView>
</ListView.View> </ListView.View>
</ListView> </ListView>
<DockPanel Grid.Row="2"> <DockPanel Grid.Row="2">
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right"> <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right">
<Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click">_Open</Button> <Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click" Content="{x:Static properties:Resources.OpenListDialog__Open}"/>
<Button IsCancel="True" Margin="2,0">Cancel</Button> <Button IsCancel="True" Margin="2,0" Content="Cancel"/>
</StackPanel> </StackPanel>
<StackPanel DockPanel.Dock="Left" Orientation="Horizontal" HorizontalAlignment="Left"> <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" HorizontalAlignment="Left">
<Button Margin="2,0" Click="CreateButton_Click">_Create</Button> <Button Margin="2,0" Click="CreateButton_Click" Content="{x:Static properties:Resources._Create}"/>
<Button Margin="2,0" IsEnabled="False" Name="deleteButton" Click="DeleteButton_Click">_Delete</Button> <Button Margin="2,0" IsEnabled="False" Name="deleteButton" Click="DeleteButton_Click" Content="{x:Static properties:Resources.OpenListDialog__Delete}"/>
<Button Margin="2,0" Click="ResetButton_Click">_Reset</Button> <Button Margin="2,0" Click="ResetButton_Click" Content="{x:Static properties:Resources._Reset}"/>
</StackPanel> </StackPanel>
</DockPanel> </DockPanel>
</Grid> </Grid>

234
ILSpy/Properties/Resources.Designer.cs generated

@ -96,6 +96,15 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 _Create 的本地化字符串。
/// </summary>
public static string _Create {
get {
return ResourceManager.GetString("_Create", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 _File 的本地化字符串。 /// 查找类似 _File 的本地化字符串。
/// </summary> /// </summary>
@ -177,6 +186,15 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 _Reset 的本地化字符串。
/// </summary>
public static string _Reset {
get {
return ResourceManager.GetString("_Reset", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Resources 的本地化字符串。 /// 查找类似 Resources 的本地化字符串。
/// </summary> /// </summary>
@ -195,6 +213,15 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 _Search: 的本地化字符串。
/// </summary>
public static string _Search {
get {
return ResourceManager.GetString("_Search", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 _Search for: 的本地化字符串。 /// 查找类似 _Search for: 的本地化字符串。
/// </summary> /// </summary>
@ -213,6 +240,15 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 Toggle Folding 的本地化字符串。
/// </summary>
public static string _ToggleFolding {
get {
return ResourceManager.GetString("_ToggleFolding", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 _View 的本地化字符串。 /// 查找类似 _View 的本地化字符串。
/// </summary> /// </summary>
@ -222,6 +258,15 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 |All Files|*.* 的本地化字符串。
/// </summary>
public static string AllFiles {
get {
return ResourceManager.GetString("AllFiles", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Allow multiple instances 的本地化字符串。 /// 查找类似 Allow multiple instances 的本地化字符串。
/// </summary> /// </summary>
@ -240,6 +285,15 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 Analyze 的本地化字符串。
/// </summary>
public static string Analyze {
get {
return ResourceManager.GetString("Analyze", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Automatically check for updates every week 的本地化字符串。 /// 查找类似 Automatically check for updates every week 的本地化字符串。
/// </summary> /// </summary>
@ -330,6 +384,15 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 Create 的本地化字符串。
/// </summary>
public static string Create {
get {
return ResourceManager.GetString("Create", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 DEBUG -- Decompile All 的本地化字符串。 /// 查找类似 DEBUG -- Decompile All 的本地化字符串。
/// </summary> /// </summary>
@ -384,6 +447,15 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 Display Code 的本地化字符串。
/// </summary>
public static string DisplayCode {
get {
return ResourceManager.GetString("DisplayCode", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Download 的本地化字符串。 /// 查找类似 Download 的本地化字符串。
/// </summary> /// </summary>
@ -429,6 +501,15 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 Enter a list name: 的本地化字符串。
/// </summary>
public static string EnterListName {
get {
return ResourceManager.GetString("EnterListName", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Exit 的本地化字符串。 /// 查找类似 Exit 的本地化字符串。
/// </summary> /// </summary>
@ -510,6 +591,15 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 New list 的本地化字符串。
/// </summary>
public static string List {
get {
return ResourceManager.GetString("List", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Loading... 的本地化字符串。 /// 查找类似 Loading... 的本地化字符串。
/// </summary> /// </summary>
@ -546,6 +636,15 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 Nuget Package Browser 的本地化字符串。
/// </summary>
public static string NugetPackageBrowser {
get {
return ResourceManager.GetString("NugetPackageBrowser", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 OK 的本地化字符串。 /// 查找类似 OK 的本地化字符串。
/// </summary> /// </summary>
@ -573,6 +672,24 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 Open Explorer 的本地化字符串。
/// </summary>
public static string OpenExplorer {
get {
return ResourceManager.GetString("OpenExplorer", resourceCulture);
}
}
/// <summary>
/// 查找类似 Open From GAC 的本地化字符串。
/// </summary>
public static string OpenFrom {
get {
return ResourceManager.GetString("OpenFrom", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Open from _GAC... 的本地化字符串。 /// 查找类似 Open from _GAC... 的本地化字符串。
/// </summary> /// </summary>
@ -582,6 +699,33 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 Open List 的本地化字符串。
/// </summary>
public static string OpenList {
get {
return ResourceManager.GetString("OpenList", resourceCulture);
}
}
/// <summary>
/// 查找类似 _Delete 的本地化字符串。
/// </summary>
public static string OpenListDialog__Delete {
get {
return ResourceManager.GetString("OpenListDialog__Delete", resourceCulture);
}
}
/// <summary>
/// 查找类似 _Open 的本地化字符串。
/// </summary>
public static string OpenListDialog__Open {
get {
return ResourceManager.GetString("OpenListDialog__Open", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Other options 的本地化字符串。 /// 查找类似 Other options 的本地化字符串。
/// </summary> /// </summary>
@ -591,6 +735,24 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 Public Key Token 的本地化字符串。
/// </summary>
public static string PublicToken {
get {
return ResourceManager.GetString("PublicToken", resourceCulture);
}
}
/// <summary>
/// 查找类似 Reference Name 的本地化字符串。
/// </summary>
public static string ReferenceName {
get {
return ResourceManager.GetString("ReferenceName", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 References 的本地化字符串。 /// 查找类似 References 的本地化字符串。
/// </summary> /// </summary>
@ -654,6 +816,42 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 Save Code 的本地化字符串。
/// </summary>
public static string SaveCode {
get {
return ResourceManager.GetString("SaveCode", resourceCulture);
}
}
/// <summary>
/// 查找类似 Search... 的本地化字符串。
/// </summary>
public static string Search {
get {
return ResourceManager.GetString("Search", resourceCulture);
}
}
/// <summary>
/// 查找类似 Search aborted, more than 1000 results found. 的本地化字符串。
/// </summary>
public static string SearchAbortedMoreThan1000ResultsFound {
get {
return ResourceManager.GetString("SearchAbortedMoreThan1000ResultsFound", resourceCulture);
}
}
/// <summary>
/// 查找类似 Searching... 的本地化字符串。
/// </summary>
public static string Searching {
get {
return ResourceManager.GetString("Searching", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Search 的本地化字符串。 /// 查找类似 Search 的本地化字符串。
/// </summary> /// </summary>
@ -663,6 +861,33 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 Select All 的本地化字符串。
/// </summary>
public static string Select {
get {
return ResourceManager.GetString("Select", resourceCulture);
}
}
/// <summary>
/// 查找类似 Select assemblies to open: 的本地化字符串。
/// </summary>
public static string SelectAssembliesOpen {
get {
return ResourceManager.GetString("SelectAssembliesOpen", resourceCulture);
}
}
/// <summary>
/// 查找类似 Select a list: 的本地化字符串。
/// </summary>
public static string SelectList {
get {
return ResourceManager.GetString("SelectList", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Shell 的本地化字符串。 /// 查找类似 Shell 的本地化字符串。
/// </summary> /// </summary>
@ -852,6 +1077,15 @@ namespace ICSharpCode.ILSpy.Properties {
} }
} }
/// <summary>
/// 查找类似 Version 的本地化字符串。
/// </summary>
public static string Version {
get {
return ResourceManager.GetString("Version", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Version {0} is available. 的本地化字符串。 /// 查找类似 Version {0} is available. 的本地化字符串。
/// </summary> /// </summary>

81
ILSpy/Properties/Resources.resx

@ -390,4 +390,85 @@
<data name="CheckAgain" xml:space="preserve"> <data name="CheckAgain" xml:space="preserve">
<value>Check again</value> <value>Check again</value>
</data> </data>
<data name="Searching" xml:space="preserve">
<value>Searching...</value>
</data>
<data name="SearchAbortedMoreThan1000ResultsFound" xml:space="preserve">
<value>Search aborted, more than 1000 results found.</value>
</data>
<data name="Search" xml:space="preserve">
<value>Search...</value>
</data>
<data name="DisplayCode" xml:space="preserve">
<value>Display Code</value>
</data>
<data name="SaveCode" xml:space="preserve">
<value>Save Code</value>
</data>
<data name="AllFiles" xml:space="preserve">
<value>|All Files|*.*</value>
</data>
<data name="OpenExplorer" xml:space="preserve">
<value>Open Explorer</value>
</data>
<data name="Select" xml:space="preserve">
<value>Select All</value>
</data>
<data name="_ToggleFolding" xml:space="preserve">
<value>Toggle Folding</value>
</data>
<data name="Analyze" xml:space="preserve">
<value>Analyze</value>
</data>
<data name="EnterListName" xml:space="preserve">
<value>Enter a list name:</value>
</data>
<data name="Create" xml:space="preserve">
<value>Create</value>
</data>
<data name="List" xml:space="preserve">
<value>New list</value>
</data>
<data name="SelectAssembliesOpen" xml:space="preserve">
<value>Select assemblies to open:</value>
</data>
<data name="NugetPackageBrowser" xml:space="preserve">
<value>Nuget Package Browser</value>
</data>
<data name="OpenFrom" xml:space="preserve">
<value>Open From GAC</value>
</data>
<data name="_Search" xml:space="preserve">
<value>_Search:</value>
</data>
<data name="ReferenceName" xml:space="preserve">
<value>Reference Name</value>
</data>
<data name="Version" xml:space="preserve">
<value>Version</value>
</data>
<data name="Culture" xml:space="preserve">
<value>Culture</value>
</data>
<data name="PublicToken" xml:space="preserve">
<value>Public Key Token</value>
</data>
<data name="OpenList" xml:space="preserve">
<value>Open List</value>
</data>
<data name="SelectList" xml:space="preserve">
<value>Select a list:</value>
</data>
<data name="_Create" xml:space="preserve">
<value>_Create</value>
</data>
<data name="OpenListDialog__Open" xml:space="preserve">
<value>_Open</value>
</data>
<data name="OpenListDialog__Delete" xml:space="preserve">
<value>_Delete</value>
</data>
<data name="_Reset" xml:space="preserve">
<value>_Reset</value>
</data>
</root> </root>

159
ILSpy/Properties/Resources.zh-Hans.resx

@ -312,4 +312,163 @@
<data name="CopyErrorMessage" xml:space="preserve"> <data name="CopyErrorMessage" xml:space="preserve">
<value>复制错误信息</value> <value>复制错误信息</value>
</data> </data>
<data name="VariableNamesFromDebugSymbolsAvailable" xml:space="preserve">
<value>使用调试符号中的变量名称 (如果可用)</value>
</data>
<data name="ShowInfoFromDebugSymbolsAvailable" xml:space="preserve">
<value>显示调试符号的信息 (如果可用)</value>
</data>
<data name="ShowDocumentationDecompiledCode" xml:space="preserve">
<value>在反编译代码中显示 XML 文档</value>
</data>
<data name="EnableFoldingBlocksBraces" xml:space="preserve">
<value>在大括号中的所有块上启用折叠</value>
</data>
<data name="RemoveDeadSideEffectFreeCode" xml:space="preserve">
<value>删除死亡和副作用免费代码</value>
</data>
<data name="InsertUsingDeclarations" xml:space="preserve">
<value>插入使用声明</value>
</data>
<data name="AlwaysBraces" xml:space="preserve">
<value>始终使用大括号</value>
</data>
<data name="ExpandMemberDefinitionsAfterDecompilation" xml:space="preserve">
<value>在反编译后展开成员定义</value>
</data>
<data name="ShowMetadataTokens" xml:space="preserve">
<value>显示元数据标记</value>
</data>
<data name="EnableWordWrap" xml:space="preserve">
<value>启用自动换行</value>
</data>
<data name="AllowMultipleInstances" xml:space="preserve">
<value>允许多个实例</value>
</data>
<data name="ToggleFolding" xml:space="preserve">
<value>切换所有折叠</value>
</data>
<data name="DerivedTypes" xml:space="preserve">
<value>派生类型</value>
</data>
<data name="ResourcesFileFilter" xml:space="preserve">
<value>资源文件 (*.resources)|*.resources|XML资源文件|*.resx </value>
</data>
<data name="SortResultsFitness" xml:space="preserve">
<value>排序结果自适应</value>
</data>
<data name="_Reset" xml:space="preserve">
<value>重置(_R)</value>
</data>
<data name="OpenListDialog__Delete" xml:space="preserve">
<value>删除(_D)</value>
</data>
<data name="OpenListDialog__Open" xml:space="preserve">
<value>打开(_O)</value>
</data>
<data name="_Create" xml:space="preserve">
<value>创建(_C)</value>
</data>
<data name="ReferenceName" xml:space="preserve">
<value>引用名称</value>
</data>
<data name="Version" xml:space="preserve">
<value>Version </value>
</data>
<data name="Culture" xml:space="preserve">
<value>Culture </value>
</data>
<data name="PublicToken" xml:space="preserve">
<value>Public Key Token </value>
</data>
<data name="OpenList" xml:space="preserve">
<value>打开列表</value>
</data>
<data name="SelectList" xml:space="preserve">
<value>选择一个列表:</value>
</data>
<data name="_Search" xml:space="preserve">
<value>搜索(_S):</value>
</data>
<data name="OpenFrom" xml:space="preserve">
<value>从 GAC 打开</value>
</data>
<data name="NugetPackageBrowser" xml:space="preserve">
<value>Nuget 包浏览器</value>
</data>
<data name="List" xml:space="preserve">
<value>新建列表</value>
</data>
<data name="SelectAssembliesOpen" xml:space="preserve">
<value>选择要打开的程序集:</value>
</data>
<data name="Create" xml:space="preserve">
<value>创建</value>
</data>
<data name="EnterListName" xml:space="preserve">
<value>输入列表名称:</value>
</data>
<data name="Analyze" xml:space="preserve">
<value>分析</value>
</data>
<data name="_ToggleFolding" xml:space="preserve">
<value>切换折叠</value>
</data>
<data name="Select" xml:space="preserve">
<value>全部选择</value>
</data>
<data name="OpenExplorer" xml:space="preserve">
<value>打开资源管理器</value>
</data>
<data name="AllFiles" xml:space="preserve">
<value>|所有文件 |*.*</value>
</data>
<data name="SaveCode" xml:space="preserve">
<value>保存代码</value>
</data>
<data name="DisplayCode" xml:space="preserve">
<value>显示代码</value>
</data>
<data name="Search" xml:space="preserve">
<value>搜索...</value>
</data>
<data name="SearchAbortedMoreThan1000ResultsFound" xml:space="preserve">
<value>搜索已中止, 发现超过1000个结果。</value>
</data>
<data name="Searching" xml:space="preserve">
<value>搜索...</value>
</data>
<data name="CheckAgain" xml:space="preserve">
<value>再次检查</value>
</data>
<data name="UpdateILSpyFound" xml:space="preserve">
<value>找不到 ILSpy 的更新。</value>
</data>
<data name="ILSpyVersionAvailable" xml:space="preserve">
<value>新的 ILSpy 版本可用。</value>
</data>
<data name="StandBy" xml:space="preserve">
<value>就绪...</value>
</data>
<data name="ShowInternalTypesMembers" xml:space="preserve">
<value>显示内部类型和成员</value>
</data>
<data name="Show_internalTypesMembers" xml:space="preserve">
<value>显示内部类型和成员(_I)</value>
</data>
<data name="UsingNightlyBuildNewerThanLatestRelease" xml:space="preserve">
<value>您使用的是每日构建版本,比最新版本更新。</value>
</data>
<data name="VersionAvailable" xml:space="preserve">
<value>版本 {0} 已可用。</value>
</data>
<data name="UsingLatestRelease" xml:space="preserve">
<value>您使用的是最新版本。</value>
</data>
<data name="AutomaticallyCheckUpdatesEveryWeek" xml:space="preserve">
<value>每周自动检查更新</value>
</data>
<data name="WatermarkText" xml:space="preserve">
<value>搜索 t:TypeName, m:Member 或c:Constant; 使用完全匹配 (=term), '不应包含' (-term) 或 '必须包含' (+term); 使用 /reg(ular)?Ex(pressions)?/或两者 - t:/Type(Name)?/... </value>
</data>
</root> </root>

9
ILSpy/Search/SearchPane.cs

@ -26,6 +26,7 @@ using System.Windows.Input;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Threading; using System.Windows.Threading;
using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.Search; using ICSharpCode.ILSpy.Search;
using ICSharpCode.ILSpy.TreeNodes; using ICSharpCode.ILSpy.TreeNodes;
@ -83,7 +84,7 @@ namespace ICSharpCode.ILSpy
public void Show() public void Show()
{ {
if (!IsVisible) { if (!IsVisible) {
MainWindow.Instance.ShowInTopPane("Search", this); MainWindow.Instance.ShowInTopPane(Properties.Resources.SearchPane_Search, this);
if (runSearchOnNextShow) { if (runSearchOnNextShow) {
runSearchOnNextShow = false; runSearchOnNextShow = false;
StartSearch(this.SearchTerm); StartSearch(this.SearchTerm);
@ -204,7 +205,7 @@ namespace ICSharpCode.ILSpy
this.language = language; this.language = language;
this.searchMode = searchMode; this.searchMode = searchMode;
this.Results.Add(new SearchResult { Name = "Searching..." }); this.Results.Add(new SearchResult { Name = Properties.Resources.Searching });
} }
public void Cancel() public void Cancel()
@ -236,7 +237,7 @@ namespace ICSharpCode.ILSpy
void AddResult(SearchResult result) void AddResult(SearchResult result)
{ {
if (++resultCount == 1000) { if (++resultCount == 1000) {
result = new SearchResult { Name = "Search aborted, more than 1000 results found." }; result = new SearchResult { Name = Properties.Resources.SearchAbortedMoreThan1000ResultsFound };
cts.Cancel(); cts.Cancel();
} }
dispatcher.BeginInvoke( dispatcher.BeginInvoke(
@ -354,7 +355,7 @@ namespace ICSharpCode.ILSpy
} }
} }
[ExportMainMenuCommand(Menu = "_View", Header = "Search...", MenuIcon = "Images/Find.png", MenuCategory = "View", MenuOrder = 100)] [ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources.Search), MenuIcon = "Images/Find.png", MenuCategory = nameof(Resources.View), MenuOrder = 100)]
[ExportToolbarCommand(ToolTip = "Search (Ctrl+Shift+F or Ctrl+E)", ToolbarIcon = "Images/Find.png", ToolbarCategory = "View", ToolbarOrder = 100)] [ExportToolbarCommand(ToolTip = "Search (Ctrl+Shift+F or Ctrl+E)", ToolbarIcon = "Images/Find.png", ToolbarCategory = "View", ToolbarOrder = 100)]
sealed class ShowSearchCommand : CommandWrapper sealed class ShowSearchCommand : CommandWrapper
{ {

8
ILSpy/TextView/DecompilerTextView.cs

@ -559,7 +559,7 @@ namespace ICSharpCode.ILSpy.TextView
output.WriteLine(); output.WriteLine();
if (wasNormalLimit) { if (wasNormalLimit) {
output.AddButton( output.AddButton(
Images.ViewCode, "Display Code", Images.ViewCode, Properties.Resources.DisplayCode,
delegate { delegate {
DoDecompile(context, ExtendedOutputLengthLimit).HandleExceptions(); DoDecompile(context, ExtendedOutputLengthLimit).HandleExceptions();
}); });
@ -567,7 +567,7 @@ namespace ICSharpCode.ILSpy.TextView
} }
output.AddButton( output.AddButton(
Images.Save, "Save Code", Images.Save, Properties.Resources.SaveCode,
delegate { delegate {
SaveToDisk(context.Language, context.TreeNodes, context.Options); SaveToDisk(context.Language, context.TreeNodes, context.Options);
}); });
@ -669,7 +669,7 @@ namespace ICSharpCode.ILSpy.TextView
SaveFileDialog dlg = new SaveFileDialog(); SaveFileDialog dlg = new SaveFileDialog();
dlg.DefaultExt = language.FileExtension; dlg.DefaultExt = language.FileExtension;
dlg.Filter = language.Name + "|*" + language.FileExtension + "|All Files|*.*"; dlg.Filter = language.Name + "|*" + language.FileExtension + Properties.Resources.AllFiles;
dlg.FileName = CleanUpName(treeNodes.First().ToString()) + language.FileExtension; dlg.FileName = CleanUpName(treeNodes.First().ToString()) + language.FileExtension;
if (dlg.ShowDialog() == true) { if (dlg.ShowDialog() == true) {
SaveToDisk(new DecompilationContext(language, treeNodes.ToArray(), options), dlg.FileName); SaveToDisk(new DecompilationContext(language, treeNodes.ToArray(), options), dlg.FileName);
@ -725,7 +725,7 @@ namespace ICSharpCode.ILSpy.TextView
AvalonEditTextOutput output = new AvalonEditTextOutput(); AvalonEditTextOutput output = new AvalonEditTextOutput();
output.WriteLine("Decompilation complete in " + stopwatch.Elapsed.TotalSeconds.ToString("F1") + " seconds."); output.WriteLine("Decompilation complete in " + stopwatch.Elapsed.TotalSeconds.ToString("F1") + " seconds.");
output.WriteLine(); output.WriteLine();
output.AddButton(null, "Open Explorer", delegate { Process.Start("explorer", "/select,\"" + fileName + "\""); }); output.AddButton(null, Properties.Resources.OpenExplorer, delegate { Process.Start("explorer", "/select,\"" + fileName + "\""); });
output.WriteLine(); output.WriteLine();
tcs.SetResult(output); tcs.SetResult(output);
} catch (OperationCanceledException) { } catch (OperationCanceledException) {

2
ILSpy/TextView/EditorCommands.cs

@ -39,7 +39,7 @@ namespace ICSharpCode.ILSpy.TextView
} }
} }
[ExportContextMenuEntry(Header = "Select All", Category = "Editor")] [ExportContextMenuEntry(Header = nameof(Resources.Select), Category = nameof(Resources.Editor))]
sealed class SelectAllContextMenuEntry : IContextMenuEntry sealed class SelectAllContextMenuEntry : IContextMenuEntry
{ {
public bool IsVisible(TextViewContext context) public bool IsVisible(TextViewContext context)

2
ILSpy/TextView/FoldingCommands.cs

@ -57,7 +57,7 @@ namespace ICSharpCode.ILSpy.TextView
} }
} }
[ExportContextMenuEntryAttribute(Header = "Toggle Folding", Category = "Folding")] [ExportContextMenuEntryAttribute(Header = nameof(Resources._ToggleFolding), Category = nameof(Resources.Folding))]
internal sealed class ToggleContextMenuEntry : IContextMenuEntry internal sealed class ToggleContextMenuEntry : IContextMenuEntry
{ {
public bool IsVisible(TextViewContext context) public bool IsVisible(TextViewContext context)

Loading…
Cancel
Save