mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-31 17:14:58 +00:00
feature<*>: add translation for Simplified Chinese
This commit is contained in:
parent
2054df31b9
commit
5418ccac9e
70 changed files with 1492 additions and 554 deletions
|
@ -5,7 +5,7 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
Height="280" Width="400"
|
||||
Title="About"
|
||||
Title="{StaticResource Text.About}"
|
||||
WindowStartupLocation="CenterOwner" ResizeMode="NoResize">
|
||||
|
||||
<!-- Enable WindowChrome Feature -->
|
||||
|
@ -33,7 +33,7 @@
|
|||
<Path Margin="6,0,2,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Info}"/>
|
||||
|
||||
<!-- Title -->
|
||||
<Label Grid.Column="1" Content="ABOUT" FontWeight="Light"/>
|
||||
<Label Grid.Column="1" Content="{StaticResource Text.About}" FontWeight="Light"/>
|
||||
|
||||
<!-- Close Button -->
|
||||
<Button Click="Quit" Width="32" Grid.Column="3" WindowChrome.IsHitTestVisibleInChrome="True">
|
||||
|
@ -64,7 +64,7 @@
|
|||
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Git}" Fill="{StaticResource Brush.Logo}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="1" Content="SourceGit - OPEN SOURCE GIT CLIENT" HorizontalContentAlignment="Center" VerticalContentAlignment="Bottom" FontSize="18" FontWeight="Bold"/>
|
||||
<Label Grid.Row="1" Content="{StaticResource Text.About.Title}" HorizontalContentAlignment="Center" VerticalContentAlignment="Bottom" FontSize="18" FontWeight="Bold"/>
|
||||
<Label Grid.Row="2" x:Name="version" HorizontalContentAlignment="Center" FontSize="11"/>
|
||||
|
||||
<Label Grid.Row="3" HorizontalContentAlignment="Center" FontSize="11">
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Add Submodule"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.Submodule.Add}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="URL :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.URL}"/>
|
||||
<TextBox x:Name="txtRepoUrl" Grid.Row="2" Grid.Column="1"
|
||||
Height="24"
|
||||
helpers:TextBoxHelper.Placeholder="Git Repository URL">
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.RepositoryURL}">
|
||||
<TextBox.Text>
|
||||
<Binding Path="RepoURL" ElementName="me" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay">
|
||||
<Binding.ValidationRules>
|
||||
|
@ -38,11 +38,11 @@
|
|||
</TextBox.Text>
|
||||
</TextBox>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Parent Folder :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.ParentFolder}"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="1"
|
||||
x:Name="txtPath"
|
||||
Height="24"
|
||||
helpers:TextBoxHelper.Placeholder="Relative foler to store this module. Optional.">
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.ParentFolder.Placeholder}">
|
||||
<TextBox.Text>
|
||||
<Binding Path="LocalPath" ElementName="me" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay">
|
||||
<Binding.ValidationRules>
|
||||
|
@ -55,7 +55,7 @@
|
|||
<CheckBox Grid.Row="4" Grid.Column="1"
|
||||
x:Name="chkRecursive"
|
||||
IsChecked="True"
|
||||
Content="Fetch nested submodules"/>
|
||||
Content="{StaticResource Text.Submodule.FetchNested}"/>
|
||||
|
||||
<Grid Grid.Row="6" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -65,8 +65,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Sure" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Sure" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
<converters:InverseBool x:Key="InverseBool"/>
|
||||
</Grid.Resources>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Apply Patch"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.Apply.Title}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Patch File :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Apply.File}"/>
|
||||
<Grid Grid.Row="2" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
|
@ -41,7 +41,7 @@
|
|||
Grid.Column="0"
|
||||
x:Name="txtPatchFile"
|
||||
Height="24"
|
||||
helpers:TextBoxHelper.Placeholder="Select .patch file to apply">
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Apply.File.Placeholder}">
|
||||
<TextBox.Text>
|
||||
<Binding Path="PatchFile" ElementName="me" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay">
|
||||
<Binding.ValidationRules>
|
||||
|
@ -56,7 +56,7 @@
|
|||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Whitespace :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Apply.WS}"/>
|
||||
<ComboBox x:Name="combWhitespaceOptions" Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" IsEnabled="{Binding ElementName=chkIgnoreWhitespace, Path=IsChecked, Converter={StaticResource InverseBool}}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
@ -71,7 +71,7 @@
|
|||
<CheckBox Grid.Row="4" Grid.Column="1"
|
||||
x:Name="chkIgnoreWhitespace"
|
||||
IsChecked="True"
|
||||
Content="Ignore whitespace changes"/>
|
||||
Content="{StaticResource Text.Apply.IgnoreWS}"/>
|
||||
|
||||
<Grid Grid.Row="6" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -81,8 +81,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
|
@ -20,8 +20,8 @@ namespace SourceGit.UI {
|
|||
public string Arg { get; set; }
|
||||
|
||||
public WhitespaceOption(string n, string d, string a) {
|
||||
Name = n;
|
||||
Desc = d;
|
||||
Name = App.Text(n);
|
||||
Desc = App.Text(d);
|
||||
Arg = a;
|
||||
}
|
||||
}
|
||||
|
@ -39,10 +39,10 @@ namespace SourceGit.UI {
|
|||
InitializeComponent();
|
||||
|
||||
combWhitespaceOptions.ItemsSource = new WhitespaceOption[] {
|
||||
new WhitespaceOption("No Warn", "Turns off the trailing whitespace warning", "nowarn"),
|
||||
new WhitespaceOption("Warn", "Outputs warnings for a few such errors, but applies", "warn"),
|
||||
new WhitespaceOption("Error", "Raise errors and refuses to apply the patch", "error"),
|
||||
new WhitespaceOption("Error All", "Similar to 'error', but shows more", "error-all"),
|
||||
new WhitespaceOption("Apply.NoWarn", "Apply.NoWarn.Desc", "nowarn"),
|
||||
new WhitespaceOption("Apply.Warn", "Apply.Warn.Desc", "warn"),
|
||||
new WhitespaceOption("Apply.Error", "Apply.Error.Desc", "error"),
|
||||
new WhitespaceOption("Apply.ErrorAll", "Apply.ErrorAll.Desc", "error-all"),
|
||||
};
|
||||
combWhitespaceOptions.SelectedIndex = 0;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ namespace SourceGit.UI {
|
|||
private void FindPatchFile(object sender, RoutedEventArgs e) {
|
||||
var dialog = new OpenFileDialog();
|
||||
dialog.Filter = "Patch File|*.patch";
|
||||
dialog.Title = "Select Patch File";
|
||||
dialog.Title = App.Text("Apply.File.Placeholder");
|
||||
dialog.InitialDirectory = repo.Path;
|
||||
dialog.CheckFileExists = true;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
Title="Blame"
|
||||
Title="{StaticResource Text.Blame.Title}"
|
||||
Height="600" Width="800">
|
||||
|
||||
<!-- Enable WindowChrome -->
|
||||
|
@ -53,7 +53,7 @@
|
|||
Fill="{StaticResource Brush.Logo}"
|
||||
WindowChrome.IsHitTestVisibleInChrome="True"
|
||||
MouseLeftButtonDown="LogoMouseButtonDown"/>
|
||||
<Label Content="SOURCE GIT - BLAME" FontWeight="Light"/>
|
||||
<Label Content="{StaticResource Text.Blame.Title}" FontWeight="Light"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Options -->
|
||||
|
@ -102,7 +102,7 @@
|
|||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" x:Name="blameFile" HorizontalAlignment="Left" FontSize="11" Foreground="{StaticResource Brush.FG2}" FontFamily="Consolas"/>
|
||||
<Label Grid.Column="1" HorizontalAlignment="Right" Foreground="{StaticResource Brush.FG2}" FontSize="11" Content="Use right mouse button to view commit information."/>
|
||||
<Label Grid.Column="1" HorizontalAlignment="Right" Foreground="{StaticResource Brush.FG2}" FontSize="11" Content="{StaticResource Text.Blame.Tip}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
|
@ -187,11 +187,11 @@
|
|||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="COMMIT SHA" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="{StaticResource Text.Blame.SHA}" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<Label Grid.Row="0" Grid.Column="1" x:Name="commitID"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="AUTHOR" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{StaticResource Text.Blame.Author}" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<Label Grid.Row="1" Grid.Column="1" x:Name="authorName"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="MODIFY TIME" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{StaticResource Text.Blame.ModifyTime}" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<Label Grid.Row="2" Grid.Column="1" x:Name="authorTime"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace SourceGit.UI {
|
|||
|
||||
if (result.IsBinary) {
|
||||
var error = new Record();
|
||||
error.Line = new Git.Blame.Line() { Content = "BINARY FILE BLAME NOT SUPPORTED!!!", CommitSHA = null };
|
||||
error.Line = new Git.Blame.Line() { Content = App.Text("BinaryNotSupported"), CommitSHA = null };
|
||||
error.BG = Brushes.Red;
|
||||
error.LineNumber = 0;
|
||||
records.Add(error);
|
||||
|
@ -192,7 +192,7 @@ namespace SourceGit.UI {
|
|||
if (record == null || record.Line.CommitSHA == null) return;
|
||||
|
||||
Hyperlink link = new Hyperlink(new Run(record.Line.CommitSHA));
|
||||
link.ToolTip = "CLICK TO GO";
|
||||
link.ToolTip = App.Text("Goto");
|
||||
link.Click += (o, e) => {
|
||||
repo.OnNavigateCommit?.Invoke(record.Line.CommitSHA);
|
||||
e.Handled = true;
|
||||
|
|
|
@ -20,15 +20,15 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Cherry Pick"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.CherryPick.Title}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Commit :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.CherryPick.Commit}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Commit}" Margin="4,0"/>
|
||||
<TextBlock x:Name="desc" Text="cad" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkCommitChanges" IsChecked="True" Content="Commit the changes"/>
|
||||
<CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkCommitChanges" IsChecked="True" Content="{StaticResource Text.CherryPick.CommitChanges}"/>
|
||||
|
||||
<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -38,8 +38,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
|
@ -24,12 +24,12 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Clone Remote Repository"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.Clone}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Repository URL :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Clone.RemoteURL}"/>
|
||||
<TextBox x:Name="txtUrl" Grid.Row="2" Grid.Column="1"
|
||||
Height="24"
|
||||
helpers:TextBoxHelper.Placeholder="Git Repository URL">
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Clone.RemoteURL.Placeholder}">
|
||||
<TextBox.Text>
|
||||
<Binding Path="RemoteUri" ElementName="me" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay">
|
||||
<Binding.ValidationRules>
|
||||
|
@ -39,7 +39,7 @@
|
|||
</TextBox.Text>
|
||||
</TextBox>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Parent Folder :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Clone.RemoteFolder}"/>
|
||||
<Grid Grid.Row="3" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
|
@ -49,7 +49,7 @@
|
|||
<TextBox Grid.Column="0"
|
||||
x:Name="txtParentFolder"
|
||||
Height="24"
|
||||
helpers:TextBoxHelper.Placeholder="Folder to contain this repository">
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Clone.RemoteFolder.Placeholder}">
|
||||
<TextBox.Text>
|
||||
<Binding Path="ParentFolder" ElementName="me" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay">
|
||||
<Binding.ValidationRules>
|
||||
|
@ -63,19 +63,19 @@
|
|||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" Content="Local Name :"/>
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Clone.LocalName}"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="1"
|
||||
VerticalContentAlignment="Center"
|
||||
Height="24"
|
||||
helpers:TextBoxHelper.Placeholder="Repository name. Optional."
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Clone.LocalName.Placeholder}"
|
||||
Text="{Binding LocalName, ElementName=me, Mode=TwoWay}">
|
||||
</TextBox>
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="0" HorizontalAlignment="Right" Content="Remote Name :"/>
|
||||
<Label Grid.Row="5" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Clone.RemoteName}"/>
|
||||
<TextBox Grid.Row="5" Grid.Column="1"
|
||||
VerticalContentAlignment="Center"
|
||||
Height="24"
|
||||
helpers:TextBoxHelper.Placeholder="Remote name. Optional."
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Clone.RemoteName.Placeholder}"
|
||||
Text="{Binding RemoteName, ElementName=me, Mode=TwoWay}">
|
||||
</TextBox>
|
||||
|
||||
|
@ -87,8 +87,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace SourceGit.UI {
|
|||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void SelectParentFolder(object sender, RoutedEventArgs e) {
|
||||
FolderDailog.Open("Select folder to store repository", path => {
|
||||
FolderDailog.Open(App.Text("Clone.RemoteFolder.Placeholder"), path => {
|
||||
txtParentFolder.Text = path;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</UserControl.Resources>
|
||||
|
||||
<TabControl>
|
||||
<TabItem Header="INFORMATION">
|
||||
<TabItem Header="{StaticResource Text.CommitViewer.Info}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
|
@ -68,7 +68,7 @@
|
|||
|
||||
<Image Grid.Row="0" Grid.RowSpan="3" Grid.Column="0" Width="64" Height="64" x:Name="authorAvatar" HorizontalAlignment="Right"/>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Margin="15,0,0,0" Text="AUTHOR" Opacity=".6" Foreground="{StaticResource Brush.FG1}"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Margin="15,0,0,0" Text="{StaticResource Text.CommitViewer.Info.Author}" Opacity=".6" Foreground="{StaticResource Brush.FG1}"/>
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" Margin="12,0,0,0">
|
||||
<TextBox x:Name="authorName" IsReadOnly="True" Background="Transparent" Foreground="{StaticResource Brush.FG1}" BorderThickness="0"/>
|
||||
<TextBox x:Name="authorEmail" Margin="4,0,0,0" IsReadOnly="True" Background="Transparent" Foreground="{StaticResource Brush.FG2}" BorderThickness="0"/>
|
||||
|
@ -95,7 +95,7 @@
|
|||
|
||||
<Image Grid.Row="0" Grid.RowSpan="3" Grid.Column="0" Width="64" Height="64" x:Name="committerAvatar" HorizontalAlignment="Right"/>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Margin="15,0,0,0" Text="COMMITTER" Opacity=".6" Foreground="{StaticResource Brush.FG1}"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Margin="15,0,0,0" Text="{StaticResource Text.CommitViewer.Info.Committer}" Opacity=".6" Foreground="{StaticResource Brush.FG1}"/>
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" Margin="12,0,0,0" Orientation="Horizontal">
|
||||
<TextBox x:Name="committerName" IsReadOnly="True" Background="Transparent" Foreground="{StaticResource Brush.FG1}" BorderThickness="0"/>
|
||||
<TextBox x:Name="committerEmail" Margin="4,0,0,0" IsReadOnly="True" Background="Transparent" Foreground="{StaticResource Brush.FG2}" BorderThickness="0"/>
|
||||
|
@ -122,7 +122,7 @@
|
|||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- SHA -->
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="SHA" HorizontalAlignment="Right" Opacity=".6"/>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="{StaticResource Text.CommitViewer.Info.SHA}" HorizontalAlignment="Right" Opacity=".6"/>
|
||||
<TextBox
|
||||
Grid.Row="0" Grid.Column="1"
|
||||
x:Name="SHA"
|
||||
|
@ -133,7 +133,7 @@
|
|||
Margin="11,0,0,0"/>
|
||||
|
||||
<!-- PARENTS -->
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="PARENTS" HorizontalAlignment="Right" Opacity=".6"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{StaticResource Text.CommitViewer.Info.Parents}" HorizontalAlignment="Right" Opacity=".6"/>
|
||||
<ItemsControl Grid.Row="1" Grid.Column="1" x:Name="parents" Margin="8,0,0,0">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
|
@ -144,7 +144,7 @@
|
|||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Label Margin="0,0,8,0" FontFamily="Consolas">
|
||||
<Hyperlink RequestNavigate="NavigateParent" NavigateUri="{Binding .}" ToolTip="NAVIGATE TO COMMIT">
|
||||
<Hyperlink RequestNavigate="NavigateParent" NavigateUri="{Binding .}" ToolTip="{StaticResource Text.Goto}">
|
||||
<Run Text="{Binding .}"/>
|
||||
</Hyperlink>
|
||||
</Label>
|
||||
|
@ -153,7 +153,7 @@
|
|||
</ItemsControl>
|
||||
|
||||
<!-- Refs -->
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="REFS" HorizontalAlignment="Right" Opacity=".6"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{StaticResource Text.CommitViewer.Info.Refs}" HorizontalAlignment="Right" Opacity=".6"/>
|
||||
<ItemsControl Grid.Row="2" Grid.Column="1" x:Name="refs" Margin="11,0,0,0">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
|
@ -202,7 +202,7 @@
|
|||
</ItemsControl>
|
||||
|
||||
<!-- MESSAGE -->
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="MESSAGE" HorizontalAlignment="Right" Opacity=".6"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{StaticResource Text.CommitViewer.Info.Message}" HorizontalAlignment="Right" Opacity=".6"/>
|
||||
<TextBox
|
||||
Grid.Row="3" Grid.Column="1"
|
||||
x:Name="subject"
|
||||
|
@ -229,8 +229,8 @@
|
|||
<ColumnDefinition Width="96"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Content="CHANGED" HorizontalAlignment="Right" VerticalAlignment="Top" Opacity=".6"/>
|
||||
|
||||
<Label Grid.Column="0" Content="{StaticResource Text.CommitViewer.Info.Changed}" HorizontalAlignment="Right" VerticalAlignment="Top" Opacity=".6"/>
|
||||
<DataGrid
|
||||
Grid.Column="1"
|
||||
x:Name="changeList1"
|
||||
|
@ -270,7 +270,7 @@
|
|||
</TabItem>
|
||||
|
||||
<!-- CHANGES -->
|
||||
<TabItem Header="CHANGES">
|
||||
<TabItem Header="{StaticResource Text.CommitViewer.Changes}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" MinWidth="200"/>
|
||||
|
@ -298,12 +298,12 @@
|
|||
|
||||
<Border Grid.Column="0" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="{StaticResource Brush.Border2}"/>
|
||||
<Path Grid.Column="0" Width="14" Height="14" Fill="{StaticResource Brush.FG2}" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Search}"/>
|
||||
<TextBox Grid.Column="1" x:Name="txtChangeFilter" BorderThickness="0" helpers:TextBoxHelper.Placeholder="Search File ..." TextChanged="SearchChangeFileTextChanged"/>
|
||||
<TextBox Grid.Column="1" x:Name="txtChangeFilter" BorderThickness="0" helpers:TextBoxHelper.Placeholder="{StaticResource Text.CommitViewer.Changes.Search}" TextChanged="SearchChangeFileTextChanged"/>
|
||||
<ToggleButton
|
||||
Grid.Column="2"
|
||||
x:Name="toggleSwitchMode"
|
||||
Margin="4,0,0,0"
|
||||
ToolTip="SWITCH TO LIST/TREE VIEW"
|
||||
ToolTip="{StaticResource Text.CommitViewer.Changes.SwitchMode}"
|
||||
Style="{StaticResource Style.ToggleButton.ListOrTree}"
|
||||
IsChecked="{Binding Source={x:Static source:App.Setting}, Path=UI.UseListInChanges, Mode=TwoWay}"/>
|
||||
</Grid>
|
||||
|
@ -400,7 +400,7 @@
|
|||
</TabItem>
|
||||
|
||||
<!-- FILE TREE -->
|
||||
<TabItem Header="FILES">
|
||||
<TabItem Header="{StaticResource Text.CommitViewer.Files}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" MinWidth="200" MaxWidth="400"/>
|
||||
|
@ -456,7 +456,7 @@
|
|||
|
||||
<StackPanel x:Name="maskPreviewNotSupported" Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed">
|
||||
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Info}" Fill="{StaticResource Brush.FG2}"/>
|
||||
<Label Margin="0,16,0,0" Content="BINARY FILE DETECTED" FontFamily="Consolas" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<Label Margin="0,16,0,0" Content="{StaticResource Text.BinaryNotSupported}" FontFamily="Consolas" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center" Foreground="{StaticResource Brush.FG2}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
|
|
@ -309,7 +309,7 @@ namespace SourceGit.UI {
|
|||
var menu = new ContextMenu();
|
||||
if (change.Index != Git.Change.Status.Deleted) {
|
||||
MenuItem history = new MenuItem();
|
||||
history.Header = "File History";
|
||||
history.Header = App.Text("FileHistory");
|
||||
history.Click += (o, ev) => {
|
||||
var viewer = new FileHistories(repo, path);
|
||||
viewer.Show();
|
||||
|
@ -317,7 +317,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(history);
|
||||
|
||||
MenuItem blame = new MenuItem();
|
||||
blame.Header = "Blame";
|
||||
blame.Header = App.Text("Blame");
|
||||
blame.Click += (obj, ev) => {
|
||||
Blame viewer = new Blame(repo, path, commit.SHA);
|
||||
viewer.Show();
|
||||
|
@ -325,7 +325,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(blame);
|
||||
|
||||
MenuItem explore = new MenuItem();
|
||||
explore.Header = "Reveal in File Explorer";
|
||||
explore.Header = App.Text("RevealFile");
|
||||
explore.Click += (o, ev) => {
|
||||
var absPath = Path.GetFullPath(repo.Path + "\\" + path);
|
||||
Process.Start("explorer", $"/select,{absPath}");
|
||||
|
@ -334,9 +334,9 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(explore);
|
||||
|
||||
MenuItem saveAs = new MenuItem();
|
||||
saveAs.Header = "Save As ...";
|
||||
saveAs.Header = App.Text("SaveAs");
|
||||
saveAs.Click += (obj, ev) => {
|
||||
FolderDailog.Open("Save file to ...", saveTo => {
|
||||
FolderDailog.Open(App.Text("SaveFileTo"), saveTo => {
|
||||
var savePath = Path.Combine(saveTo, Path.GetFileName(path));
|
||||
commit.SaveFileTo(repo, path, savePath);
|
||||
});
|
||||
|
@ -345,7 +345,7 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
MenuItem copyPath = new MenuItem();
|
||||
copyPath.Header = "Copy Path";
|
||||
copyPath.Header = App.Text("CopyPath");
|
||||
copyPath.Click += (obj, ev) => {
|
||||
Clipboard.SetText(path);
|
||||
};
|
||||
|
@ -551,7 +551,7 @@ namespace SourceGit.UI {
|
|||
var obj = repo.GetLFSObject(commit.SHA, node.FilePath);
|
||||
maskRevision.Visibility = Visibility.Visible;
|
||||
iconPreviewRevision.Data = FindResource("Icon.LFS") as Geometry;
|
||||
txtPreviewRevision.Content = $"LFS SIZE: {obj.Size} Bytes";
|
||||
txtPreviewRevision.Content = "LFS SIZE:" + App.Format("Bytes", obj.Size);
|
||||
} else {
|
||||
await Task.Run(() => {
|
||||
var isBinary = false;
|
||||
|
@ -621,7 +621,7 @@ namespace SourceGit.UI {
|
|||
ContextMenu menu = new ContextMenu();
|
||||
if (node.Change == null || node.Change.Index != Git.Change.Status.Deleted) {
|
||||
MenuItem history = new MenuItem();
|
||||
history.Header = "File History";
|
||||
history.Header = App.Text("FileHistory");
|
||||
history.Click += (o, ev) => {
|
||||
var viewer = new FileHistories(repo, node.FilePath);
|
||||
viewer.Show();
|
||||
|
@ -629,7 +629,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(history);
|
||||
|
||||
MenuItem blame = new MenuItem();
|
||||
blame.Header = "Blame";
|
||||
blame.Header = App.Text("Blame");
|
||||
blame.Click += (obj, ev) => {
|
||||
Blame viewer = new Blame(repo, node.FilePath, commit.SHA);
|
||||
viewer.Show();
|
||||
|
@ -637,7 +637,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(blame);
|
||||
|
||||
MenuItem explore = new MenuItem();
|
||||
explore.Header = "Reveal in File Explorer";
|
||||
explore.Header = App.Text("RevealFile");
|
||||
explore.Click += (o, ev) => {
|
||||
var path = Path.GetFullPath(repo.Path + "\\" + node.FilePath);
|
||||
Process.Start("explorer", $"/select,{path}");
|
||||
|
@ -646,10 +646,10 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(explore);
|
||||
|
||||
MenuItem saveAs = new MenuItem();
|
||||
saveAs.Header = "Save As ...";
|
||||
saveAs.Header = App.Text("SaveAs");
|
||||
saveAs.IsEnabled = node.CommitObject == null || node.CommitObject.Kind == Git.Commit.Object.Type.Blob;
|
||||
saveAs.Click += (obj, ev) => {
|
||||
FolderDailog.Open("Save file to ...", saveTo => {
|
||||
FolderDailog.Open(App.Text("SaveFileTo"), saveTo => {
|
||||
var path = Path.Combine(saveTo, node.Name);
|
||||
commit.SaveFileTo(repo, node.FilePath, path);
|
||||
});
|
||||
|
@ -658,7 +658,7 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
MenuItem copyPath = new MenuItem();
|
||||
copyPath.Header = "Copy Path";
|
||||
copyPath.Header = App.Text("CopyPath");
|
||||
copyPath.Click += (obj, ev) => {
|
||||
Clipboard.SetText(node.FilePath);
|
||||
};
|
||||
|
|
|
@ -27,25 +27,25 @@
|
|||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- 仓库帐号 -->
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" Content="CREDENTIAL" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="User : " HorizontalAlignment="Right"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" Content="{StaticResource Text.Configure.Credential}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{StaticResource Text.Configure.User}" HorizontalAlignment="Right"/>
|
||||
<TextBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Height="24"
|
||||
Text="{Binding ElementName=me, Path=UserName, Mode=TwoWay}"
|
||||
helpers:TextBoxHelper.Placeholder="User name for this repository"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="Email : " HorizontalAlignment="Right"/>
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Configure.User.Placeholder}"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{StaticResource Text.Configure.Email}" HorizontalAlignment="Right"/>
|
||||
<TextBox
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Height="24"
|
||||
Text="{Binding ElementName=me, Path=UserEmail, Mode=TwoWay}"
|
||||
helpers:TextBoxHelper.Placeholder="Email address"/>
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Configure.Email.Placeholder}"/>
|
||||
|
||||
<!-- 提交模板 -->
|
||||
<Label Grid.Row="5" Grid.ColumnSpan="2" Content="COMMIT TEMPLATE" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="7" Grid.Column="0" Content="Template : " HorizontalAlignment="Right" VerticalAlignment="Top"/>
|
||||
<Label Grid.Row="5" Grid.ColumnSpan="2" Content="{StaticResource Text.Configure.CommitTemplate}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="7" Grid.Column="0" Content="{StaticResource Text.Configure.Template}" HorizontalAlignment="Right" VerticalAlignment="Top"/>
|
||||
<TextBox
|
||||
Grid.Row="7"
|
||||
Grid.Column="1"
|
||||
|
@ -64,8 +64,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Save" Content="SAVE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Close" Content="CLOSE" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Save" Content="{StaticResource Text.Save}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Close" Content="{StaticResource Text.Close}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -29,20 +29,20 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Create Local Branch"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.CreateBranch}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Based On :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.CreateBranch.BasedOn}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path x:Name="basedOnType" Width="12" Style="{StaticResource Style.Icon}"/>
|
||||
<TextBlock x:Name="basedOnDesc" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center" Text="master"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="New Branch Name :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{StaticResource Text.CreateBranch.Name}"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="1"
|
||||
x:Name="txtName"
|
||||
VerticalContentAlignment="Center"
|
||||
Height="24"
|
||||
helpers:TextBoxHelper.Placeholder="Enter branch name.">
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.CreateBranch.Name.Placeholder}">
|
||||
<TextBox.Text>
|
||||
<Binding ElementName="me" Path="BranchName" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
|
@ -52,17 +52,17 @@
|
|||
</TextBox.Text>
|
||||
</TextBox>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" Content="Local Changes :"/>
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.CreateBranch.LocalChanges}"/>
|
||||
<StackPanel Grid.Row="4" Grid.Column="1" Orientation="Horizontal">
|
||||
<RadioButton Content="Stash & Reapply" GroupName="LocalChanges" IsChecked="{Binding AutoStash, ElementName=me}"/>
|
||||
<RadioButton Content="Discard" Margin="8,0,0,0" GroupName="LocalChanges" IsChecked="{Binding AutoStash, ElementName=me, Mode=OneWay, Converter={StaticResource InverseBool}}"/>
|
||||
<RadioButton Content="{StaticResource Text.CreateBranch.LocalChanges.StashAndReply}" GroupName="LocalChanges" IsChecked="{Binding AutoStash, ElementName=me}"/>
|
||||
<RadioButton Content="{StaticResource Text.CreateBranch.LocalChanges.Discard}" Margin="8,0,0,0" GroupName="LocalChanges" IsChecked="{Binding AutoStash, ElementName=me, Mode=OneWay, Converter={StaticResource InverseBool}}"/>
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox Grid.Row="5" Grid.Column="1"
|
||||
x:Name="chkCheckout"
|
||||
VerticalAlignment="Center"
|
||||
IsChecked="True"
|
||||
Content="Check out after created"/>
|
||||
Content="{StaticResource Text.CreateBranch.Checkout}"/>
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -72,8 +72,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -23,19 +23,19 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Create Tag"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.CreateTag}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="New Tag At :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{StaticResource Text.CreateTag.BasedOn}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="12" x:Name="basedOnType" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Commit}"/>
|
||||
<TextBlock x:Name="basedOnDesc" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center" Text="xxx"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Tag Name :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.CreateTag.Name}"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="1"
|
||||
x:Name="tagName"
|
||||
Height="24"
|
||||
helpers:TextBoxHelper.Placeholder="Recommanded format :v1.0.0-alpha">
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.CreateTag.Name.Placeholder}">
|
||||
<TextBox.Text>
|
||||
<Binding ElementName="me" Path="TagName" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
|
@ -45,13 +45,13 @@
|
|||
</TextBox.Text>
|
||||
</TextBox>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4" Content="Tag Message :"/>
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4" Content="{StaticResource Text.CreateTag.Message}"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="1"
|
||||
x:Name="tagMessage"
|
||||
Height="56"
|
||||
Padding="2"
|
||||
AcceptsReturn="True"
|
||||
helpers:TextBoxHelper.Placeholder="Optional"
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.CreateTag.Message.Placeholder}"
|
||||
helpers:TextBoxHelper.PlaceholderBaseline="Top"/>
|
||||
|
||||
<Grid Grid.Row="6" Grid.ColumnSpan="2">
|
||||
|
@ -62,8 +62,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -42,11 +42,6 @@ namespace SourceGit.UI {
|
|||
/// <param name="repo"></param>
|
||||
/// <param name="branch"></param>
|
||||
public static void Show(Git.Repository repo, Git.Branch branch) {
|
||||
if (branch == null) {
|
||||
App.RaiseError("Empty repository!");
|
||||
return;
|
||||
}
|
||||
|
||||
var dialog = new CreateTag(repo);
|
||||
dialog.based = branch.Head;
|
||||
dialog.basedOnType.Data = dialog.FindResource("Icon.Branch") as Geometry;
|
||||
|
|
|
@ -46,17 +46,17 @@
|
|||
|
||||
<!-- Browser -->
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal" Margin="6,0">
|
||||
<Button Click="OpenExplorer" Margin="4,0,0,0" ToolTip="Open In File Browser">
|
||||
<Button Click="OpenExplorer" Margin="4,0,0,0" ToolTip="{StaticResource Text.Dashboard.Explore.Tip}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Width="16" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder.Open}"/>
|
||||
<Label Content="Explore"/>
|
||||
<Label Content="{StaticResource Text.Dashboard.Explore}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Click="OpenTerminal" Margin="4,0" ToolTip="Open Git Bash">
|
||||
<Button Click="OpenTerminal" Margin="4,0" ToolTip="{StaticResource Text.Dashboard.Terminal.Tip}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Terminal}"/>
|
||||
<Label Content="Terminal"/>
|
||||
<Label Content="{StaticResource Text.Dashboard.Terminal}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
@ -66,47 +66,47 @@
|
|||
<Button Click="OpenFetch" Margin="4,0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Fetch}"/>
|
||||
<Label Content="Fetch"/>
|
||||
<Label Content="{StaticResource Text.Fetch}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Click="OpenPull" Margin="4,0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Pull}"/>
|
||||
<Label Content="Pull"/>
|
||||
<Label Content="{StaticResource Text.Pull}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Click="OpenPush" Margin="4,0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Push}"/>
|
||||
<Label Content="Push"/>
|
||||
<Label Content="{StaticResource Text.Push}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Click="OpenStash" Margin="4,0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.SaveStash}"/>
|
||||
<Label Content="Stash"/>
|
||||
<Label Content="{StaticResource Text.Stash}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Click="OpenApply">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Apply}"/>
|
||||
<Label Content="Apply"/>
|
||||
<Label Content="{StaticResource Text.Apply}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<!-- External Options -->
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Click="OpenSearch" Margin="4,0" ToolTip="Search Commit">
|
||||
<Button Click="OpenSearch" Margin="4,0" ToolTip="{StaticResource Text.Dashboard.Search.Tip}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Search}"/>
|
||||
<Label Content="Search"/>
|
||||
<Label Content="{StaticResource Text.Dashboard.Search}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Click="OpenConfigure" Margin="4,0" ToolTip="Configure This Repository">
|
||||
<Button Click="OpenConfigure" Margin="4,0" ToolTip="{StaticResource Text.Dashboard.Configure.Tip}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Setting}"/>
|
||||
<Label Content="Configure"/>
|
||||
<Label Content="{StaticResource Text.Configure}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
@ -143,7 +143,7 @@
|
|||
|
||||
<!-- WORKSPACE -->
|
||||
<Border Grid.Row="0" Background="{StaticResource Brush.GroupBar}">
|
||||
<Label Margin="4,0,0,0" Content="WORKSPACE" Style="{StaticResource Style.Label.GroupHeader}" />
|
||||
<Label Margin="4,0,0,0" Content="{StaticResource Text.Dashboard.Workspace}" Style="{StaticResource Style.Label.GroupHeader}" />
|
||||
</Border>
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
|
@ -154,7 +154,7 @@
|
|||
<ListViewItem x:Name="historiesSwitch" Selected="SwitchHistories" IsSelected="True">
|
||||
<StackPanel Margin="16,0,0,0" Orientation="Horizontal">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Histories}"/>
|
||||
<Label Margin="4,0,0,0" Content="Histories"/>
|
||||
<Label Margin="4,0,0,0" Content="{StaticResource Text.Histories}"/>
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
|
||||
|
@ -166,7 +166,7 @@
|
|||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Path Grid.Column="0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.WorkingCopy}"/>
|
||||
<Label Grid.Column="1" Margin="4,0,0,0" Content="Commit"/>
|
||||
<Label Grid.Column="1" Margin="4,0,0,0" Content="{StaticResource Text.WorkingCopy}"/>
|
||||
<Border Grid.Column="2" x:Name="localChangesBadge" Style="{StaticResource Style.Border.Badge}">
|
||||
<Label x:Name="localChangesCount" Margin="4,-2,4,-2" Content="999" FontSize="10"/>
|
||||
</Border>
|
||||
|
@ -181,7 +181,7 @@
|
|||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Path Grid.Column="0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Stashes}"/>
|
||||
<Label Grid.Column="1" Margin="4,0,0,0" Content="Stashes"/>
|
||||
<Label Grid.Column="1" Margin="4,0,0,0" Content="{StaticResource Text.Stashes}"/>
|
||||
<Border Grid.Column="2" x:Name="stashBadge" Style="{StaticResource Style.Border.Badge}">
|
||||
<Label x:Name="stashCount" Margin="4,-2,4,-2" Content="999" FontSize="10"/>
|
||||
</Border>
|
||||
|
@ -198,11 +198,11 @@
|
|||
<ColumnDefinition Width="20"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Margin="4,0,0,0" Content="LOCAL BRANCHES" Style="{StaticResource Style.Label.GroupHeader}"/>
|
||||
<Button Grid.Column="1" Click="OpenGitFlow" Background="Transparent" ToolTip="GIT FLOW">
|
||||
<Label Grid.Column="0" Margin="4,0,0,0" Content="{StaticResource Text.Dashboard.LocalBranches}" Style="{StaticResource Style.Label.GroupHeader}"/>
|
||||
<Button Grid.Column="1" Click="OpenGitFlow" Background="Transparent" ToolTip="{StaticResource Text.GitFlow}">
|
||||
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{DynamicResource Icon.Flow}"/>
|
||||
</Button>
|
||||
<Button Margin="0,0,4,0" Grid.Column="3" Click="OpenNewBranch" Background="Transparent" ToolTip="NEW BRANCH">
|
||||
<Button Margin="0,0,4,0" Grid.Column="3" Click="OpenNewBranch" Background="Transparent" ToolTip="{StaticResource Text.Dashboard.NewBranch}">
|
||||
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{DynamicResource Icon.Branch.Add}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
@ -245,7 +245,7 @@
|
|||
Checked="FilterChanged"
|
||||
Unchecked="FilterChanged"
|
||||
Style="{StaticResource Style.ToggleButton.Filter}"
|
||||
ToolTip="FILTER"/>
|
||||
ToolTip="{StaticResource Text.Filter}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
@ -280,8 +280,8 @@
|
|||
<ColumnDefinition Width="20"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Margin="4,0,0,0" Content="REMOTES" Style="{StaticResource Style.Label.GroupHeader}"/>
|
||||
<Button Grid.Column="1" Margin="0,0,4,0" Click="OpenRemote" ToolTip="ADD REMOTE">
|
||||
<Label Grid.Column="0" Margin="4,0,0,0" Content="{StaticResource Text.Dashboard.Remotes}" Style="{StaticResource Style.Label.GroupHeader}"/>
|
||||
<Button Grid.Column="1" Margin="0,0,4,0" Click="OpenRemote" ToolTip="{StaticResource Text.Dashboard.Remotes.Add}">
|
||||
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{DynamicResource Icon.Remote.Add}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
@ -333,7 +333,7 @@
|
|||
Checked="FilterChanged"
|
||||
Unchecked="FilterChanged"
|
||||
Style="{StaticResource Style.ToggleButton.Filter}"
|
||||
ToolTip="FILTER"/>
|
||||
ToolTip="{StaticResource Text.Filter}"/>
|
||||
</Grid>
|
||||
|
||||
<HierarchicalDataTemplate.Triggers>
|
||||
|
@ -369,8 +369,8 @@
|
|||
<ColumnDefinition Width="16"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" x:Name="tagCount" Content="TAGS" Style="{StaticResource Style.Label.GroupHeader}"/>
|
||||
<Button Grid.Column="1" Click="OpenNewTag" ToolTip="NEW TAG">
|
||||
<Label Grid.Column="0" x:Name="tagCount" Style="{StaticResource Style.Label.GroupHeader}"/>
|
||||
<Button Grid.Column="1" Click="OpenNewTag" ToolTip="{StaticResource Text.Dashboard.Tags.Add}">
|
||||
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Tag.Add}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
@ -416,7 +416,7 @@
|
|||
Checked="FilterChanged"
|
||||
Unchecked="FilterChanged"
|
||||
Style="{StaticResource Style.ToggleButton.Filter}"
|
||||
ToolTip="FILTER"/>
|
||||
ToolTip="{StaticResource Text.Filter}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
@ -440,11 +440,11 @@
|
|||
<ColumnDefinition Width="16"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" x:Name="submoduleCount" Content="SUBMODULES" Style="{StaticResource Style.Label.GroupHeader}"/>
|
||||
<Button Grid.Column="1" Click="OpenAddSubmodule" ToolTip="ADD SUBMODULE">
|
||||
<Label Grid.Column="0" x:Name="submoduleCount" Style="{StaticResource Style.Label.GroupHeader}"/>
|
||||
<Button Grid.Column="1" Click="OpenAddSubmodule" ToolTip="{StaticResource Text.Dashboard.Submodules.Add}">
|
||||
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Submodule}"/>
|
||||
</Button>
|
||||
<Button Grid.Column="3" Click="UpdateSubmodule" ToolTip="UPDATE SUBMODULE">
|
||||
<Button Grid.Column="3" Click="UpdateSubmodule" ToolTip="{StaticResource Text.Dashboard.Submodules.Update}">
|
||||
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Loading}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
@ -508,7 +508,7 @@
|
|||
|
||||
<Label Grid.Column="0" x:Name="txtMergeProcessing" FontWeight="DemiBold" Foreground="{StaticResource Brush.FG3}"/>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<Button x:Name="btnResolve" Click="Resolve" Content="RESOLVE" Margin="2">
|
||||
<Button x:Name="btnResolve" Click="Resolve" Content="{StaticResource Text.Dashboard.Resolve}" Margin="2">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource Style.Button.Bordered}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush.Window}"/>
|
||||
|
@ -516,8 +516,8 @@
|
|||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
<Button x:Name="btnContinue" Click="Continue" Content="CONTINUE" Style="{StaticResource Style.Button.AccentBordered}" Margin="2"/>
|
||||
<Button Grid.Column="3" Click="Abort" Content="ABORT" Style="{StaticResource Style.Button.Bordered}" Foreground="{StaticResource Brush.FG3}" Margin="2"/>
|
||||
<Button x:Name="btnContinue" Click="Continue" Content="{StaticResource Text.Dashboard.Continue}" Style="{StaticResource Style.Button.AccentBordered}" Margin="2"/>
|
||||
<Button Grid.Column="3" Click="Abort" Content="{StaticResource Text.Dashboard.Abort}" Style="{StaticResource Style.Button.Bordered}" Foreground="{StaticResource Brush.FG3}" Margin="2"/>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
|
|
@ -298,7 +298,7 @@ namespace SourceGit.UI {
|
|||
foreach (var t in tags) t.IsFiltered = repo.LogFilters.Contains(t.Name);
|
||||
|
||||
Dispatcher.Invoke(() => {
|
||||
tagCount.Content = $"TAGS ({tags.Count})";
|
||||
tagCount.Content = App.Text("Dashboard.Tags") + $" ({tags.Count})";
|
||||
tagList.ItemsSource = tags;
|
||||
});
|
||||
});
|
||||
|
@ -308,7 +308,7 @@ namespace SourceGit.UI {
|
|||
Task.Run(() => {
|
||||
var submodules = repo.Submodules();
|
||||
Dispatcher.Invoke(() => {
|
||||
submoduleCount.Content = $"SUBMODULES ({submodules.Count})";
|
||||
submoduleCount.Content = App.Text("Dashboard.Submodules") + $" ({submodules.Count})";
|
||||
submoduleList.ItemsSource = submodules;
|
||||
});
|
||||
});
|
||||
|
@ -358,7 +358,7 @@ namespace SourceGit.UI {
|
|||
private void OpenTerminal(object sender, RoutedEventArgs e) {
|
||||
var bash = Path.Combine(App.Setting.Tools.GitExecutable, "..", "bash.exe");
|
||||
if (!File.Exists(bash)) {
|
||||
App.RaiseError("Can NOT locate bash.exe. Make sure bash.exe exists under the same folder with git.exe");
|
||||
App.RaiseError(App.Text("MissingBash"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -391,16 +391,16 @@ namespace SourceGit.UI {
|
|||
|
||||
if (File.Exists(cherryPickMerge)) {
|
||||
abortCommand = "cherry-pick";
|
||||
txtMergeProcessing.Content = "Cherry-Pick merge request detected! Press 'Abort' to restore original HEAD";
|
||||
txtMergeProcessing.Content = App.Text("Conflict.CherryPick");
|
||||
} else if (File.Exists(rebaseMerge)) {
|
||||
abortCommand = "rebase";
|
||||
txtMergeProcessing.Content = "Rebase merge request detected! Press 'Abort' to restore original HEAD";
|
||||
txtMergeProcessing.Content = App.Text("Conflict.Rebase");
|
||||
} else if (File.Exists(revertMerge)) {
|
||||
abortCommand = "revert";
|
||||
txtMergeProcessing.Content = "Revert merge request detected! Press 'Abort' to restore original HEAD";
|
||||
txtMergeProcessing.Content = App.Text("Conflict.Revert");
|
||||
} else if (File.Exists(otherMerge)) {
|
||||
abortCommand = "merge";
|
||||
txtMergeProcessing.Content = "Merge request detected! Press 'Abort' to restore original HEAD";
|
||||
txtMergeProcessing.Content = App.Text("Conflict.Merge");
|
||||
} else {
|
||||
abortCommand = null;
|
||||
}
|
||||
|
@ -536,21 +536,21 @@ namespace SourceGit.UI {
|
|||
|
||||
if (repo.IsGitFlowEnabled()) {
|
||||
var startFeature = new MenuItem();
|
||||
startFeature.Header = "Start Feature ...";
|
||||
startFeature.Header = App.Text("GitFlow.StartFeature");
|
||||
startFeature.Click += (o, e) => {
|
||||
GitFlowStartBranch.Show(repo, Git.Branch.Type.Feature);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var startRelease = new MenuItem();
|
||||
startRelease.Header = "Start Release ...";
|
||||
startRelease.Header = App.Text("GitFlow.StartRelease");
|
||||
startRelease.Click += (o, e) => {
|
||||
GitFlowStartBranch.Show(repo, Git.Branch.Type.Release);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var startHotfix = new MenuItem();
|
||||
startHotfix.Header = "Start Hotfix ...";
|
||||
startHotfix.Header = App.Text("GitFlow.StartHotfix");
|
||||
startHotfix.Click += (o, e) => {
|
||||
GitFlowStartBranch.Show(repo, Git.Branch.Type.Hotfix);
|
||||
e.Handled = true;
|
||||
|
@ -561,7 +561,7 @@ namespace SourceGit.UI {
|
|||
button.ContextMenu.Items.Add(startHotfix);
|
||||
} else {
|
||||
var init = new MenuItem();
|
||||
init.Header = "Initialize Git-Flow";
|
||||
init.Header = App.Text("GitFlow.Init");
|
||||
init.Click += (o, e) => {
|
||||
GitFlowSetup.Show(repo);
|
||||
e.Handled = true;
|
||||
|
@ -593,7 +593,7 @@ namespace SourceGit.UI {
|
|||
var branch = node.Branch;
|
||||
|
||||
var push = new MenuItem();
|
||||
push.Header = $"Push '{branch.Name}'";
|
||||
push.Header = App.Format("BranchCM.Push", branch.Name);
|
||||
push.Click += (o, e) => {
|
||||
Push.Show(repo, branch);
|
||||
e.Handled = true;
|
||||
|
@ -601,7 +601,7 @@ namespace SourceGit.UI {
|
|||
|
||||
if (branch.IsCurrent) {
|
||||
var discard = new MenuItem();
|
||||
discard.Header = "Discard all changes";
|
||||
discard.Header = App.Text("BranchCM.DiscardAll");
|
||||
discard.Click += (o, e) => {
|
||||
Discard.Show(repo, null);
|
||||
e.Handled = true;
|
||||
|
@ -612,14 +612,14 @@ namespace SourceGit.UI {
|
|||
if (!string.IsNullOrEmpty(branch.Upstream)) {
|
||||
var upstream = branch.Upstream.Substring(13);
|
||||
var fastForward = new MenuItem();
|
||||
fastForward.Header = $"Fast-Forward to '{upstream}'";
|
||||
fastForward.Header = App.Format("BranchCM.FastForward", upstream);
|
||||
fastForward.Click += (o, e) => {
|
||||
Merge.StartDirectly(repo, upstream, branch.Name);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var pull = new MenuItem();
|
||||
pull.Header = $"Pull '{upstream}'";
|
||||
pull.Header = App.Format("BranchCM.Pull", upstream);
|
||||
pull.Click += (o, e) => {
|
||||
Pull.Show(repo);
|
||||
e.Handled = true;
|
||||
|
@ -634,7 +634,7 @@ namespace SourceGit.UI {
|
|||
var current = repo.CurrentBranch();
|
||||
|
||||
var checkout = new MenuItem();
|
||||
checkout.Header = $"Checkout {branch.Name}";
|
||||
checkout.Header = App.Format("BranchCM.Checkout", branch.Name);
|
||||
checkout.Click += (o, e) => {
|
||||
Task.Run(() => repo.Checkout(node.Branch.Name));
|
||||
e.Handled = true;
|
||||
|
@ -644,7 +644,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(push);
|
||||
|
||||
var merge = new MenuItem();
|
||||
merge.Header = $"Merge '{branch.Name}' into '{current.Name}'";
|
||||
merge.Header = App.Format("BranchCM.Merge", branch.Name, current.Name);
|
||||
merge.Click += (o, e) => {
|
||||
Merge.Show(repo, branch.Name, current.Name);
|
||||
e.Handled = true;
|
||||
|
@ -652,7 +652,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(merge);
|
||||
|
||||
var rebase = new MenuItem();
|
||||
rebase.Header = $"Rebase '{current.Name}' on '{branch.Name}'";
|
||||
rebase.Header = App.Format("BranchCM.Rebase", current.Name, branch.Name);
|
||||
rebase.Click += (o, e) => {
|
||||
Rebase.Show(repo, branch);
|
||||
e.Handled = true;
|
||||
|
@ -669,7 +669,7 @@ namespace SourceGit.UI {
|
|||
flowIcon.Width = 10;
|
||||
|
||||
var finish = new MenuItem();
|
||||
finish.Header = $"Git Flow - Finish '{branch.Name}'";
|
||||
finish.Header = App.Format("BranchCM.Finish", branch.Name);
|
||||
finish.Icon = flowIcon;
|
||||
finish.Click += (o, e) => {
|
||||
GitFlowFinishBranch.Show(repo, branch);
|
||||
|
@ -680,7 +680,7 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
var rename = new MenuItem();
|
||||
rename.Header = $"Rename '{branch.Name}'";
|
||||
rename.Header = App.Format("BranchCM.Rename", branch.Name);
|
||||
rename.Click += (o, e) => {
|
||||
RenameBranch.Show(repo, branch);
|
||||
e.Handled = true;
|
||||
|
@ -689,7 +689,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(rename);
|
||||
|
||||
var delete = new MenuItem();
|
||||
delete.Header = $"Delete '{branch.Name}'";
|
||||
delete.Header = App.Format("BranchCM.Delete", branch.Name);
|
||||
delete.IsEnabled = !branch.IsCurrent;
|
||||
delete.Click += (o, e) => {
|
||||
DeleteBranch.Show(repo, branch);
|
||||
|
@ -699,7 +699,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(new Separator());
|
||||
|
||||
var createBranch = new MenuItem();
|
||||
createBranch.Header = "Create Branch";
|
||||
createBranch.Header = App.Text("CreateBranch");
|
||||
createBranch.Click += (o, e) => {
|
||||
CreateBranch.Show(repo, branch);
|
||||
e.Handled = true;
|
||||
|
@ -707,7 +707,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(createBranch);
|
||||
|
||||
var createTag = new MenuItem();
|
||||
createTag.Header = "Create Tag";
|
||||
createTag.Header = App.Text("CreateTag");
|
||||
createTag.Click += (o, e) => {
|
||||
CreateTag.Show(repo, branch);
|
||||
e.Handled = true;
|
||||
|
@ -730,7 +730,7 @@ namespace SourceGit.UI {
|
|||
currentTrackingIcon.Width = 10;
|
||||
|
||||
var tracking = new MenuItem();
|
||||
tracking.Header = "Tracking ...";
|
||||
tracking.Header = App.Text("BranchCM.Tracking");
|
||||
tracking.Icon = trackingIcon;
|
||||
|
||||
foreach (var b in remoteBranches) {
|
||||
|
@ -749,7 +749,7 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
var copy = new MenuItem();
|
||||
copy.Header = "Copy Branch Name";
|
||||
copy.Header = App.Text("BranchCM.CopyName");
|
||||
copy.Click += (o, e) => {
|
||||
Clipboard.SetText(branch.Name);
|
||||
e.Handled = true;
|
||||
|
@ -768,14 +768,14 @@ namespace SourceGit.UI {
|
|||
|
||||
private void OpenRemoteContextMenu(RemoteNode node) {
|
||||
var fetch = new MenuItem();
|
||||
fetch.Header = $"Fetch '{node.Name}'";
|
||||
fetch.Header = App.Format("RemoteCM.Fetch", node.Name);
|
||||
fetch.Click += (o, e) => {
|
||||
Fetch.Show(repo, node.Name);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var edit = new MenuItem();
|
||||
edit.Header = $"Edit '{node.Name}'";
|
||||
edit.Header = App.Format("RemoteCM.Edit", node.Name);
|
||||
edit.Click += (o, e) => {
|
||||
var remotes = repo.Remotes();
|
||||
var found = remotes.Find(r => r.Name == node.Name);
|
||||
|
@ -784,14 +784,14 @@ namespace SourceGit.UI {
|
|||
};
|
||||
|
||||
var delete = new MenuItem();
|
||||
delete.Header = $"Delete '{node.Name}'";
|
||||
delete.Header = App.Format("RemoteCM.Delete", node.Name);
|
||||
delete.Click += (o, e) => {
|
||||
DeleteRemote.Show(repo, node.Name);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var copy = new MenuItem();
|
||||
copy.Header = "Copy Remote URL";
|
||||
copy.Header = App.Text("RemoteCM.CopyURL");
|
||||
copy.Click += (o, e) => {
|
||||
var remotes = repo.Remotes();
|
||||
var found = remotes.Find(r => r.Name == node.Name);
|
||||
|
@ -815,7 +815,7 @@ namespace SourceGit.UI {
|
|||
if (current == null) return;
|
||||
|
||||
var checkout = new MenuItem();
|
||||
checkout.Header = $"Checkout '{branch.Name}'";
|
||||
checkout.Header = App.Format("BranchCM.Checkout", branch.Name);
|
||||
checkout.Click += (o, e) => {
|
||||
var branches = repo.Branches();
|
||||
var tracked = null as Git.Branch;
|
||||
|
@ -838,49 +838,49 @@ namespace SourceGit.UI {
|
|||
};
|
||||
|
||||
var pull = new MenuItem();
|
||||
pull.Header = $"Pull '{branch.Name}' into '{current.Name}'";
|
||||
pull.Header = App.Format("BranchCM.PullInto", branch.Name, current.Name);
|
||||
pull.Click += (o, e) => {
|
||||
Pull.Show(repo, branch.Name);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var merge = new MenuItem();
|
||||
merge.Header = $"Merge '{branch.Name}' into '{current.Name}'";
|
||||
merge.Header = App.Format("BranchCM.Merge", branch.Name, current.Name);
|
||||
merge.Click += (o, e) => {
|
||||
Merge.Show(repo, branch.Name, current.Name);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var rebase = new MenuItem();
|
||||
rebase.Header = $"Rebase '{current.Name}' on '{branch.Name}'";
|
||||
rebase.Header = App.Format("BranchCM.Rebase", current.Name, branch.Name);
|
||||
rebase.Click += (o, e) => {
|
||||
Rebase.Show(repo, branch);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var delete = new MenuItem();
|
||||
delete.Header = $"Delete '{branch.Name}'";
|
||||
delete.Header = App.Format("BranchCM.Delete", branch.Name);
|
||||
delete.Click += (o, e) => {
|
||||
DeleteBranch.Show(repo, branch);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var createBranch = new MenuItem();
|
||||
createBranch.Header = "Create New Branch";
|
||||
createBranch.Header = App.Text("CreateBranch");
|
||||
createBranch.Click += (o, e) => {
|
||||
CreateBranch.Show(repo, branch);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var createTag = new MenuItem();
|
||||
createTag.Header = "Create New Tag";
|
||||
createTag.Header = App.Text("CreateTag");
|
||||
createTag.Click += (o, e) => {
|
||||
CreateTag.Show(repo, branch);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var copy = new MenuItem();
|
||||
copy.Header = "Copy Branch Name";
|
||||
copy.Header = App.Text("BranchCM.CopyName");
|
||||
copy.Click += (o, e) => {
|
||||
Clipboard.SetText(branch.Name);
|
||||
e.Handled = true;
|
||||
|
@ -946,28 +946,28 @@ namespace SourceGit.UI {
|
|||
if (tag == null) return;
|
||||
|
||||
var createBranch = new MenuItem();
|
||||
createBranch.Header = "Create New Branch";
|
||||
createBranch.Header = App.Text("CreateBranch");
|
||||
createBranch.Click += (o, ev) => {
|
||||
CreateBranch.Show(repo, tag);
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
var pushTag = new MenuItem();
|
||||
pushTag.Header = $"Push '{tag.Name}'";
|
||||
pushTag.Header = App.Format("TagCM.Push", tag.Name);
|
||||
pushTag.Click += (o, ev) => {
|
||||
PushTag.Show(repo, tag);
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
var deleteTag = new MenuItem();
|
||||
deleteTag.Header = $"Delete '{tag.Name}'";
|
||||
deleteTag.Header = App.Format("TagCM.Delete", tag.Name);
|
||||
deleteTag.Click += (o, ev) => {
|
||||
DeleteTag.Show(repo, tag);
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
var copy = new MenuItem();
|
||||
copy.Header = "Copy Name";
|
||||
copy.Header = App.Text("TagCM.Copy");
|
||||
copy.Click += (o, ev) => {
|
||||
Clipboard.SetText(tag.Name);
|
||||
ev.Handled = true;
|
||||
|
@ -1004,7 +1004,7 @@ namespace SourceGit.UI {
|
|||
if (path == null) return;
|
||||
|
||||
var open = new MenuItem();
|
||||
open.Header = "Open Submodule Repository";
|
||||
open.Header = App.Text("Submodule.Open");
|
||||
open.Click += (o, ev) => {
|
||||
var sub = new Git.Repository();
|
||||
sub.Path = Path.Combine(repo.Path, path);
|
||||
|
@ -1016,7 +1016,7 @@ namespace SourceGit.UI {
|
|||
};
|
||||
|
||||
var copy = new MenuItem();
|
||||
copy.Header = "Copy Relative Path";
|
||||
copy.Header = App.Text("Submodule.CopyPath");
|
||||
copy.Click += (o, ev) => {
|
||||
Clipboard.SetText(path);
|
||||
ev.Handled = true;
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:SourceGit.UI"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="160" d:DesignWidth="500" Height="128" Width="500">
|
||||
<Grid>
|
||||
|
@ -20,9 +19,9 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Confirm To Delete Branch"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.DeleteBranch}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Branch :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.DeleteBranch.Branch}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}" Margin="4,0"/>
|
||||
<TextBlock x:Name="branchName" Text="master" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
|
@ -36,8 +35,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Sure" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Sure" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Confirm To Delete Remote"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.DeleteRemote}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Remote :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.DeleteRemote.Remote}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Remote}" Margin="4,0"/>
|
||||
<TextBlock x:Name="remoteName" Text="origin" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
|
@ -35,8 +35,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Sure" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Sure" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
|
@ -20,15 +20,15 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Confirm To Delete Tag"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.DeleteTag}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Tag :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.DeleteTag.Tag}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Tag}" Margin="4,0"/>
|
||||
<TextBlock x:Name="tagName" Text="v1.0" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkWithRemote" Content="Delete from remote repositories"/>
|
||||
<CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkWithRemote" Content="{StaticResource Text.DeleteTag.WithRemote}"/>
|
||||
|
||||
<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -38,8 +38,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -49,18 +49,18 @@
|
|||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="2" x:Name="textChangeOptions" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Width="26" Click="Go2Next" ToolTip="Next Difference" Background="Transparent">
|
||||
<Button Width="26" Click="Go2Next" ToolTip="{StaticResource Text.Diff.Next}" Background="Transparent">
|
||||
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.MoveDown}"/>
|
||||
</Button>
|
||||
|
||||
<Button Click="Go2Prev" ToolTip="Previous Difference" Background="Transparent">
|
||||
<Button Click="Go2Prev" ToolTip="{StaticResource Text.Diff.Prev}" Background="Transparent">
|
||||
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.MoveUp}"/>
|
||||
</Button>
|
||||
|
||||
<ToggleButton
|
||||
Margin="8,0,0,0"
|
||||
Style="{StaticResource Style.ToggleButton.SplitDirection}"
|
||||
ToolTip="Toggle One-Side/Two-Sides"
|
||||
ToolTip="{StaticResource Text.Diff.Mode}"
|
||||
IsChecked="{Binding Source={x:Static sourcegit:App.Setting}, Path=UI.UseCombinedDiff, Mode=TwoWay}"
|
||||
Checked="ChangeDiffMode" Unchecked="ChangeDiffMode"/>
|
||||
</StackPanel>
|
||||
|
@ -79,7 +79,7 @@
|
|||
|
||||
<Border x:Name="sizeChange" Grid.Row="1" ClipToBounds="True" Background="{StaticResource Brush.Window}" Visibility="Collapsed">
|
||||
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
|
||||
<Label x:Name="txtSizeChangeTitle" Content="BINARY DIFF" Margin="0,0,0,32" FontSize="18" FontWeight="UltraBold" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Center"/>
|
||||
<Label x:Name="txtSizeChangeTitle" Content="{StaticResource Text.Diff.Binary}" Margin="0,0,0,32" FontSize="18" FontWeight="UltraBold" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Center"/>
|
||||
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Binary}" Fill="{StaticResource Brush.FG2}"/>
|
||||
<Grid Margin="0,16,0,0" HorizontalAlignment="Center" TextElement.FontSize="18" TextElement.FontWeight="UltraBold">
|
||||
<Grid.RowDefinitions>
|
||||
|
@ -88,13 +88,13 @@
|
|||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="64"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="OLD :" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="{StaticResource Text.Diff.Binary.Old}" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<Label Grid.Row="0" Grid.Column="1" x:Name="txtOldSize" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Right"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="NEW :" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{StaticResource Text.Diff.Binary.New}" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<Label Grid.Row="1" Grid.Column="1" x:Name="txtNewSize" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Right"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
@ -103,14 +103,14 @@
|
|||
<Border x:Name="noChange" Grid.Row="1" Visibility="Collapsed">
|
||||
<StackPanel Orientation="Vertical" VerticalAlignment="Center" Opacity=".2">
|
||||
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Check}"/>
|
||||
<Label Margin="0,8,0,0" Content="NO CHANGES OR ONLY EOL CHANGES" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center"/>
|
||||
<Label Margin="0,8,0,0" Content="{StaticResource Text.Diff.NoChange}" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border x:Name="mask" Grid.RowSpan="2" Visibility="Collapsed">
|
||||
<StackPanel Orientation="Vertical" VerticalAlignment="Center" Opacity=".2">
|
||||
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Diff}"/>
|
||||
<Label Margin="0,8,0,0" Content="SELECT FILE TO VIEW CHANGES" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center"/>
|
||||
<Label Margin="0,8,0,0" Content="{StaticResource Text.Diff.Welcome}" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
|
|
@ -389,9 +389,9 @@ namespace SourceGit.UI {
|
|||
loading.Visibility = Visibility.Collapsed;
|
||||
sizeChange.Visibility = Visibility.Visible;
|
||||
textChangeOptions.Visibility = Visibility.Collapsed;
|
||||
txtSizeChangeTitle.Content = "BINARY DIFF";
|
||||
txtNewSize.Content = $"{bc.Size} Bytes";
|
||||
txtOldSize.Content = $"{bc.PreSize} Bytes";
|
||||
txtSizeChangeTitle.Content = App.Text("Diff.Binary");
|
||||
txtNewSize.Content = App.Format("Bytes", bc.PreSize);
|
||||
txtOldSize.Content = App.Format("Bytes", bc.Size);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -407,9 +407,9 @@ namespace SourceGit.UI {
|
|||
loading.Visibility = Visibility.Collapsed;
|
||||
sizeChange.Visibility = Visibility.Visible;
|
||||
textChangeOptions.Visibility = Visibility.Collapsed;
|
||||
txtSizeChangeTitle.Content = "LFS OBJECT CHANGE";
|
||||
txtNewSize.Content = $"{newSize} Bytes";
|
||||
txtOldSize.Content = $"{oldSize} Bytes";
|
||||
txtSizeChangeTitle.Content = App.Text("Diff.LFS");
|
||||
txtNewSize.Content = App.Format("Bytes", newSize);
|
||||
txtOldSize.Content = App.Format("Bytes", oldSize);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -754,7 +754,7 @@ namespace SourceGit.UI {
|
|||
|
||||
var menu = new ContextMenu();
|
||||
var copy = new MenuItem();
|
||||
copy.Header = "Copy Selected Lines";
|
||||
copy.Header = App.Text("Diff.Copy");
|
||||
copy.Click += (o, ev) => {
|
||||
var items = grid.SelectedItems;
|
||||
if (items.Count == 0) return;
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:SourceGit.UI"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="160" d:DesignWidth="500" Height="160" Width="500">
|
||||
<Grid>
|
||||
|
@ -21,15 +20,15 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Confirm To Discard Changes"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.Discard}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Changes :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Discard.Changes}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path x:Name="icon" Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.File}" Fill="{StaticResource Brush.FG2}" Margin="4,0"/>
|
||||
<TextBlock x:Name="txtPath" Text="xxxx" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
<TextBlock x:Name="txtPath" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="1" Content="You can't undo this action!!!" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<Label Grid.Row="3" Grid.Column="1" Content="{StaticResource Text.Discard.Warning}" Foreground="{StaticResource Brush.FG2}"/>
|
||||
|
||||
<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -39,8 +38,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Sure" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Sure" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -25,12 +25,12 @@ namespace SourceGit.UI {
|
|||
InitializeComponent();
|
||||
|
||||
if (changes == null || changes.Count == 0) {
|
||||
txtPath.Text = "All local changes in working copy.";
|
||||
txtPath.Text = App.Text("Discard.All");
|
||||
icon.Data = FindResource("Icon.Folder") as Geometry;
|
||||
} else if (changes.Count == 1) {
|
||||
txtPath.Text = changes[0].Path;
|
||||
} else {
|
||||
txtPath.Text = $"Total {changes.Count} changes ...";
|
||||
txtPath.Text = App.Format("Discard.Total", changes.Count);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
<converters:InverseBool x:Key="InverseBool"/>
|
||||
</Grid.Resources>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Fetch Remote Changes"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.Fetch.Title}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Remote :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Fetch.Remote}"/>
|
||||
<ComboBox x:Name="combRemotes" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" IsEnabled="{Binding ElementName=chkFetchAll, Path=IsChecked, Converter={StaticResource InverseBool}}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type git:Remote}">
|
||||
|
@ -44,12 +44,12 @@
|
|||
<CheckBox Grid.Row="3" Grid.Column="1"
|
||||
x:Name="chkFetchAll"
|
||||
IsChecked="True"
|
||||
Content="Fetch all remotes"/>
|
||||
Content="{StaticResource Text.Fetch.AllRemotes}"/>
|
||||
|
||||
<CheckBox Grid.Row="4" Grid.Column="1"
|
||||
x:Name="chkPrune"
|
||||
IsChecked="True"
|
||||
Content="Prune remote dead branches"/>
|
||||
Content="{StaticResource Text.Fetch.Prune}"/>
|
||||
|
||||
<Grid Grid.Row="6" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -59,8 +59,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:SourceGit.UI"
|
||||
xmlns:git="clr-namespace:SourceGit.Git"
|
||||
mc:Ignorable="d"
|
||||
Title="File Histories"
|
||||
Title="{StaticResource Text.FileHistory}"
|
||||
Height="600" Width="800">
|
||||
|
||||
<!-- Enable WindowChrome -->
|
||||
|
@ -54,7 +53,7 @@
|
|||
Fill="{StaticResource Brush.Logo}"
|
||||
WindowChrome.IsHitTestVisibleInChrome="True"
|
||||
MouseLeftButtonDown="LogoMouseButtonDown"/>
|
||||
<Label Content="SOURCE GIT - FILE HISTORIES" FontWeight="Light"/>
|
||||
<Label Content="{StaticResource Text.FileHistory}" FontWeight="Light"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Options -->
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
</Style>
|
||||
</Grid.Resources>
|
||||
|
||||
<Button Click="OpenModeSelector" ToolTip="CHANGE FILES DISPLAY MODE" Margin="4,0">
|
||||
<Button Click="OpenModeSelector" ToolTip="{StaticResource Text.FileDisplayMode}" Margin="4,0">
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu x:Name="selector" Placement="Bottom" StaysOpen="False" Focusable="True">
|
||||
<MenuItem Header="Show as Grid" Click="UseGrid">
|
||||
<MenuItem Header="{StaticResource Text.FileDisplayMode.Grid}" Click="UseGrid">
|
||||
<MenuItem.Icon>
|
||||
<Path Style="{StaticResource Style.Icon.DisplayMode}" Data="{StaticResource Icon.Grid}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
|
||||
<MenuItem Header="Show as List" Click="UseList">
|
||||
<MenuItem Header="{StaticResource Text.FileDisplayMode.List}" Click="UseList">
|
||||
<MenuItem.Icon>
|
||||
<Path Style="{StaticResource Style.Icon.DisplayMode}" Data="{StaticResource Icon.List}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
|
||||
<MenuItem Header="Show as Tree" Click="UseTree">
|
||||
<MenuItem Header="{StaticResource Text.FileDisplayMode.Tree}" Click="UseTree">
|
||||
<MenuItem.Icon>
|
||||
<Path Style="{StaticResource Style.Icon.DisplayMode}" Data="{StaticResource Icon.Tree}"/>
|
||||
</MenuItem.Icon>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
Title="FolderDailog"
|
||||
Title="{StaticResource Text.FolderDialog}"
|
||||
Height="400" Width="400"
|
||||
ResizeMode="NoResize">
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
|||
|
||||
<!-- Current -->
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,4,0,0">
|
||||
<Label Content="Selected :" />
|
||||
<Label Content="{StaticResource Text.FolderDialog.Selected}" />
|
||||
<Label x:Name="txtSelected" Content="NONE" Foreground="{StaticResource Brush.FG2}"/>
|
||||
</StackPanel>
|
||||
|
||||
|
@ -97,8 +97,8 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" x:Name="btnSure" Width="100" Height="32" Content="SURE" Click="OnSure" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Width="100" Height="32" Content="CANCEL" Click="OnQuit" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" x:Name="btnSure" Width="100" Height="32" Content="{StaticResource Text.Sure}" Click="OnSure" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Width="100" Height="32" Content="{StaticResource Text.Cancel}" Click="OnQuit" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Sure" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Sure" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -24,16 +24,16 @@ namespace SourceGit.UI {
|
|||
|
||||
switch (branch.Kind) {
|
||||
case Git.Branch.Type.Feature:
|
||||
txtTitle.Content = "Git Flow - Finish Feature";
|
||||
txtBranchType.Content = "Feature :";
|
||||
txtTitle.Content = App.Text("GitFlow.FinishFeature");
|
||||
txtBranchType.Content = App.Text("GitFlow.Feature");
|
||||
break;
|
||||
case Git.Branch.Type.Release:
|
||||
txtTitle.Content = "Git Flow - Finish Release";
|
||||
txtBranchType.Content = "Release :";
|
||||
txtTitle.Content = App.Text("GitFlow.FinishRelease");
|
||||
txtBranchType.Content = App.Text("GitFlow.Release");
|
||||
break;
|
||||
case Git.Branch.Type.Hotfix:
|
||||
txtTitle.Content = "Git Flow - Finish Hotfix";
|
||||
txtBranchType.Content = "Hotfix :";
|
||||
txtTitle.Content = App.Text("GitFlow.FinishHotfix");
|
||||
txtBranchType.Content = App.Text("GitFlow.Hotfix");
|
||||
break;
|
||||
default:
|
||||
repo.GetPopupManager()?.Close();
|
||||
|
|
|
@ -26,21 +26,21 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Git Flow - Initialize"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.GitFlow.Init}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="Production Branch :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{StaticResource Text.GitFlow.ProductionBranch}"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" x:Name="txtMaster" Padding="2,0" TextChanged="ValidateNames" VerticalContentAlignment="Center" helpers:TextBoxHelper.Placeholder="master" Height="24" Text="master"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="Development Branch :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{StaticResource Text.GitFlow.DevelopBranch}"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="1" x:Name="txtDevelop" Padding="2,0" TextChanged="ValidateNames" VerticalContentAlignment="Center" helpers:TextBoxHelper.Placeholder="develop" Height="24" Text="develop"/>
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="Feature Prefix :"/>
|
||||
<Label Grid.Row="5" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{StaticResource Text.GitFlow.FeaturePrefix}"/>
|
||||
<TextBox Grid.Row="5" Grid.Column="1" x:Name="txtFeature" Padding="2,0" TextChanged="ValidateNames" VerticalContentAlignment="Center" helpers:TextBoxHelper.Placeholder="feature/" Height="24" Text="feature/"/>
|
||||
<Label Grid.Row="6" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="Release Prefix :"/>
|
||||
<Label Grid.Row="6" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{StaticResource Text.GitFlow.ReleasePrefix}"/>
|
||||
<TextBox Grid.Row="6" Grid.Column="1" x:Name="txtRelease" Padding="2,0" TextChanged="ValidateNames" VerticalContentAlignment="Center" helpers:TextBoxHelper.Placeholder="release/" Height="24" Text="release/"/>
|
||||
<Label Grid.Row="7" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="Hotfix Prefix :"/>
|
||||
<Label Grid.Row="7" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{StaticResource Text.GitFlow.HotfixPrefix}"/>
|
||||
<TextBox Grid.Row="7" Grid.Column="1" x:Name="txtHotfix" Padding="2,0" TextChanged="ValidateNames" VerticalContentAlignment="Center" helpers:TextBoxHelper.Placeholder="hotfix/" Height="24" Text="hotfix/"/>
|
||||
<Label Grid.Row="8" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="Version Tag Prefix :"/>
|
||||
<TextBox Grid.Row="8" Grid.Column="1" x:Name="txtVersion" Padding="2,0" TextChanged="ValidateNames" VerticalContentAlignment="Center" helpers:TextBoxHelper.Placeholder="Optional." Height="24" Text=""/>
|
||||
<Label Grid.Row="8" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{StaticResource Text.GitFlow.TagPrefix}"/>
|
||||
<TextBox Grid.Row="8" Grid.Column="1" x:Name="txtVersion" Padding="2,0" TextChanged="ValidateNames" VerticalContentAlignment="Center" helpers:TextBoxHelper.Placeholder="{StaticResource Text.Optional}" Height="24" Text=""/>
|
||||
|
||||
<Grid Grid.Row="10" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -52,8 +52,8 @@
|
|||
|
||||
<Label Grid.Column="0" x:Name="txtValidation" Foreground="Red"/>
|
||||
|
||||
<Button Grid.Column="1" x:Name="btnSure" Click="Sure" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" x:Name="btnSure" Click="Sure" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -76,7 +76,7 @@ namespace SourceGit.UI {
|
|||
if (!ValidateBranch("Development", dev)) return;
|
||||
|
||||
if (dev == master) {
|
||||
txtValidation.Content = "Development branch is same with production!";
|
||||
txtValidation.Content = App.Text("GitFlow.DevSameAsProd");
|
||||
btnSure.IsEnabled = false;
|
||||
return;
|
||||
}
|
||||
|
@ -91,13 +91,13 @@ namespace SourceGit.UI {
|
|||
|
||||
private bool ValidateBranch(string type, string name) {
|
||||
if (string.IsNullOrEmpty(name)) {
|
||||
txtValidation.Content = $"{type} branch name can't be empty";
|
||||
txtValidation.Content = App.Format("GitFlow.BranchRequired", type);
|
||||
btnSure.IsEnabled = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!regex.IsMatch(name)) {
|
||||
txtValidation.Content = $"{type} branch name contains invalid characters.";
|
||||
txtValidation.Content = App.Format("GitFlow.BranchInvalid", type);
|
||||
btnSure.IsEnabled = false;
|
||||
return false;
|
||||
}
|
||||
|
@ -107,13 +107,13 @@ namespace SourceGit.UI {
|
|||
|
||||
private bool ValidatePrefix(string type, string prefix) {
|
||||
if (string.IsNullOrEmpty(prefix)) {
|
||||
txtValidation.Content = $"{type} prefix is required!";
|
||||
txtValidation.Content = App.Format("GitFlow.PrefixRequired", type);
|
||||
btnSure.IsEnabled = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!regex.IsMatch(prefix)) {
|
||||
txtValidation.Content = $"{type} prefix contains invalid characters.";
|
||||
txtValidation.Content = App.Format("GitFlow.PrefixInvalid", type);
|
||||
btnSure.IsEnabled = false;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<Label Grid.Row="0" Grid.ColumnSpan="2" x:Name="txtTitle" FontWeight="DemiBold" FontSize="18"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" x:Name="txtPrefix" HorizontalAlignment="Right" FontSize="16" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" x:Name="txtName" VerticalContentAlignment="Center" helpers:TextBoxHelper.Placeholder="Enter name" Height="24">
|
||||
<TextBox Grid.Row="2" Grid.Column="1" x:Name="txtName" VerticalContentAlignment="Center" helpers:TextBoxHelper.Placeholder="{StaticResource Text.GitFlow.StartPlaceholder}" Height="24">
|
||||
<TextBox.Text>
|
||||
<Binding ElementName="me" Path="SubName" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
|
@ -42,8 +42,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Sure" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Sure" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -34,19 +34,19 @@ namespace SourceGit.UI {
|
|||
switch (type) {
|
||||
case Git.Branch.Type.Feature:
|
||||
var featurePrefix = repo.GetFeaturePrefix();
|
||||
txtTitle.Content = "Git Flow - Start Feature";
|
||||
txtTitle.Content = App.Text("GitFlow.StartFeatureTitle");
|
||||
txtPrefix.Content = featurePrefix;
|
||||
nameValidator.Prefix = featurePrefix;
|
||||
break;
|
||||
case Git.Branch.Type.Release:
|
||||
var releasePrefix = repo.GetReleasePrefix();
|
||||
txtTitle.Content = "Git Flow - Start Release";
|
||||
txtTitle.Content = App.Text("GitFlow.StartReleaseTitle");
|
||||
txtPrefix.Content = releasePrefix;
|
||||
nameValidator.Prefix = releasePrefix;
|
||||
break;
|
||||
case Git.Branch.Type.Hotfix:
|
||||
var hotfixPrefix = repo.GetHotfixPrefix();
|
||||
txtTitle.Content = "Git Flow - Start Hotfix";
|
||||
txtTitle.Content = App.Text("GitFlow.StartHotfixTitle");
|
||||
txtPrefix.Content = hotfixPrefix;
|
||||
nameValidator.Prefix = hotfixPrefix;
|
||||
break;
|
||||
|
|
|
@ -38,12 +38,12 @@
|
|||
|
||||
<!-- SearchBar -->
|
||||
<Grid x:Name="searchBar" Margin="0,-32,0,0" Grid.Row="0">
|
||||
<TextBox x:Name="txtSearch" Margin="4" Height="24" Padding="0,0,22,0" helpers:TextBoxHelper.Placeholder="SEARCH SHA/SUBJECT/AUTHOR. PRESS ENTER TO SEARCH, ESC TO QUIT" PreviewKeyDown="PreviewSearchKeyDown"/>
|
||||
<TextBox x:Name="txtSearch" Margin="4" Height="24" Padding="0,0,22,0" helpers:TextBoxHelper.Placeholder="{StaticResource Text.Histories.Search}" PreviewKeyDown="PreviewSearchKeyDown"/>
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="8,0">
|
||||
<Button ToolTip="CLEAR" Click="ClearSearch">
|
||||
<Button ToolTip="{StaticResource Text.Histories.SearchClear}" Click="ClearSearch">
|
||||
<Path Width="12" Height="12" Fill="{StaticResource Brush.FG2}" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Clear}"/>
|
||||
</Button>
|
||||
<Button Margin="8,0,0,0" ToolTip="CLOSE" Click="HideSearchBarByButton">
|
||||
<Button Margin="8,0,0,0" ToolTip="{StaticResource Text.Close}" Click="HideSearchBarByButton">
|
||||
<Path Width="12" Height="12" Fill="{StaticResource Brush.FG2}" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Up}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
@ -191,7 +191,7 @@
|
|||
<!-- Layout Switch -->
|
||||
<ToggleButton
|
||||
Style="{StaticResource Style.ToggleButton.Orientation}"
|
||||
ToolTip="Toggle Horizontal/Vertical Layout"
|
||||
ToolTip="{StaticResource Text.Histories.DisplayMode}"
|
||||
IsChecked="{Binding Source={x:Static sourcegit:App.Setting}, Path=UI.MoveCommitViewerRight, Mode=TwoWay}"
|
||||
Checked="ChangeOrientation" Unchecked="ChangeOrientation"/>
|
||||
|
||||
|
@ -204,13 +204,14 @@
|
|||
Fill="{StaticResource Brush.FG1}">
|
||||
<Path.ToolTip>
|
||||
<StackPanel Orientation="Vertical" TextElement.FontFamily="Consolas">
|
||||
<Label Content="HISTORIES GUIDE" FontWeight="Bold" FontSize="14" Margin="0,0,0,8"/>
|
||||
<Label Content="1. Select single commit to view detail"/>
|
||||
<Label Content="2. Select two commits to show differences"/>
|
||||
<Label Content="3. Select more than 2 commits to count"/>
|
||||
<Label Content="{StaticResource Text.Histories.Guide}" FontWeight="Bold" FontSize="14" Margin="0,0,0,8"/>
|
||||
<Label Content="{StaticResource Text.Histories.Guide_1}"/>
|
||||
<Label Content="{StaticResource Text.Histories.Guide_2}"/>
|
||||
<Label Content="{StaticResource Text.Histories.Guide_3}"/>
|
||||
<Label Content="{StaticResource Text.Histories.Guide_4}"/>
|
||||
</StackPanel>
|
||||
</Path.ToolTip>
|
||||
</Path>
|
||||
</Path>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
|
|
@ -205,7 +205,7 @@ namespace SourceGit.UI {
|
|||
} else if (selected.Count > 2) {
|
||||
mask.Visibility = Visibility.Visible;
|
||||
txtCounter.Visibility = Visibility.Visible;
|
||||
txtCounter.Content = $"SELECTED {selected.Count} COMMITS";
|
||||
txtCounter.Content = App.Format("Histories.Selected", selected.Count);
|
||||
} else {
|
||||
mask.Visibility = Visibility.Visible;
|
||||
txtCounter.Visibility = Visibility.Hidden;
|
||||
|
@ -226,7 +226,7 @@ namespace SourceGit.UI {
|
|||
if (!string.IsNullOrEmpty(branch.Upstream)) {
|
||||
var upstream = branch.Upstream.Substring(13);
|
||||
var fastForward = new MenuItem();
|
||||
fastForward.Header = $"Fast-Forward to '{upstream}'";
|
||||
fastForward.Header = App.Format("BranchCM.FastForward", upstream);
|
||||
fastForward.Click += (o, e) => {
|
||||
Merge.StartDirectly(Repo, upstream, branch.Name);
|
||||
e.Handled = true;
|
||||
|
@ -234,7 +234,7 @@ namespace SourceGit.UI {
|
|||
submenu.Items.Add(fastForward);
|
||||
|
||||
var pull = new MenuItem();
|
||||
pull.Header = $"Pull '{upstream}' ...";
|
||||
pull.Header = App.Format("BranchCM.Pull", upstream);
|
||||
pull.Click += (o, e) => {
|
||||
Pull.Show(Repo);
|
||||
e.Handled = true;
|
||||
|
@ -243,7 +243,7 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
var push = new MenuItem();
|
||||
push.Header = $"Push '{branch.Name}' ...";
|
||||
push.Header = App.Format("BranchCM.Push", branch.Name);
|
||||
push.Click += (o, e) => {
|
||||
Push.Show(Repo, branch);
|
||||
e.Handled = true;
|
||||
|
@ -258,7 +258,7 @@ namespace SourceGit.UI {
|
|||
flowIcon.Width = 10;
|
||||
|
||||
var finish = new MenuItem();
|
||||
finish.Header = $"Git Flow - Finish '{branch.Name}'";
|
||||
finish.Header = App.Format("BranchCM.Finish", branch.Name);
|
||||
finish.Icon = flowIcon;
|
||||
finish.Click += (o, e) => {
|
||||
GitFlowFinishBranch.Show(Repo, branch);
|
||||
|
@ -270,7 +270,7 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
var rename = new MenuItem();
|
||||
rename.Header = "Rename ...";
|
||||
rename.Header = App.Format("BranchCM.Rename", branch.Name);
|
||||
rename.Click += (o, e) => {
|
||||
RenameBranch.Show(Repo, branch);
|
||||
e.Handled = true;
|
||||
|
@ -292,7 +292,7 @@ namespace SourceGit.UI {
|
|||
submenu.Icon = icon;
|
||||
|
||||
var checkout = new MenuItem();
|
||||
checkout.Header = $"Checkout '{branch.Name}'";
|
||||
checkout.Header = App.Format("BranchCM.Checkout", branch.Name);
|
||||
checkout.Click += (o, e) => {
|
||||
if (branch.IsLocal) {
|
||||
Task.Run(() => Repo.Checkout(branch.Name));
|
||||
|
@ -312,7 +312,7 @@ namespace SourceGit.UI {
|
|||
submenu.Items.Add(checkout);
|
||||
|
||||
var merge = new MenuItem();
|
||||
merge.Header = $"Merge into '{current.Name}' ...";
|
||||
merge.Header = App.Format("BranchCM.Merge", branch.Name, current.Name);
|
||||
merge.IsEnabled = !merged;
|
||||
merge.Click += (o, e) => {
|
||||
Merge.Show(Repo, branch.Name, current.Name);
|
||||
|
@ -328,7 +328,7 @@ namespace SourceGit.UI {
|
|||
flowIcon.Width = 10;
|
||||
|
||||
var finish = new MenuItem();
|
||||
finish.Header = $"Git Flow - Finish '{branch.Name}'";
|
||||
finish.Header = App.Format("BranchCM.Finish", branch.Name);
|
||||
finish.Icon = flowIcon;
|
||||
finish.Click += (o, e) => {
|
||||
GitFlowFinishBranch.Show(Repo, branch);
|
||||
|
@ -340,7 +340,7 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
var rename = new MenuItem();
|
||||
rename.Header = "Rename ...";
|
||||
rename.Header = App.Format("BranchCM.Rename", branch.Name);
|
||||
rename.Visibility = branch.IsLocal ? Visibility.Visible : Visibility.Collapsed;
|
||||
rename.Click += (o, e) => {
|
||||
RenameBranch.Show(Repo, current);
|
||||
|
@ -349,7 +349,7 @@ namespace SourceGit.UI {
|
|||
submenu.Items.Add(rename);
|
||||
|
||||
var delete = new MenuItem();
|
||||
delete.Header = "Delete ...";
|
||||
delete.Header = App.Format("BranchCM.Delete", branch.Name);
|
||||
delete.Click += (o, e) => {
|
||||
DeleteBranch.Show(Repo, branch);
|
||||
};
|
||||
|
@ -370,7 +370,7 @@ namespace SourceGit.UI {
|
|||
submenu.MinWidth = 200;
|
||||
|
||||
var push = new MenuItem();
|
||||
push.Header = "Push ...";
|
||||
push.Header = App.Format("TagCM.Push", tag.Name);
|
||||
push.Click += (o, e) => {
|
||||
PushTag.Show(Repo, tag);
|
||||
e.Handled = true;
|
||||
|
@ -378,7 +378,7 @@ namespace SourceGit.UI {
|
|||
submenu.Items.Add(push);
|
||||
|
||||
var delete = new MenuItem();
|
||||
delete.Header = "Delete ...";
|
||||
delete.Header = App.Format("TagCM.Delete", tag.Name);
|
||||
delete.Click += (o, e) => {
|
||||
DeleteTag.Show(Repo, tag);
|
||||
e.Handled = true;
|
||||
|
@ -439,7 +439,7 @@ namespace SourceGit.UI {
|
|||
|
||||
// Reset
|
||||
var reset = new MenuItem();
|
||||
reset.Header = $"Reset '{current.Name}' to Here";
|
||||
reset.Header = App.Format("CommitCM.Reset", current.Name);
|
||||
reset.Visibility = commit.IsHEAD ? Visibility.Collapsed : Visibility.Visible;
|
||||
reset.Click += (o, e) => {
|
||||
Reset.Show(Repo, commit);
|
||||
|
@ -449,7 +449,7 @@ namespace SourceGit.UI {
|
|||
|
||||
// Rebase or interactive rebase
|
||||
var rebase = new MenuItem();
|
||||
rebase.Header = commit.IsMerged ? $"Interactive Rebase '{current.Name}' from Here" : $"Rebase '{current.Name}' to Here";
|
||||
rebase.Header = App.Format(commit.IsMerged ? "CommitCM.InteractiveRebase" : "CommitCM.Rebase", current.Name);
|
||||
rebase.Visibility = commit.IsHEAD ? Visibility.Collapsed : Visibility.Visible;
|
||||
rebase.Click += (o, e) => {
|
||||
if (commit.IsMerged) {
|
||||
|
@ -472,7 +472,7 @@ namespace SourceGit.UI {
|
|||
|
||||
// Cherry-Pick
|
||||
var cherryPick = new MenuItem();
|
||||
cherryPick.Header = "Cherry-Pick This Commit";
|
||||
cherryPick.Header = App.Text("CommitCM.CherryPick");
|
||||
cherryPick.Visibility = commit.IsMerged ? Visibility.Collapsed : Visibility.Visible;
|
||||
cherryPick.Click += (o, e) => {
|
||||
CherryPick.Show(Repo, commit);
|
||||
|
@ -482,7 +482,7 @@ namespace SourceGit.UI {
|
|||
|
||||
// Revert commit
|
||||
var revert = new MenuItem();
|
||||
revert.Header = "Revert Commit";
|
||||
revert.Header = App.Text("CommitCM.Revert");
|
||||
revert.Visibility = !commit.IsMerged ? Visibility.Collapsed : Visibility.Visible;
|
||||
revert.Click += (o, e) => {
|
||||
Revert.Show(Repo, commit);
|
||||
|
@ -493,14 +493,14 @@ namespace SourceGit.UI {
|
|||
|
||||
// Common
|
||||
var createBranch = new MenuItem();
|
||||
createBranch.Header = "Create Branch";
|
||||
createBranch.Header = App.Text("CreateBranch");
|
||||
createBranch.Click += (o, e) => {
|
||||
CreateBranch.Show(Repo, commit);
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(createBranch);
|
||||
var createTag = new MenuItem();
|
||||
createTag.Header = "Create Tag";
|
||||
createTag.Header = App.Text("CreateTag");
|
||||
createTag.Click += (o, e) => {
|
||||
CreateTag.Show(Repo, commit);
|
||||
e.Handled = true;
|
||||
|
@ -510,7 +510,7 @@ namespace SourceGit.UI {
|
|||
|
||||
// Save as patch
|
||||
var patch = new MenuItem();
|
||||
patch.Header = "Save as Patch";
|
||||
patch.Header = App.Text("CommitCM.SaveAsPatch");
|
||||
patch.Click += (o, e) => {
|
||||
FolderDailog.Open("Save patch to ...", saveTo => {
|
||||
Repo.RunCommand($"format-patch {commit.SHA} -1 -o \"{saveTo}\"", null);
|
||||
|
@ -521,7 +521,7 @@ namespace SourceGit.UI {
|
|||
|
||||
// Copy SHA
|
||||
var copySHA = new MenuItem();
|
||||
copySHA.Header = "Copy Commit SHA";
|
||||
copySHA.Header = App.Text("CommitCM.CopySHA");
|
||||
copySHA.Click += (o, e) => {
|
||||
Clipboard.SetText(commit.SHA);
|
||||
};
|
||||
|
@ -529,7 +529,7 @@ namespace SourceGit.UI {
|
|||
|
||||
// Copy info
|
||||
var copyInfo = new MenuItem();
|
||||
copyInfo.Header = "Copy Commit Info";
|
||||
copyInfo.Header = App.Text("CommitCM.CopyInfo");
|
||||
copyInfo.Click += (o, e) => {
|
||||
Clipboard.SetText(string.Format(
|
||||
"SHA: {0}\nTITLE: {1}\nAUTHOR: {2} <{3}>\nTIME: {4}",
|
||||
|
|
|
@ -20,15 +20,15 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Initialize Repository"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.Init}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Path :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Init.Path}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder}" Margin="4,0"/>
|
||||
<Label x:Name="txtPath"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="1" Content="Invalid repository detected. Run `git init` under this path?" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<Label Grid.Row="3" Grid.Column="1" Content="{StaticResource Text.Init.Tip}" Foreground="{StaticResource Brush.FG2}"/>
|
||||
|
||||
<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -38,8 +38,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Sure" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Sure" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:SourceGit.UI"
|
||||
mc:Ignorable="d"
|
||||
Title="Interactive Rebase"
|
||||
Title="{StaticResource Text.InteractiveRebase}"
|
||||
Height="600" Width="800">
|
||||
|
||||
<!-- Enable WindowChrome -->
|
||||
|
@ -56,7 +56,7 @@
|
|||
Fill="{StaticResource Brush.Logo}"
|
||||
WindowChrome.IsHitTestVisibleInChrome="True"
|
||||
MouseLeftButtonDown="LogoMouseButtonDown"/>
|
||||
<Label Content="SOURCE GIT - INTERACTIVE REBASE" FontWeight="Light"/>
|
||||
<Label Content="{StaticResource Text.InteractiveRebase}" FontWeight="Light"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Options -->
|
||||
|
@ -161,11 +161,11 @@
|
|||
Grid.Column="4"
|
||||
Orientation="Horizontal"
|
||||
Margin="4,0">
|
||||
<Button Click="MoveUp" ToolTip="MOVE UP">
|
||||
<Button Click="MoveUp" ToolTip="{StaticResource Text.InteractiveRebase.MoveUp}">
|
||||
<Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.MoveUp}"/>
|
||||
</Button>
|
||||
|
||||
<Button Click="MoveDown" ToolTip="MOVE DOWN" Margin="4,0,0,0">
|
||||
<Button Click="MoveDown" ToolTip="{StaticResource Text.InteractiveRebase.MoveDown}" Margin="4,0,0,0">
|
||||
<Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.MoveDown}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
@ -211,17 +211,17 @@
|
|||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal" Margin="4,0,24,0">
|
||||
<Label Grid.Column="0" Content="Rebase :"/>
|
||||
<Label Grid.Column="0" Content="{StaticResource Text.InteractiveRebase.Target}"/>
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
|
||||
<Label x:Name="branch"/>
|
||||
|
||||
<Label Grid.Column="2" Content="On :" Margin="8,0,0,0"/>
|
||||
<Label Grid.Column="2" Content="{StaticResource Text.InteractiveRebase.On}" Margin="8,0,0,0"/>
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Commit}"/>
|
||||
<Label x:Name="on"/>
|
||||
</StackPanel>
|
||||
|
||||
<Button Grid.Column="1" Height="26" Click="Start" Style="{StaticResource Style.Button.AccentBordered}" Content="REBASE"/>
|
||||
<Button Grid.Column="3" Height="26" Click="Cancel" Style="{StaticResource Style.Button.Bordered}" Content="CANCEL"/>
|
||||
<Button Grid.Column="1" Height="26" Click="Start" Style="{StaticResource Style.Button.AccentBordered}" Content="{StaticResource Text.InteractiveRebase.Start}"/>
|
||||
<Button Grid.Column="3" Height="26" Click="Cancel" Style="{StaticResource Style.Button.Bordered}" Content="{StaticResource Text.Cancel}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<ControlTemplate TargetType="{x:Type TabControl}">
|
||||
<StackPanel Orientation="Horizontal" Margin="8,6,4,0">
|
||||
<StackPanel Orientation="Horizontal" IsItemsHost="True" SnapsToDevicePixels="True" KeyboardNavigation.TabIndex="1"/>
|
||||
<Button Margin="4,0,0,0" Click="NewTab" ToolTip="NEW PAGE" WindowChrome.IsHitTestVisibleInChrome="True">
|
||||
<Button Margin="4,0,0,0" Click="NewTab" ToolTip="{StaticResource Text.Launcher.NewPageButton}" WindowChrome.IsHitTestVisibleInChrome="True">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{x:Null}">
|
||||
<Setter Property="Opacity" Value="1"/>
|
||||
|
@ -125,7 +125,7 @@
|
|||
Content="{Binding Title}"
|
||||
Foreground="{StaticResource Brush.FG2}" FontFamily="Consolas" FontWeight="Bold"/>
|
||||
|
||||
<Button Grid.Column="3" Click="CloseTab" ToolTip="CLOSE">
|
||||
<Button Grid.Column="3" Click="CloseTab" ToolTip="{StaticResource Text.Close}">
|
||||
<Path
|
||||
Width="8" Height="8"
|
||||
Fill="{StaticResource Brush.FG1}"
|
||||
|
@ -241,11 +241,11 @@
|
|||
HorizontalAlignment="Right"
|
||||
Height="32"
|
||||
WindowChrome.IsHitTestVisibleInChrome="True">
|
||||
<Button Click="ShowPreference" Width="24" ToolTip="PREFERENCE">
|
||||
<Button Click="ShowPreference" Width="24" ToolTip="{StaticResource Text.Launcher.Preference}">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Preference}"/>
|
||||
</Button>
|
||||
<Rectangle Width="1" Height="18" Margin="6,0" VerticalAlignment="Center" Fill="{StaticResource Brush.Border1}"/>
|
||||
<Button Click="ShowAbout" Width="24" ToolTip="ABOUT">
|
||||
<Button Click="ShowAbout" Width="24" ToolTip="{StaticResource Text.Launcher.About}">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Info}"/>
|
||||
</Button>
|
||||
<Rectangle Width="1" Height="18" Margin="6,0" VerticalAlignment="Center" Fill="{StaticResource Brush.Border1}"/>
|
||||
|
@ -339,14 +339,14 @@
|
|||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Content="ERROR" FontWeight="DemiBold"/>
|
||||
<Label Grid.Row="0" Content="{StaticResource Text.Launcher.Error}" FontWeight="DemiBold"/>
|
||||
<TextBlock Grid.Row="1" Margin="6,8" Text="{Binding}" Foreground="{StaticResource Brush.FG1}" TextWrapping="Wrap"/>
|
||||
<Button
|
||||
Grid.Row="2"
|
||||
Margin="4,0"
|
||||
Click="RemoveError"
|
||||
Height="25"
|
||||
Content="CLOSE"
|
||||
Content="{StaticResource Text.Close}"
|
||||
Style="{StaticResource Style.Button.AccentBordered}"
|
||||
BorderBrush="{StaticResource Brush.FG1}"
|
||||
VerticalAlignment="Center"
|
||||
|
|
|
@ -66,13 +66,13 @@ namespace SourceGit.UI {
|
|||
|
||||
public string Title {
|
||||
get {
|
||||
if (Repo == null) return "New Page";
|
||||
if (Repo == null) return App.Text("Launcher.NewPage");
|
||||
return Repo.Parent == null ? Repo.Name : $"{Repo.Parent.Name} : {Repo.Name}";
|
||||
}
|
||||
}
|
||||
|
||||
public string Tooltip {
|
||||
get { return Repo == null ? "Repository Manager" : Repo.Path; }
|
||||
get { return Repo == null ? App.Text("Launcher.NewPageTip") : Repo.Path; }
|
||||
}
|
||||
|
||||
public bool IsRepo {
|
||||
|
@ -178,7 +178,7 @@ namespace SourceGit.UI {
|
|||
var repo = tab.Repo;
|
||||
|
||||
var refresh = new MenuItem();
|
||||
refresh.Header = "Refresh";
|
||||
refresh.Header = App.Text("RepoCM.Refresh");
|
||||
refresh.Click += (o, e) => {
|
||||
repo.AssertCommand(null);
|
||||
e.Handled = true;
|
||||
|
@ -186,7 +186,7 @@ namespace SourceGit.UI {
|
|||
|
||||
var iconBookmark = FindResource("Icon.Bookmark") as Geometry;
|
||||
var bookmark = new MenuItem();
|
||||
bookmark.Header = "Bookmark";
|
||||
bookmark.Header = App.Text("RepoCM.Bookmark");
|
||||
for (int i = 0; i < Converters.IntToRepoColor.Colors.Length; i++) {
|
||||
var icon = new System.Windows.Shapes.Path();
|
||||
icon.Style = FindResource("Style.Icon") as Style;
|
||||
|
@ -208,7 +208,7 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
var copyPath = new MenuItem();
|
||||
copyPath.Header = "Copy path";
|
||||
copyPath.Header = App.Text("RepoCM.CopyPath");
|
||||
copyPath.Click += (o, e) => {
|
||||
Clipboard.SetText(repo.Path);
|
||||
e.Handled = true;
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:SourceGit.UI"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="192" d:DesignWidth="500" Height="192" Width="500">
|
||||
<Grid>
|
||||
|
@ -22,21 +21,21 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Merge Branch"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.Merge}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Source Branch :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Merge.Source}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
|
||||
<TextBlock x:Name="sourceBranch" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Into :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Merge.Into}"/>
|
||||
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
|
||||
<TextBlock x:Name="targetBranch" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" Content="Merge Option :"/>
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Merge.Mode}"/>
|
||||
<ComboBox x:Name="combOptions" Grid.Row="4" Grid.Column="1" VerticalAlignment="Center">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
@ -56,8 +55,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
|
@ -32,7 +32,7 @@
|
|||
<Path Grid.Row="0" Margin="0,48,0,0" Width="72" Height="72" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Git}" Fill="#FFF05133"/>
|
||||
|
||||
<!-- Welcome -->
|
||||
<TextBlock Grid.Row="1" Margin="0,16" HorizontalAlignment="Center" Text="Welcome to SourceGit :)" FontSize="28" FontWeight="ExtraBold" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<TextBlock Grid.Row="1" Margin="0,16" HorizontalAlignment="Center" Text="{StaticResource Text.NewPage.Title}" FontSize="28" FontWeight="ExtraBold" Foreground="{StaticResource Brush.FG2}"/>
|
||||
|
||||
<!-- Options -->
|
||||
<Grid Grid.Row="2" Margin="0,0,0,36">
|
||||
|
@ -44,13 +44,13 @@
|
|||
<Button Click="OpenOrAddRepo" Grid.Column="0" Style="{StaticResource Style.Button.Bordered}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder}"/>
|
||||
<Label Margin="4,0,0,0" Content="Open Local Repository"/>
|
||||
<Label Margin="4,0,0,0" Content="{StaticResource Text.NewPage.OpenOrInit}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Click="CloneRepo" Grid.Column="2" Style="{StaticResource Style.Button.Bordered}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Pull}"/>
|
||||
<Label Margin="4,0,0,0" Content="Clone Remote Repository"/>
|
||||
<Label Margin="4,0,0,0" Content="{StaticResource Text.NewPage.Clone}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
@ -66,8 +66,8 @@
|
|||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Column="0" Text="REPOSITORIES" FontSize="18" FontWeight="ExtraBold" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<TextBlock Grid.Column="2" Text="DRAG-DROP YOUR FOLDER" FontSize="14" Foreground="{StaticResource Brush.FG2}" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="0" Text="{StaticResource Text.NewPage.Repositories}" FontSize="18" FontWeight="ExtraBold" Foreground="{StaticResource Brush.FG2}"/>
|
||||
<TextBlock Grid.Column="2" Text="{StaticResource Text.NewPage.DragDrop}" FontSize="14" Foreground="{StaticResource Brush.FG2}" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Drop area tip. -->
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace SourceGit.UI {
|
|||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OpenOrAddRepo(object sender, RoutedEventArgs e) {
|
||||
FolderDailog.Open("Open or init local repository", path => {
|
||||
FolderDailog.Open(App.Text("NewPage.OpenOrInitDialog"), path => {
|
||||
CheckAndOpenRepo(path);
|
||||
});
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ namespace SourceGit.UI {
|
|||
#region EVENT_TREEVIEW
|
||||
private void TreeContextMenuOpening(object sender, ContextMenuEventArgs e) {
|
||||
var addFolder = new MenuItem();
|
||||
addFolder.Header = "Add Folder";
|
||||
addFolder.Header = App.Text("NewPage.NewFolder");
|
||||
addFolder.Click += (o, ev) => {
|
||||
var group = App.Setting.AddGroup("New Group", "");
|
||||
UpdateTree(group.Id);
|
||||
|
@ -238,14 +238,14 @@ namespace SourceGit.UI {
|
|||
|
||||
if (node.IsRepo) {
|
||||
var open = new MenuItem();
|
||||
open.Header = "Open";
|
||||
open.Header = App.Text("RepoCM.Open");
|
||||
open.Click += (o, ev) => {
|
||||
CheckAndOpenRepo(node.Id);
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
var explore = new MenuItem();
|
||||
explore.Header = "Open Container Folder";
|
||||
explore.Header = App.Text("RepoCM.Explore");
|
||||
explore.Click += (o, ev) => {
|
||||
Process.Start("explorer", node.Id);
|
||||
ev.Handled = true;
|
||||
|
@ -253,7 +253,7 @@ namespace SourceGit.UI {
|
|||
|
||||
var iconBookmark = FindResource("Icon.Bookmark") as Geometry;
|
||||
var bookmark = new MenuItem();
|
||||
bookmark.Header = "Bookmark";
|
||||
bookmark.Header = App.Text("RepoCM.Bookmark");
|
||||
for (int i = 0; i < Converters.IntToRepoColor.Colors.Length; i++) {
|
||||
var icon = new System.Windows.Shapes.Path();
|
||||
icon.Style = FindResource("Style.Icon") as Style;
|
||||
|
@ -283,7 +283,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(bookmark);
|
||||
} else {
|
||||
var addSubFolder = new MenuItem();
|
||||
addSubFolder.Header = "Add Sub-Folder";
|
||||
addSubFolder.Header = App.Text("NewPage.NewSubFolder");
|
||||
addSubFolder.Click += (o, ev) => {
|
||||
var parent = App.Setting.FindGroup(node.Id);
|
||||
if (parent != null) parent.IsExpended = true;
|
||||
|
@ -297,14 +297,14 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
var rename = new MenuItem();
|
||||
rename.Header = "Rename";
|
||||
rename.Header = App.Text("NewPage.Rename");
|
||||
rename.Click += (o, ev) => {
|
||||
UpdateTree(node.Id);
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
var delete = new MenuItem();
|
||||
delete.Header = "Delete";
|
||||
delete.Header = App.Text("NewPage.Delete");
|
||||
delete.Click += (o, ev) => {
|
||||
DeleteNode(node);
|
||||
ev.Handled = true;
|
||||
|
@ -324,7 +324,7 @@ namespace SourceGit.UI {
|
|||
/// <returns></returns>
|
||||
private bool MakeSureReady() {
|
||||
if (!App.IsGitConfigured) {
|
||||
App.RaiseError("Git has NOT been configured.\nPlease to go [Preference] and configure it first.");
|
||||
App.RaiseError(App.Text("NotConfigured"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -344,7 +344,7 @@ namespace SourceGit.UI {
|
|||
return;
|
||||
}
|
||||
|
||||
App.RaiseError($"Path[{path}] not exists!");
|
||||
App.RaiseError(App.Format("PathNotFound", path));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Pull (Fetch & Merge)"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.Pull.Title}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Remote :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Pull.Remote}"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="1"
|
||||
x:Name="combRemotes"
|
||||
VerticalAlignment="Center"
|
||||
|
@ -40,7 +40,7 @@
|
|||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Branch :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Pull.Branch}"/>
|
||||
<ComboBox Grid.Row="3" Grid.Column="1"
|
||||
x:Name="combBranches"
|
||||
VerticalAlignment="Center">
|
||||
|
@ -54,23 +54,23 @@
|
|||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="Into :"/>
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{StaticResource Text.Pull.Into}"/>
|
||||
<StackPanel Grid.Row="4" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
|
||||
<TextBlock x:Name="txtInto" Text="master" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
<TextBlock x:Name="txtInto" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox Grid.Row="5" Grid.Column="1"
|
||||
x:Name="chkRebase"
|
||||
IsChecked="True"
|
||||
VerticalAlignment="Center"
|
||||
Content="Use rebase instead of merge"/>
|
||||
Content="{StaticResource Text.Pull.UseRebase}"/>
|
||||
|
||||
<CheckBox Grid.Row="6" Grid.Column="1"
|
||||
x:Name="chkAutoStash"
|
||||
IsChecked="True"
|
||||
VerticalAlignment="Center"
|
||||
Content="Stash & reapply local changes"/>
|
||||
Content="{StaticResource Text.Pull.AutoStash}"/>
|
||||
|
||||
<Grid Grid.Row="8" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -80,8 +80,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Push Changes To Remote"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.Push.Local}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="Local Branch :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{StaticResource Text.Push.Local}"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="1"
|
||||
x:Name="combLocalBranches"
|
||||
VerticalAlignment="Center"
|
||||
|
@ -41,7 +41,7 @@
|
|||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="Remote :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{StaticResource Text.Push.Remote}"/>
|
||||
<ComboBox Grid.Row="3" Grid.Column="1"
|
||||
x:Name="combRemotes"
|
||||
VerticalAlignment="Center"
|
||||
|
@ -56,7 +56,7 @@
|
|||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="To :"/>
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="{StaticResource Text.Push.To}"/>
|
||||
<ComboBox Grid.Row="4" Grid.Column="1"
|
||||
x:Name="combRemoteBranches"
|
||||
VerticalAlignment="Center">
|
||||
|
@ -73,12 +73,12 @@
|
|||
<CheckBox Grid.Row="5" Grid.Column="1"
|
||||
x:Name="chkTags"
|
||||
VerticalAlignment="Center"
|
||||
Content="Push all tags"/>
|
||||
Content="{StaticResource Text.Push.WithAllTags}"/>
|
||||
|
||||
<CheckBox Grid.Row="6" Grid.Column="1"
|
||||
x:Name="chkForce"
|
||||
VerticalAlignment="Center"
|
||||
Content="Force push"/>
|
||||
Content="{StaticResource Text.Push.Force}"/>
|
||||
|
||||
<Grid Grid.Row="8" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -88,8 +88,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -20,15 +20,15 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Push Tag To Remote"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.PushTag}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Tag :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.PushTag.Tag}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Tag}" Margin="4,0"/>
|
||||
<TextBlock x:Name="tagName" Text="v1.0" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Remote :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.PushTag.Remote}"/>
|
||||
<ComboBox Grid.Row="3" Grid.Column="1"
|
||||
x:Name="combRemotes"
|
||||
VerticalAlignment="Center">
|
||||
|
@ -50,8 +50,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
|
@ -21,15 +21,15 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Rebase Current Branch"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.Rebase}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Rebase :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Rebase.Target}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
|
||||
<TextBlock x:Name="branch" Text="master" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="On :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Rebase.On}"/>
|
||||
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path x:Name="type" Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
|
||||
<TextBlock x:Name="desc" Text="branch" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
|
@ -38,7 +38,7 @@
|
|||
<CheckBox x:Name="chkAutoStash"
|
||||
Grid.Row="4" Grid.Column="1"
|
||||
IsChecked="True"
|
||||
Content="Stash & reapply local changes"/>
|
||||
Content="{StaticResource Text.Rebase.AutoStash}"/>
|
||||
|
||||
<Grid Grid.Row="6" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -48,8 +48,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" x:Name="title" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Add Remote"/>
|
||||
<Label Grid.Row="0" x:Name="title" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Name :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Remote.Name}"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1"
|
||||
x:Name="txtName"
|
||||
VerticalContentAlignment="Center"
|
||||
Height="24"
|
||||
helpers:TextBoxHelper.Placeholder="Remote name">
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Remote.Name.Placeholder}">
|
||||
<TextBox.Text>
|
||||
<Binding Path="RemoteName" ElementName="me" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay">
|
||||
<Binding.ValidationRules>
|
||||
|
@ -39,12 +39,12 @@
|
|||
</TextBox.Text>
|
||||
</TextBox>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Repository URL :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Remote.URL}"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="1"
|
||||
x:Name="txtUrl"
|
||||
VerticalContentAlignment="Center"
|
||||
Height="24"
|
||||
helpers:TextBoxHelper.Placeholder="Remote git repository URL">
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Remote.URL.Placeholder}">
|
||||
<TextBox.Text>
|
||||
<Binding Path="RemoteUri" ElementName="me" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay">
|
||||
<Binding.ValidationRules>
|
||||
|
@ -62,8 +62,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Sure" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Sure" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -31,12 +31,7 @@ namespace SourceGit.UI {
|
|||
InitializeComponent();
|
||||
nameValidator.Repo = repo;
|
||||
nameValidator.Old = remote;
|
||||
|
||||
if (remote != null) {
|
||||
title.Content = "Edit Remote";
|
||||
} else {
|
||||
title.Content = "Add New Remote";
|
||||
}
|
||||
title.Content = App.Text(remote == null ? "Remote.AddTitle" : "Remote.EditTitle");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -22,19 +22,19 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Rename Branch"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.RenameBranch}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Branch :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.RenameBranch.Target}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
|
||||
<TextBlock x:Name="txtOldName" Text="Old name" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
<TextBlock x:Name="txtOldName" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="New Name :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.RenameBranch.Name}"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="1"
|
||||
x:Name="txtNewName"
|
||||
Height="24"
|
||||
helpers:TextBoxHelper.Placeholder="Unique name for this branch">
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.RenameBranch.Name.Placeholder}">
|
||||
<TextBox.Text>
|
||||
<Binding Path="NewName" ElementName="me" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay">
|
||||
<Binding.ValidationRules>
|
||||
|
@ -52,8 +52,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Sure" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Sure" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -21,21 +21,21 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Reset Current Branch To Revision"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.Reset}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Current Branch :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Reset.Target}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
|
||||
<TextBlock x:Name="branch" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Move To :"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Reset.MoveTo}"/>
|
||||
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Commit}"/>
|
||||
<TextBlock x:Name="desc" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" Content="Reset Mode :"/>
|
||||
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Reset.Mode}"/>
|
||||
<ComboBox x:Name="combMode" Grid.Row="4" Grid.Column="1" VerticalAlignment="Center">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
@ -56,8 +56,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -20,15 +20,15 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Confirm To Revert Commit"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.Revert}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Commit :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Revert.Commit}"/>
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
||||
<Path x:Name="icon" Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Commit}" Margin="4,0"/>
|
||||
<TextBlock x:Name="txtDesc" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG1}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkCommit" Content="Commit revert changes" IsChecked="True"/>
|
||||
<CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkCommit" Content="{StaticResource Text.Revert.CommitChanges}" IsChecked="True"/>
|
||||
|
||||
<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -38,8 +38,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Sure" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Sure" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
xmlns:app="clr-namespace:SourceGit"
|
||||
xmlns:git="clr-namespace:SourceGit.Git"
|
||||
mc:Ignorable="d"
|
||||
Height="548" Width="500"
|
||||
Title="Preference"
|
||||
Height="600" Width="500"
|
||||
Title="{StaticResource Text.Preference}"
|
||||
WindowStartupLocation="CenterOwner" ResizeMode="NoResize">
|
||||
|
||||
<!-- Enable WindowChrome Feature -->
|
||||
|
@ -37,7 +37,7 @@
|
|||
<Path Width="20" Height="20" Margin="6,-1,2,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Git}" Fill="{StaticResource Brush.Logo}"/>
|
||||
|
||||
<!-- Title -->
|
||||
<Label Grid.Column="1" Content="Preference" FontWeight="Light"/>
|
||||
<Label Grid.Column="1" Content="{StaticResource Text.Preference}" FontWeight="Light"/>
|
||||
|
||||
<!-- Close Button -->
|
||||
<Button Click="Close" Width="32" Grid.Column="3" WindowChrome.IsHitTestVisibleInChrome="True">
|
||||
|
@ -61,6 +61,7 @@
|
|||
<RowDefinition Height="36"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="18"/>
|
||||
<RowDefinition Height="36"/>
|
||||
<RowDefinition Height="28"/>
|
||||
|
@ -83,25 +84,37 @@
|
|||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- 通用 -->
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" Content="GENERAL SETTING" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Light Theme :" HorizontalAlignment="Right"/>
|
||||
<CheckBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
IsChecked="{Binding Source={x:Static app:App.Setting}, Path=UI.UseLightTheme, Mode=TwoWay}"
|
||||
Content="Restart required"
|
||||
TextElement.FontStyle="Italic"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="Check for Update :" HorizontalAlignment="Right"/>
|
||||
<StackPanel Grid.Row="0" Grid.ColumnSpan="2" Orientation="Horizontal">
|
||||
<Label Content="{StaticResource Text.Preference.General}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Content="{StaticResource Text.Preference.RestartRequired}" Opacity=".5"/>
|
||||
</StackPanel>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{StaticResource Text.Preference.Locale}" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="1" Grid.Column="1"
|
||||
x:Name="cmbLang"
|
||||
Height="24"
|
||||
Width="120"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalContentAlignment="Center"
|
||||
DisplayMemberPath="Desc"
|
||||
SelectionChanged="ChangeLanguage"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{StaticResource Text.Preference.UseLight}" HorizontalAlignment="Right"/>
|
||||
<CheckBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
IsChecked="{Binding Source={x:Static app:App.Setting}, Path=UI.UseLightTheme, Mode=TwoWay}"
|
||||
TextElement.FontStyle="Italic"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{StaticResource Text.Preference.CheckUpdate}" HorizontalAlignment="Right"/>
|
||||
<CheckBox
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
IsChecked="{Binding Source={x:Static app:App.Setting}, Path=CheckUpdate, Mode=TwoWay}"
|
||||
TextElement.FontStyle="Italic"/>
|
||||
|
||||
<!-- GIT相关配置 -->
|
||||
<Label Grid.Row="4" Grid.ColumnSpan="2" Content="GIT INSTANCE" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="Install Path :" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="5" Grid.Column="1">
|
||||
<Label Grid.Row="5" Grid.ColumnSpan="2" Content="{StaticResource Text.Preference.Git}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="6" Grid.Column="0" Content="{StaticResource Text.Preference.Git.Path}" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="6" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="28"/>
|
||||
|
@ -111,13 +124,13 @@
|
|||
x:Name="txtGitPath"
|
||||
Height="24"
|
||||
Text="{Binding Source={x:Static app:App.Setting}, Path=Tools.GitExecutable, Mode=TwoWay}"
|
||||
helpers:TextBoxHelper.Placeholder="Input path for git.exe"/>
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Preference.Git.Path.Placeholder}"/>
|
||||
<Button Grid.Column="1" Width="24" Height="24" Click="SelectGitPath" Padding="0" BorderThickness="1" Style="{StaticResource Style.Button.Bordered}">
|
||||
<Path Width="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Label Grid.Row="6" Grid.Column="0" Content="Default Clone Dir :" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="6" Grid.Column="1">
|
||||
<Label Grid.Row="7" Grid.Column="0" Content="{StaticResource Text.Preference.Git.Dir}" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="7" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="28"/>
|
||||
|
@ -127,20 +140,20 @@
|
|||
x:Name="txtGitCloneDir"
|
||||
Height="24"
|
||||
Text="{Binding Source={x:Static app:App.Setting}, Path=Tools.GitDefaultCloneDir, Mode=TwoWay}"
|
||||
helpers:TextBoxHelper.Placeholder="Default path to clone repo into"/>
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Preference.Git.Dir.Placeholder}"/>
|
||||
<Button Grid.Column="1" Width="24" Height="24" Click="SelectDefaultClonePath" Padding="0" BorderThickness="1" Style="{StaticResource Style.Button.Bordered}">
|
||||
<Path Width="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<!-- Global User -->
|
||||
<Label Grid.Row="8" Grid.ColumnSpan="2" Content="GLOBAL SETTING" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="9" Grid.Column="0" Content="Name :" HorizontalAlignment="Right"/>
|
||||
<TextBox Grid.Row="9" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user name" Text="{Binding ElementName=me, Path=GlobalUser, Mode=TwoWay}"/>
|
||||
<Label Grid.Row="10" Grid.Column="0" Content="Email :" HorizontalAlignment="Right"/>
|
||||
<TextBox Grid.Row="10" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user email" Text="{Binding ElementName=me, Path=GlobalUserEmail, Mode=TwoWay}"/>
|
||||
<Label Grid.Row="11" Grid.Column="0" Content="Auto CRLF :" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="11" Grid.Column="1"
|
||||
<Label Grid.Row="9" Grid.ColumnSpan="2" Content="{StaticResource Text.Preference.Global}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="10" Grid.Column="0" Content="{StaticResource Text.Preference.User}" HorizontalAlignment="Right"/>
|
||||
<TextBox Grid.Row="10" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user name" Text="{Binding ElementName=me, Path=GlobalUser, Mode=TwoWay}"/>
|
||||
<Label Grid.Row="11" Grid.Column="0" Content="{StaticResource Text.Preference.Email}" HorizontalAlignment="Right"/>
|
||||
<TextBox Grid.Row="11" Grid.Column="1" Height="24" helpers:TextBoxHelper.Placeholder="Global git user email" Text="{Binding ElementName=me, Path=GlobalUserEmail, Mode=TwoWay}"/>
|
||||
<Label Grid.Row="12" Grid.Column="0" Content="{StaticResource Text.Preference.CRLF}" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="12" Grid.Column="1"
|
||||
x:Name="cmbAutoCRLF"
|
||||
Height="24"
|
||||
HorizontalAlignment="Stretch"
|
||||
|
@ -157,9 +170,9 @@
|
|||
</ComboBox>
|
||||
|
||||
<!-- 合并工具配置 -->
|
||||
<Label Grid.Row="13" Grid.ColumnSpan="2" Content="MERGE TOOL" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="14" Grid.Column="0" Content="Merger :" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="14" Grid.Column="1"
|
||||
<Label Grid.Row="14" Grid.ColumnSpan="2" Content="{StaticResource Text.Preference.Merger}" FontSize="16" FontWeight="DemiBold" Opacity=".85"/>
|
||||
<Label Grid.Row="15" Grid.Column="0" Content="{StaticResource Text.Preference.Merger.Type}" HorizontalAlignment="Right"/>
|
||||
<ComboBox Grid.Row="15" Grid.Column="1"
|
||||
Height="24"
|
||||
Padding="2,0,0,0"
|
||||
HorizontalContentAlignment="Left"
|
||||
|
@ -168,8 +181,8 @@
|
|||
ItemsSource="{Binding Source={x:Static git:MergeTool.Supported}}"
|
||||
DisplayMemberPath="Name"
|
||||
SelectionChanged="ChangeMergeTool"/>
|
||||
<Label Grid.Row="15" Grid.Column="0" Content="Install Path :" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="15" Grid.Column="1">
|
||||
<Label Grid.Row="16" Grid.Column="0" Content="{StaticResource Text.Preference.Merger.Path}" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="16" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="28"/>
|
||||
|
@ -179,13 +192,13 @@
|
|||
x:Name="txtMergePath"
|
||||
Height="24"
|
||||
Text="{Binding Source={x:Static app:App.Setting}, Path=Tools.MergeExecutable, Mode=TwoWay}"
|
||||
helpers:TextBoxHelper.Placeholder="Input path for merge tool"/>
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Preference.Merger.Path.Placeholder}"/>
|
||||
<Button Grid.Column="1" Width="24" Height="24" Click="SelectMergeToolPath" Padding="0" BorderThickness="1" Style="{StaticResource Style.Button.Bordered}">
|
||||
<Path Width="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Label Grid.Row="16" Grid.Column="0" Content="Command :" HorizontalAlignment="Right"/>
|
||||
<TextBlock Grid.Row="16" Grid.Column="1"
|
||||
<Label Grid.Row="17" Grid.Column="0" Content="{StaticResource Text.Preference.Merger.Cmd}" HorizontalAlignment="Right"/>
|
||||
<TextBlock Grid.Row="17" Grid.Column="1"
|
||||
x:Name="txtMergeParam"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{StaticResource Brush.FG2}"/>
|
||||
|
|
|
@ -50,6 +50,19 @@ namespace SourceGit.UI {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Locale setting.
|
||||
/// </summary>
|
||||
public class Locale {
|
||||
public string Value { get; set; }
|
||||
public string Desc { get; set; }
|
||||
|
||||
public Locale(string v, string d) {
|
||||
Value = v;
|
||||
Desc = d;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
|
@ -61,6 +74,13 @@ namespace SourceGit.UI {
|
|||
|
||||
InitializeComponent();
|
||||
|
||||
var locales = new List<Locale>() {
|
||||
new Locale("en_US", "English"),
|
||||
new Locale("zh_CN", "简体中文"),
|
||||
};
|
||||
cmbLang.ItemsSource = locales;
|
||||
cmbLang.SelectedItem = locales.Find(o => o.Value == App.Setting.UI.Locale);
|
||||
|
||||
int mergeType = App.Setting.Tools.MergeTool;
|
||||
var merger = Git.MergeTool.Supported[mergeType];
|
||||
txtMergePath.IsReadOnly = !merger.IsConfigured;
|
||||
|
@ -91,6 +111,21 @@ namespace SourceGit.UI {
|
|||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set locale
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ChangeLanguage(object sender, SelectionChangedEventArgs e) {
|
||||
if (e.AddedItems.Count != 1) return;
|
||||
|
||||
var mode = e.AddedItems[0] as Locale;
|
||||
if (mode == null) return;
|
||||
|
||||
App.Setting.UI.Locale = mode.Value;
|
||||
App.SaveSetting();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Select git executable file path.
|
||||
/// </summary>
|
||||
|
@ -100,7 +135,7 @@ namespace SourceGit.UI {
|
|||
var dialog = new OpenFileDialog();
|
||||
dialog.Filter = "Git Executable|git.exe";
|
||||
dialog.FileName = "git.exe";
|
||||
dialog.Title = "Select Git Executable File";
|
||||
dialog.Title = App.Text("Preference.Dialog.GitExe");
|
||||
dialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
|
||||
dialog.CheckFileExists = true;
|
||||
|
||||
|
@ -116,7 +151,7 @@ namespace SourceGit.UI {
|
|||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void SelectDefaultClonePath(object sender, RoutedEventArgs e) {
|
||||
FolderDailog.Open("Select default clone path", path => {
|
||||
FolderDailog.Open(App.Text("Preference.Dialog.GitDir"), path => {
|
||||
txtGitCloneDir.Text = path;
|
||||
App.Setting.Tools.GitDefaultCloneDir = path;
|
||||
});
|
||||
|
@ -151,7 +186,7 @@ namespace SourceGit.UI {
|
|||
var merger = Git.MergeTool.Supported[mergeType];
|
||||
var dialog = new OpenFileDialog();
|
||||
dialog.Filter = $"{merger.Name} Executable|{merger.ExecutableName}";
|
||||
dialog.Title = $"Select {merger.Name} Install Path";
|
||||
dialog.Title = App.Format("Preference.Dialog.Merger", merger.Name);
|
||||
dialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
|
||||
dialog.CheckFileExists = true;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<UserControl x:Class="SourceGit.UI.Stash"
|
||||
<UserControl x:Class="SourceGit.UI.Stash"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
|
@ -21,15 +21,15 @@
|
|||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Stash Local Changes"/>
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="{StaticResource Text.Stash.Title}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Message :"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="{StaticResource Text.Stash.Message}"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1"
|
||||
x:Name="txtName"
|
||||
Height="24"
|
||||
helpers:TextBoxHelper.Placeholder="Optional. Name of this stash"/>
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.Stash.Message.Placeholder}"/>
|
||||
|
||||
<CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkIncludeUntracked" IsChecked="True" Content="Include untracked files"/>
|
||||
<CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkIncludeUntracked" IsChecked="True" Content="{StaticResource Text.Stash.IncludeUntracked}"/>
|
||||
|
||||
<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -39,8 +39,8 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Click="Start" Content="SURE" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="CANCEL" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
<Button Grid.Column="1" Click="Start" Content="{StaticResource Text.Sure}" Style="{StaticResource Style.Button.AccentBordered}"/>
|
||||
<Button Grid.Column="3" Click="Cancel" Content="{StaticResource Text.Cancel}" Style="{StaticResource Style.Button.Bordered}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Content="STASHES" Foreground="{StaticResource Brush.FG2}" Margin="4,0,0,0" FontWeight="Bold"/>
|
||||
<Label Content="{StaticResource Text.Stashes.Stashes}" Foreground="{StaticResource Brush.FG2}" Margin="4,0,0,0" FontWeight="Bold"/>
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
x:Name="stashList"
|
||||
|
@ -82,8 +82,8 @@
|
|||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Content="CHANGES" Foreground="{StaticResource Brush.FG2}" Margin="4,0,0,0" FontWeight="Bold"/>
|
||||
<Label Grid.Column="1" Content="Untracked files not included" Foreground="{StaticResource Brush.FG2}" FontSize="10"/>
|
||||
<Label Grid.Column="0" Content="{StaticResource Text.Stashes.Changes}" Foreground="{StaticResource Brush.FG2}" Margin="4,0,0,0" FontWeight="Bold"/>
|
||||
<Label Grid.Column="1" Content="{StaticResource Text.Stashes.Changes.Tip}" Foreground="{StaticResource Brush.FG2}" FontSize="10"/>
|
||||
</Grid>
|
||||
|
||||
<ListView
|
||||
|
|
|
@ -97,15 +97,15 @@ namespace SourceGit.UI {
|
|||
if (stash == null) return;
|
||||
|
||||
var apply = new MenuItem();
|
||||
apply.Header = "Apply";
|
||||
apply.Header = App.Text("StashCM.Apply");
|
||||
apply.Click += (o, e) => stash.Apply(repo);
|
||||
|
||||
var pop = new MenuItem();
|
||||
pop.Header = "Pop";
|
||||
pop.Header = App.Text("StashCM.Pop");
|
||||
pop.Click += (o, e) => stash.Pop(repo);
|
||||
|
||||
var delete = new MenuItem();
|
||||
delete.Header = "Drop";
|
||||
delete.Header = App.Text("StashCM.Drop");
|
||||
delete.Click += (o, e) => stash.Drop(repo);
|
||||
|
||||
var menu = new ContextMenu();
|
||||
|
|
|
@ -44,12 +44,12 @@
|
|||
|
||||
<Border Grid.Column="0" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="{StaticResource Brush.Border2}"/>
|
||||
<Path Grid.Column="0" Width="14" Height="14" Fill="{StaticResource Brush.FG2}" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Search}"/>
|
||||
<TextBox Grid.Column="1" x:Name="txtChangeFilter" BorderThickness="0" helpers:TextBoxHelper.Placeholder="Search File ..." TextChanged="SearchChangeFileTextChanged"/>
|
||||
<TextBox Grid.Column="1" x:Name="txtChangeFilter" BorderThickness="0" helpers:TextBoxHelper.Placeholder="{StaticResource Text.CommitViewer.Changes.Search}" TextChanged="SearchChangeFileTextChanged"/>
|
||||
<ToggleButton
|
||||
Grid.Column="2"
|
||||
x:Name="toggleSwitchMode"
|
||||
Margin="4,0,0,0"
|
||||
ToolTip="SWITCH TO LIST/TREE VIEW"
|
||||
ToolTip="{StaticResource Text.CommitViewer.Changes.SwitchMode}"
|
||||
Style="{StaticResource Style.ToggleButton.ListOrTree}"
|
||||
IsChecked="{Binding Source={x:Static source:App.Setting}, Path=UI.UseListInChanges, Mode=TwoWay}"/>
|
||||
</Grid>
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace SourceGit.UI {
|
|||
this.sha1 = sha1;
|
||||
this.sha2 = sha2;
|
||||
|
||||
txtTitle.Content = $"COMMIT : {sha1} -> {sha2}";
|
||||
txtTitle.Content = App.Format("TwoCommitsDiff", sha1, sha2);
|
||||
Task.Run(() => LoadChanges(true));
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ namespace SourceGit.UI {
|
|||
var menu = new ContextMenu();
|
||||
if (change.Index != Git.Change.Status.Deleted) {
|
||||
MenuItem history = new MenuItem();
|
||||
history.Header = "File History";
|
||||
history.Header = App.Text("FileHistory");
|
||||
history.Click += (o, ev) => {
|
||||
var viewer = new FileHistories(repo, path);
|
||||
viewer.Show();
|
||||
|
@ -199,7 +199,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(history);
|
||||
|
||||
MenuItem explore = new MenuItem();
|
||||
explore.Header = "Reveal in File Explorer";
|
||||
explore.Header = App.Text("RevealFile");
|
||||
explore.Click += (o, ev) => {
|
||||
var absPath = Path.GetFullPath(repo.Path + "\\" + path);
|
||||
Process.Start("explorer", $"/select,{absPath}");
|
||||
|
@ -209,7 +209,7 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
MenuItem copyPath = new MenuItem();
|
||||
copyPath.Header = "Copy Path";
|
||||
copyPath.Header = App.Text("CopyPath");
|
||||
copyPath.Click += (obj, ev) => {
|
||||
Clipboard.SetText(path);
|
||||
};
|
||||
|
@ -257,7 +257,7 @@ namespace SourceGit.UI {
|
|||
ContextMenu menu = new ContextMenu();
|
||||
if (node.Change == null || node.Change.Index != Git.Change.Status.Deleted) {
|
||||
MenuItem history = new MenuItem();
|
||||
history.Header = "File History";
|
||||
history.Header = App.Text("FileHistory");
|
||||
history.Click += (o, ev) => {
|
||||
var viewer = new FileHistories(repo, node.FilePath);
|
||||
viewer.Show();
|
||||
|
@ -265,7 +265,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(history);
|
||||
|
||||
MenuItem explore = new MenuItem();
|
||||
explore.Header = "Reveal in File Explorer";
|
||||
explore.Header = App.Text("RevealFile");
|
||||
explore.Click += (o, ev) => {
|
||||
var path = Path.GetFullPath(repo.Path + "\\" + node.FilePath);
|
||||
Process.Start("explorer", $"/select,{path}");
|
||||
|
@ -275,7 +275,7 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
MenuItem copyPath = new MenuItem();
|
||||
copyPath.Header = "Copy Path";
|
||||
copyPath.Header = App.Text("CopyPath");
|
||||
copyPath.Click += (obj, ev) => {
|
||||
Clipboard.SetText(node.FilePath);
|
||||
};
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
mc:Ignorable="d"
|
||||
FontFamily="Consolas"
|
||||
Height="400" Width="500"
|
||||
Title="{StaticResource Text.UpdateAvailable}"
|
||||
WindowStartupLocation="CenterOwner" ResizeMode="NoResize">
|
||||
<!-- Enable WindowChrome Feature -->
|
||||
<WindowChrome.WindowChrome>
|
||||
|
@ -29,10 +30,10 @@
|
|||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- LOGO -->
|
||||
<Path Width="20" Height="20" Margin="6,-1,2,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Fetch}" Fill="{StaticResource Brush.Logo}"/>
|
||||
<Path Width="20" Height="20" Margin="6,-1,2,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Fetch}" Fill="{StaticResource Brush.FG1}"/>
|
||||
|
||||
<!-- Title -->
|
||||
<Label Grid.Column="1" Content="UPDATE AVAILABLE" FontWeight="Light"/>
|
||||
<Label Grid.Column="1" Content="{StaticResource Text.UpdateAvailable}" FontWeight="Light"/>
|
||||
|
||||
<!-- Close Button -->
|
||||
<Button Click="Quit" Width="32" Grid.Column="3" WindowChrome.IsHitTestVisibleInChrome="True">
|
||||
|
@ -62,25 +63,29 @@
|
|||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="140"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Path Width="20" Height="20" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Git}" Fill="#FFF05133"/>
|
||||
<Label x:Name="txtRelease" Content="Release 2.1 available!" FontSize="18" FontWeight="Bold"/>
|
||||
<Label x:Name="txtRelease" FontSize="18" FontWeight="Bold"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="Publish Time :" HorizontalAlignment="Right"/>
|
||||
<Label Grid.Row="2" Grid.Column="1" x:Name="txtTime" Content="2020/11/30 00:00:00"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{StaticResource Text.UpdateAvailable.Time}" Margin="8,0,0,0"/>
|
||||
<Label Grid.Row="2" Grid.Column="1" Content=":"/>
|
||||
<Label Grid.Row="2" Grid.Column="2" x:Name="txtTime" Content="2020/11/30 00:00:00"/>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="Base On Commit :" HorizontalAlignment="Right"/>
|
||||
<Label Grid.Row="3" Grid.Column="1" x:Name="txtBasedOn" Content="724908ea"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{StaticResource Text.UpdateAvailable.Based}" Margin="8,0,0,0"/>
|
||||
<Label Grid.Row="3" Grid.Column="1" Content=":"/>
|
||||
<Label Grid.Row="3" Grid.Column="2" x:Name="txtBasedOn" Content="724908ea"/>
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="Is Pre-release :" HorizontalAlignment="Right"/>
|
||||
<Label Grid.Row="4" Grid.Column="1" x:Name="txtPrerelease" Content="NO"/>
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="{StaticResource Text.UpdateAvailable.IsPreRelease}" Margin="8,0,0,0"/>
|
||||
<Label Grid.Row="4" Grid.Column="1" Content=":"/>
|
||||
<Label Grid.Row="4" Grid.Column="2" x:Name="txtPrerelease" Content="NO"/>
|
||||
|
||||
<Border Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Margin="6,6,6,0" BorderBrush="{StaticResource Brush.Border2}" BorderThickness="1">
|
||||
<Border Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="3" Margin="6,6,6,0" BorderBrush="{StaticResource Brush.Border2}" BorderThickness="1">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
||||
<TextBlock FontSize="10pt"
|
||||
FontFamily="Consolas"
|
||||
|
@ -92,9 +97,9 @@
|
|||
</ScrollViewer>
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,8,0,0">
|
||||
<Button Width="80" Height="24" Style="{StaticResource Style.Button.AccentBordered}" Content="DOWNLOAD" Click="Download"/>
|
||||
<Button Width="80" Margin="8,0,0,0" Height="24" Style="{StaticResource Style.Button.Bordered}" Content="CANCEL" Click="Quit"/>
|
||||
<StackPanel Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="3" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,8,0,0">
|
||||
<Button Width="80" Height="24" Style="{StaticResource Style.Button.AccentBordered}" Content="{StaticResource Text.UpdateAvailable.Download}" Click="Download"/>
|
||||
<Button Width="80" Margin="8,0,0,0" Height="24" Style="{StaticResource Style.Button.Bordered}" Content="{StaticResource Text.Cancel}" Click="Quit"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace SourceGit.UI {
|
|||
public UpdateAvailable(Git.Version version) {
|
||||
InitializeComponent();
|
||||
|
||||
txtRelease.Content = $"{version.Name} is available!";
|
||||
txtRelease.Content = App.Format("UpdateAvailable.Title", version.Name);
|
||||
txtTime.Content = version.CreatedAt.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss");
|
||||
txtBasedOn.Content = version.CommitSHA.Substring(0, 10);
|
||||
txtPrerelease.Content = version.PreRelease ? "YES" : "NO";
|
||||
|
|
|
@ -61,11 +61,11 @@
|
|||
Grid.Column="0"
|
||||
Mode="{Binding Source={x:Static source:App.Setting}, Path=UI.UnstageFileDisplayMode, Mode=TwoWay}"
|
||||
Opacity=".4"/>
|
||||
<Label Grid.Column="1" Content="UNSTAGED" FontWeight="Bold" Foreground="{StaticResource Brush.FG1}" Opacity=".4"/>
|
||||
<Button Grid.Column="3" Click="Stage" Margin="4,0" ToolTip="STAGE" Background="Transparent">
|
||||
<Label Grid.Column="1" Content="{StaticResource Text.WorkingCopy.Unstaged}" FontWeight="Bold" Foreground="{StaticResource Brush.FG1}" Opacity=".4"/>
|
||||
<Button Grid.Column="3" Click="Stage" Margin="4,0" ToolTip="{StaticResource Text.WorkingCopy.Unstaged.Stage}" Background="Transparent">
|
||||
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Down}" Opacity=".4"/>
|
||||
</Button>
|
||||
<Button Grid.Column="4" Click="StageAll" Margin="4,0" ToolTip="STAGE ALL" Background="Transparent">
|
||||
<Button Grid.Column="4" Click="StageAll" Margin="4,0" ToolTip="{StaticResource Text.WorkingCopy.Unstaged.StageAll}" Background="Transparent">
|
||||
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.DoubleDown}" Opacity=".4"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
@ -219,11 +219,11 @@
|
|||
Grid.Column="0"
|
||||
Mode="{Binding Source={x:Static source:App.Setting}, Path=UI.StagedFileDisplayMode, Mode=TwoWay}"
|
||||
Opacity=".4"/>
|
||||
<Label Grid.Column="1" Content="STAGED" FontWeight="Bold" Foreground="{StaticResource Brush.FG1}" Opacity=".4"/>
|
||||
<Button Grid.Column="3" Click="Unstage" ToolTip="UNSTAGE" Margin="4,0" Background="Transparent">
|
||||
<Label Grid.Column="1" Content="{StaticResource Text.WorkingCopy.Staged}" FontWeight="Bold" Foreground="{StaticResource Brush.FG1}" Opacity=".4"/>
|
||||
<Button Grid.Column="3" Click="Unstage" ToolTip="{StaticResource Text.WorkingCopy.Staged.Unstage}" Margin="4,0" Background="Transparent">
|
||||
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Up}" Opacity=".4"/>
|
||||
</Button>
|
||||
<Button Grid.Column="4" Click="UnstageAll" ToolTip="UNSTAGE ALL" Margin="4,0" Background="Transparent">
|
||||
<Button Grid.Column="4" Click="UnstageAll" ToolTip="{StaticResource Text.WorkingCopy.Staged.UnstageAll}" Margin="4,0" Background="Transparent">
|
||||
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.DoubleUp}" Opacity=".4"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
@ -373,11 +373,11 @@
|
|||
<Grid Grid.Row="0" x:Name="mergePanel" Background="{StaticResource Brush.Window}" Visibility="Collapsed">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Conflict}" Margin="0,0,0,16"/>
|
||||
<Label Content="CONFLICTS DETECTED" FontSize="20" HorizontalAlignment="Center" FontWeight="DemiBold" Foreground="{StaticResource Brush.FG2}" Margin="0,0,0,24"/>
|
||||
<Label Content="{StaticResource Text.WorkingCopy.Conflicts}" FontSize="20" HorizontalAlignment="Center" FontWeight="DemiBold" Foreground="{StaticResource Brush.FG2}" Margin="0,0,0,24"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,4">
|
||||
<Button Click="UseTheirs" Style="{StaticResource Style.Button.Bordered}" Content="USE THEIRS" Height="24"/>
|
||||
<Button Click="UseMine" Style="{StaticResource Style.Button.Bordered}" Content="USE MINE" Height="24" Margin="8,0"/>
|
||||
<Button Click="OpenMergeTool" Style="{StaticResource Style.Button.Bordered}" Content="OPEN MERGE" Height="24"/>
|
||||
<Button Click="UseTheirs" Style="{StaticResource Style.Button.Bordered}" Content="{StaticResource Text.WorkingCopy.UseTheirs}" Height="24"/>
|
||||
<Button Click="UseMine" Style="{StaticResource Style.Button.Bordered}" Content="{StaticResource Text.WorkingCopy.UseMine}" Height="24" Margin="8,0"/>
|
||||
<Button Click="OpenMergeTool" Style="{StaticResource Style.Button.Bordered}" Content="{StaticResource Text.WorkingCopy.OpenMerger}" Height="24"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
@ -393,7 +393,7 @@
|
|||
TextWrapping="Wrap"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
helpers:TextBoxHelper.Placeholder="Enter commit message"
|
||||
helpers:TextBoxHelper.Placeholder="{StaticResource Text.WorkingCopy.CommitMessageTip}"
|
||||
helpers:TextBoxHelper.PlaceholderBaseline="Top"
|
||||
GotFocus="CommitMsgGotFocus"
|
||||
PreviewMouseWheel="CommitMsgPreviewMouseWheel">
|
||||
|
@ -416,14 +416,14 @@
|
|||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="0" Width="16" Height="16" Margin="0,0,8,0" Click="OpenCommitMessageSelector" ToolTip="MESSAGE HISTORIES">
|
||||
<Button Grid.Column="0" Width="16" Height="16" Margin="0,0,8,0" Click="OpenCommitMessageSelector" ToolTip="{StaticResource Text.WorkingCopy.MessageHistories}">
|
||||
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.List}"/>
|
||||
</Button>
|
||||
|
||||
<CheckBox Grid.Column="1" x:Name="chkAmend" HorizontalAlignment="Left" Content="Amend" Checked="StartAmend" Unchecked="EndAmend"/>
|
||||
<CheckBox Grid.Column="1" x:Name="chkAmend" HorizontalAlignment="Left" Content="{StaticResource Text.WorkingCopy.Amend}" Checked="StartAmend" Unchecked="EndAmend"/>
|
||||
|
||||
<Button Grid.Column="3" Height="26" Click="Commit" Style="{StaticResource Style.Button.AccentBordered}" Content="COMMIT"/>
|
||||
<Button Grid.Column="4" x:Name="btnCommitAndPush" Height="26" Click="CommitAndPush" Style="{StaticResource Style.Button.Bordered}" Content="COMMIT & PUSH" Margin="8,0,0,0"/>
|
||||
<Button Grid.Column="3" Height="26" Click="Commit" Style="{StaticResource Style.Button.AccentBordered}" Content="{StaticResource Text.WorkingCopy.Commit}"/>
|
||||
<Button Grid.Column="4" x:Name="btnCommitAndPush" Height="26" Click="CommitAndPush" Style="{StaticResource Style.Button.Bordered}" Content="{StaticResource Text.WorkingCopy.CommitAndPush}" Margin="8,0,0,0"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
|
|
@ -327,7 +327,7 @@ namespace SourceGit.UI {
|
|||
var path = Path.GetFullPath(Repo.Path + "\\" + node.FilePath);
|
||||
var explore = new MenuItem();
|
||||
explore.IsEnabled = File.Exists(path) || Directory.Exists(path);
|
||||
explore.Header = "Reveal in File Explorer";
|
||||
explore.Header = App.Text("RevealFile");
|
||||
explore.Click += (o, e) => {
|
||||
if (node.IsFile) Process.Start("explorer", $"/select,{path}");
|
||||
else Process.Start("explorer", path);
|
||||
|
@ -335,21 +335,21 @@ namespace SourceGit.UI {
|
|||
};
|
||||
|
||||
var stage = new MenuItem();
|
||||
stage.Header = "Stage";
|
||||
stage.Header = App.Text("FileCM.Stage");
|
||||
stage.Click += async (o, e) => {
|
||||
await Task.Run(() => Repo.Stage(node.FilePath));
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var discard = new MenuItem();
|
||||
discard.Header = "Discard changes ...";
|
||||
discard.Header = App.Text("FileCM.Discard");
|
||||
discard.Click += (o, e) => {
|
||||
Discard.Show(Repo, changes);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var stash = new MenuItem();
|
||||
stash.Header = $"Stash ...";
|
||||
stash.Header = App.Text("FileCM.Stash");
|
||||
stash.Click += (o, e) => {
|
||||
List<string> nodes = new List<string>() { node.FilePath };
|
||||
Stash.Show(Repo, nodes);
|
||||
|
@ -357,11 +357,11 @@ namespace SourceGit.UI {
|
|||
};
|
||||
|
||||
var patch = new MenuItem();
|
||||
patch.Header = $"Save as patch ...";
|
||||
patch.Header = App.Text("FileCM.SaveAsPatch");
|
||||
patch.Click += (o, e) => {
|
||||
var dialog = new SaveFileDialog();
|
||||
dialog.Filter = "Patch File|*.patch";
|
||||
dialog.Title = "Select file to store patch data.";
|
||||
dialog.Title = App.Text("FileCM.SaveAsPatch");
|
||||
dialog.InitialDirectory = Repo.Path;
|
||||
|
||||
if (dialog.ShowDialog() == true) {
|
||||
|
@ -372,7 +372,7 @@ namespace SourceGit.UI {
|
|||
};
|
||||
|
||||
var copyPath = new MenuItem();
|
||||
copyPath.Header = "Copy full path";
|
||||
copyPath.Header = App.Text("CopyPath");
|
||||
copyPath.Click += (o, e) => {
|
||||
Clipboard.SetText(node.FilePath);
|
||||
e.Handled = true;
|
||||
|
@ -388,7 +388,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(new Separator());
|
||||
if (node.Change != null) {
|
||||
var history = new MenuItem();
|
||||
history.Header = "Histories ...";
|
||||
history.Header = App.Text("FileHistory");
|
||||
history.Click += (o, e) => {
|
||||
var viewer = new FileHistories(Repo, node.FilePath);
|
||||
viewer.Show();
|
||||
|
@ -407,32 +407,32 @@ namespace SourceGit.UI {
|
|||
foreach (var c in changes) files.Add(c.Path);
|
||||
|
||||
var stage = new MenuItem();
|
||||
stage.Header = $"Stage {changes.Count} files ...";
|
||||
stage.Header = App.Format("FileCM.StageMulti", changes.Count);
|
||||
stage.Click += async (o, e) => {
|
||||
await Task.Run(() => Repo.Stage(files.ToArray()));
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var discard = new MenuItem();
|
||||
discard.Header = $"Discard {changes.Count} changes ...";
|
||||
discard.Header = App.Format("FileCM.DiscardMulti", changes.Count);
|
||||
discard.Click += (o, e) => {
|
||||
Discard.Show(Repo, changes);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var stash = new MenuItem();
|
||||
stash.Header = $"Stash {changes.Count} files ...";
|
||||
stash.Header = App.Format("FileCM.StashMulti", changes.Count);
|
||||
stash.Click += (o, e) => {
|
||||
Stash.Show(Repo, files);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var patch = new MenuItem();
|
||||
patch.Header = $"Save as patch ...";
|
||||
patch.Header = App.Text("FileCM.SaveAsPatch");
|
||||
patch.Click += (o, e) => {
|
||||
var dialog = new SaveFileDialog();
|
||||
dialog.Filter = "Patch File|*.patch";
|
||||
dialog.Title = "Select file to store patch data.";
|
||||
dialog.Title = App.Text("FileCM.SaveAsPatch");
|
||||
dialog.InitialDirectory = Repo.Path;
|
||||
|
||||
if (dialog.ShowDialog() == true) {
|
||||
|
@ -470,28 +470,28 @@ namespace SourceGit.UI {
|
|||
var path = Path.GetFullPath(Repo.Path + "\\" + change.Path);
|
||||
var explore = new MenuItem();
|
||||
explore.IsEnabled = File.Exists(path) || Directory.Exists(path);
|
||||
explore.Header = "Reveal in File Explorer";
|
||||
explore.Header = App.Text("RevealFile");
|
||||
explore.Click += (o, e) => {
|
||||
Process.Start("explorer", $"/select,{path}");
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var stage = new MenuItem();
|
||||
stage.Header = "Stage";
|
||||
stage.Header = App.Text("FileCM.Stage");
|
||||
stage.Click += async (o, e) => {
|
||||
await Task.Run(() => Repo.Stage(change.Path));
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var discard = new MenuItem();
|
||||
discard.Header = "Discard changes ...";
|
||||
discard.Header = App.Text("FileCM.Discard");
|
||||
discard.Click += (o, e) => {
|
||||
Discard.Show(Repo, new List<Git.Change>() { change });
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var stash = new MenuItem();
|
||||
stash.Header = $"Stash ...";
|
||||
stash.Header = App.Text("FileCM.Stash");
|
||||
stash.Click += (o, e) => {
|
||||
List<string> nodes = new List<string>() { change.Path };
|
||||
Stash.Show(Repo, nodes);
|
||||
|
@ -499,11 +499,11 @@ namespace SourceGit.UI {
|
|||
};
|
||||
|
||||
var patch = new MenuItem();
|
||||
patch.Header = $"Save as patch ...";
|
||||
patch.Header = App.Text("FileCM.SaveAsPatch");
|
||||
patch.Click += (o, e) => {
|
||||
var dialog = new SaveFileDialog();
|
||||
dialog.Filter = "Patch File|*.patch";
|
||||
dialog.Title = "Select file to store patch data.";
|
||||
dialog.Title = App.Text("FileCM.SaveAsPatch");
|
||||
dialog.InitialDirectory = Repo.Path;
|
||||
|
||||
if (dialog.ShowDialog() == true) {
|
||||
|
@ -514,7 +514,7 @@ namespace SourceGit.UI {
|
|||
};
|
||||
|
||||
var copyPath = new MenuItem();
|
||||
copyPath.Header = "Copy file path";
|
||||
copyPath.Header = App.Text("CopyPath");
|
||||
copyPath.Click += (o, e) => {
|
||||
Clipboard.SetText(change.Path);
|
||||
e.Handled = true;
|
||||
|
@ -530,7 +530,7 @@ namespace SourceGit.UI {
|
|||
menu.Items.Add(new Separator());
|
||||
if (change != null) {
|
||||
var history = new MenuItem();
|
||||
history.Header = "Histories ...";
|
||||
history.Header = App.Text("FileHistory");
|
||||
history.Click += (o, e) => {
|
||||
var viewer = new FileHistories(Repo, change.Path);
|
||||
viewer.Show();
|
||||
|
@ -550,32 +550,32 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
var stage = new MenuItem();
|
||||
stage.Header = $"Stage {changes.Count} files ...";
|
||||
stage.Header = App.Format("FileCM.StageMulti", changes.Count);
|
||||
stage.Click += async (o, e) => {
|
||||
await Task.Run(() => Repo.Stage(files.ToArray()));
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var discard = new MenuItem();
|
||||
discard.Header = $"Discard {changes.Count} changes ...";
|
||||
discard.Header = App.Format("FileCM.DiscardMulti", changes.Count);
|
||||
discard.Click += (o, e) => {
|
||||
Discard.Show(Repo, changes);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var stash = new MenuItem();
|
||||
stash.Header = $"Stash {changes.Count} files ...";
|
||||
stash.Header = App.Format("FileCM.StashMulti", changes.Count);
|
||||
stash.Click += (o, e) => {
|
||||
Stash.Show(Repo, files);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var patch = new MenuItem();
|
||||
patch.Header = $"Save as patch ...";
|
||||
patch.Header = App.Text("FileCM.SaveAsPatch");
|
||||
patch.Click += (o, e) => {
|
||||
var dialog = new SaveFileDialog();
|
||||
dialog.Filter = "Patch File|*.patch";
|
||||
dialog.Title = "Select file to store patch data.";
|
||||
dialog.Title = App.Text("FileCM.SaveAsPatch");
|
||||
dialog.InitialDirectory = Repo.Path;
|
||||
|
||||
if (dialog.ShowDialog() == true) {
|
||||
|
@ -685,7 +685,7 @@ namespace SourceGit.UI {
|
|||
|
||||
var explore = new MenuItem();
|
||||
explore.IsEnabled = File.Exists(path) || Directory.Exists(path);
|
||||
explore.Header = "Reveal in File Explorer";
|
||||
explore.Header = App.Text("RevealFile");
|
||||
explore.Click += (o, e) => {
|
||||
if (node.IsFile) Process.Start("explorer", $"/select,{path}");
|
||||
else Process.Start(path);
|
||||
|
@ -693,14 +693,14 @@ namespace SourceGit.UI {
|
|||
};
|
||||
|
||||
var unstage = new MenuItem();
|
||||
unstage.Header = "Unstage";
|
||||
unstage.Header = App.Text("FileCM.Unstage");
|
||||
unstage.Click += async (o, e) => {
|
||||
await Task.Run(() => Repo.Unstage(node.FilePath));
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var copyPath = new MenuItem();
|
||||
copyPath.Header = "Copy full path";
|
||||
copyPath.Header = App.Text("CopyPath");
|
||||
copyPath.Click += (o, e) => {
|
||||
Clipboard.SetText(node.FilePath);
|
||||
e.Handled = true;
|
||||
|
@ -720,7 +720,7 @@ namespace SourceGit.UI {
|
|||
foreach (var c in changes) files.Add(c.Path);
|
||||
|
||||
var unstage = new MenuItem();
|
||||
unstage.Header = $"Unstage {changes.Count} files";
|
||||
unstage.Header = App.Format("FileCM.UnstageMulti", files.Count);
|
||||
unstage.Click += async (o, e) => {
|
||||
await Task.Run(() => Repo.Unstage(files.ToArray()));
|
||||
e.Handled = true;
|
||||
|
@ -752,21 +752,21 @@ namespace SourceGit.UI {
|
|||
|
||||
var explore = new MenuItem();
|
||||
explore.IsEnabled = File.Exists(path) || Directory.Exists(path);
|
||||
explore.Header = "Reveal in File Explorer";
|
||||
explore.Header = App.Text("RevealFile");
|
||||
explore.Click += (o, e) => {
|
||||
Process.Start("explorer", $"/select,{path}");
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var unstage = new MenuItem();
|
||||
unstage.Header = "Unstage";
|
||||
unstage.Header = App.Text("FileCM.Unstage");
|
||||
unstage.Click += async (o, e) => {
|
||||
await Task.Run(() => Repo.Unstage(change.Path));
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var copyPath = new MenuItem();
|
||||
copyPath.Header = "Copy full path";
|
||||
copyPath.Header = App.Text("CopyPath");
|
||||
copyPath.Click += (o, e) => {
|
||||
Clipboard.SetText(change.Path);
|
||||
e.Handled = true;
|
||||
|
@ -784,7 +784,7 @@ namespace SourceGit.UI {
|
|||
foreach (var one in selected) files.Add((one as Git.Change).Path);
|
||||
|
||||
var unstage = new MenuItem();
|
||||
unstage.Header = $"Unstage {selected.Count} files";
|
||||
unstage.Header = App.Format("FileCM.UnstageMulti", files.Count);
|
||||
unstage.Click += async (o, e) => {
|
||||
await Task.Run(() => Repo.Unstage(files.ToArray()));
|
||||
e.Handled = true;
|
||||
|
@ -862,12 +862,12 @@ namespace SourceGit.UI {
|
|||
|
||||
if (Repo.CommitMsgRecords.Count == 0) {
|
||||
var tip = new MenuItem();
|
||||
tip.Header = "NO RECENT INPUT MESSAGES";
|
||||
tip.Header = App.Text("WorkingCopy.NoCommitHistories");
|
||||
tip.IsEnabled = false;
|
||||
anchor.ContextMenu.Items.Add(tip);
|
||||
} else {
|
||||
var tip = new MenuItem();
|
||||
tip.Header = "RECENT INPUT MESSAGES";
|
||||
tip.Header = App.Text("WorkingCopy.HasCommitHistories");
|
||||
tip.IsEnabled = false;
|
||||
anchor.ContextMenu.Items.Add(tip);
|
||||
anchor.ContextMenu.Items.Add(new Separator());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue