feature<*>: add translation for Simplified Chinese

This commit is contained in:
leo 2021-01-14 16:31:03 +08:00
parent 2054df31b9
commit 5418ccac9e
70 changed files with 1492 additions and 554 deletions

View file

@ -49,6 +49,10 @@ namespace SourceGit {
/// </summary>
public bool UseLightTheme { get; set; }
/// <summary>
/// Locale
/// </summary>
public string Locale { get; set; } = "en_US";
/// <summary>
/// Main window width
/// </summary>
public double WindowWidth { get; set; }

View file

@ -9,6 +9,7 @@
<ResourceDictionary Source="pack://application:,,,/Resources/Icons.xaml"/>
<ResourceDictionary Source="pack://application:,,,/Resources/Controls.xaml"/>
<ResourceDictionary Source="pack://application:,,,/Resources/Themes/Dark.xaml"/>
<ResourceDictionary Source="pack://application:,,,/Resources/Locales/en_US.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

View file

@ -30,6 +30,25 @@ namespace SourceGit {
}
}
/// <summary>
/// Load text from locales.
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public static string Text(string key) {
return Current.FindResource("Text." + key) as string;
}
/// <summary>
/// Format text
/// </summary>
/// <param name="key"></param>
/// <param name="args"></param>
/// <returns></returns>
public static string Format(string key, params object[] args) {
return string.Format(Text(key), args);
}
/// <summary>
/// Raise error message.
/// </summary>
@ -109,6 +128,16 @@ namespace SourceGit {
}
}
// Apply locales
if (Setting.UI.Locale != "en_US") {
foreach (var rs in Current.Resources.MergedDictionaries) {
if (rs.Source != null && rs.Source.OriginalString.StartsWith("pack://application:,,,/Resources/Locales/")) {
rs.Source = new Uri($"pack://application:,,,/Resources/Locales/{Setting.UI.Locale}.xaml", UriKind.Absolute);
break;
}
}
}
// Show main window
MainWindow = new UI.Launcher();
MainWindow.Show();

View file

@ -261,7 +261,7 @@ namespace SourceGit.Git {
var checkGitDir = new DirectoryInfo(GitDir);
if (!checkGitDir.Exists) {
App.RaiseError("GIT_DIR for this repository NOT FOUND!");
App.RaiseError(App.Text("GitDirNotFound"));
return;
} else {
GitDir = checkGitDir.FullName;
@ -1110,7 +1110,7 @@ namespace SourceGit.Git {
releasePrefix = GetConfig("gitflow.prefix.release");
hotfixPrefix = GetConfig("gitflow.prefix.hotfix");
if (!IsGitFlowEnabled()) App.RaiseError("Initialize Git-flow failed!");
if (!IsGitFlowEnabled()) App.RaiseError(App.Text("InitGitFlowFailed"));
if (refreshBranches) {
Branches(true);
@ -1136,7 +1136,7 @@ namespace SourceGit.Git {
case Branch.Type.Release: args = $"flow release start {name}"; break;
case Branch.Type.Hotfix: args = $"flow hotfix start {name}"; break;
default:
App.RaiseError("Bad git-flow branch type!");
App.RaiseError(App.Text("BadGitFlowType"));
return;
}
@ -1165,7 +1165,7 @@ namespace SourceGit.Git {
args = $"flow hotfix finish {hotfixName} -m \"Hotfix done\"";
break;
default:
App.RaiseError("Bad git-flow branch type!");
App.RaiseError(App.Text("BadGitFlowType"));
return;
}

View file

@ -10,7 +10,7 @@ namespace SourceGit.Helpers {
/// </summary>
public class CloneFolderRule : ValidationRule {
public override ValidationResult Validate(object value, CultureInfo cultureInfo) {
var badPath = "EXISTS and FULL ACCESS CONTROL needed";
var badPath = App.Text("BadCloneFolder");
var path = value as string;
return Directory.Exists(path) ? ValidationResult.ValidResult : new ValidationResult(false, badPath);
}
@ -21,7 +21,7 @@ namespace SourceGit.Helpers {
/// </summary>
public class RemoteUriRule : ValidationRule {
public override ValidationResult Validate(object value, CultureInfo cultureInfo) {
var badUrl = "Remote git URL not supported";
var badUrl = App.Text("BadRemoteUri");
return Git.Repository.IsValidUrl(value as string) ? ValidationResult.ValidResult : new ValidationResult(false, badUrl);
}
}
@ -38,13 +38,13 @@ namespace SourceGit.Helpers {
var name = value as string;
var remotes = Repo.Remotes();
if (string.IsNullOrEmpty(name)) return new ValidationResult(false, "Remote name can NOT be null");
if (!regex.IsMatch(name)) return new ValidationResult(false, $"Bad name for remote. Regex: ^[\\w\\-\\.]+$");
if (string.IsNullOrEmpty(name)) return new ValidationResult(false, App.Text("EmptyRemoteName"));
if (!regex.IsMatch(name)) return new ValidationResult(false, App.Text("BadRemoteName"));
if (Old == null || name != Old.Name) {
foreach (var t in remotes) {
if (t.Name == name) {
return new ValidationResult(false, $"Remote '{name}' already exists");
return new ValidationResult(false, App.Text("DuplicatedRemoteName"));
}
}
}
@ -65,14 +65,14 @@ namespace SourceGit.Helpers {
var name = value as string;
var branches = Repo.Branches();
if (string.IsNullOrEmpty(name)) return new ValidationResult(false, "Branch name can NOT be null");
if (!regex.IsMatch(name)) return new ValidationResult(false, $"Bad name for branch. Regex: ^[\\w\\-/\\.]+$");
if (string.IsNullOrEmpty(name)) return new ValidationResult(false, App.Text("EmptyBranchName"));
if (!regex.IsMatch(name)) return new ValidationResult(false, App.Text("BadBranchName"));
name = Prefix + name;
foreach (var b in branches) {
if (b.Name == name) {
return new ValidationResult(false, $"Branch '{name}' already exists");
return new ValidationResult(false, App.Text("DuplicatedBranchName"));
}
}
@ -91,12 +91,12 @@ namespace SourceGit.Helpers {
var name = value as string;
var tags = Repo.Tags();
if (string.IsNullOrEmpty(name)) return new ValidationResult(false, "Tag name can NOT be null");
if (!regex.IsMatch(name)) return new ValidationResult(false, $"Bad name for tag. Regex: ^[\\w\\-\\.]+$");
if (string.IsNullOrEmpty(name)) return new ValidationResult(false, App.Text("EmptyTagName"));
if (!regex.IsMatch(name)) return new ValidationResult(false, App.Text("BadTagName"));
foreach (var t in tags) {
if (t.Name == name) {
return new ValidationResult(false, $"Tag '{name}' already exists");
return new ValidationResult(false, App.Text("DuplicatedTagName"));
}
}
@ -110,7 +110,7 @@ namespace SourceGit.Helpers {
public class CommitSubjectRequiredRule : ValidationRule {
public override ValidationResult Validate(object value, CultureInfo cultureInfo) {
var subject = value as string;
return string.IsNullOrWhiteSpace(subject) ? new ValidationResult(false, "Commit subject can NOT be empty") : ValidationResult.ValidResult;
return string.IsNullOrWhiteSpace(subject) ? new ValidationResult(false, App.Text("EmptyCommitMessage")) : ValidationResult.ValidResult;
}
}
@ -121,7 +121,7 @@ namespace SourceGit.Helpers {
public override ValidationResult Validate(object value, CultureInfo cultureInfo) {
var path = value as string;
var succ = !string.IsNullOrEmpty(path) && File.Exists(path);
return !succ ? new ValidationResult(false, "Invalid path for patch file") : ValidationResult.ValidResult;
return !succ ? new ValidationResult(false, App.Text("BadPatchFile")) : ValidationResult.ValidResult;
}
}
@ -133,7 +133,7 @@ namespace SourceGit.Helpers {
var regex = new Regex(@"^[\w\-\._/]+$");
var path = value as string;
var succ = !string.IsNullOrEmpty(path) && regex.IsMatch(path.Trim());
return !succ ? new ValidationResult(false, "Invalid path for submodules") : ValidationResult.ValidResult;
return !succ ? new ValidationResult(false, App.Text("BadSubmodulePath")) : ValidationResult.ValidResult;
}
}
}

View file

@ -0,0 +1,432 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<sys:String x:Key="Text.Start">START</sys:String>
<sys:String x:Key="Text.Sure">SURE</sys:String>
<sys:String x:Key="Text.Save">SAVE</sys:String>
<sys:String x:Key="Text.Close">CLOSE</sys:String>
<sys:String x:Key="Text.Cancel">CANCEL</sys:String>
<sys:String x:Key="Text.Goto">CLICK TO GO</sys:String>
<sys:String x:Key="Text.RevealFile">Reveal in File Explorer</sys:String>
<sys:String x:Key="Text.SaveAs">Save As ...</sys:String>
<sys:String x:Key="Text.SaveFileTo">Save File to ...</sys:String>
<sys:String x:Key="Text.CopyPath">Copy Path</sys:String>
<sys:String x:Key="Text.Bytes">{0} Bytes</sys:String>
<sys:String x:Key="Text.Filter">FILTER</sys:String>
<sys:String x:Key="Text.Optional">Optional.</sys:String>
<sys:String x:Key="Text.URL">URL :</sys:String>
<sys:String x:Key="Text.RepositoryURL">Git Repository URL</sys:String>
<sys:String x:Key="Text.ParentFolder">Parent Folder :</sys:String>
<sys:String x:Key="Text.ParentFolder.Placeholder">Relative foler to store this module. Optional.</sys:String>
<sys:String x:Key="Text.About">ABOUT</sys:String>
<sys:String x:Key="Text.About.Title">SourceGit - OPEN SOURCE GIT CLIENT</sys:String>
<sys:String x:Key="Text.Apply">Apply</sys:String>
<sys:String x:Key="Text.Apply.Title">Apply Patch</sys:String>
<sys:String x:Key="Text.Apply.File">Patch File :</sys:String>
<sys:String x:Key="Text.Apply.File.Placeholder">Select .patch file to apply</sys:String>
<sys:String x:Key="Text.Apply.WS">Whitespace :</sys:String>
<sys:String x:Key="Text.Apply.IgnoreWS">Ignore whitespace changes</sys:String>
<sys:String x:Key="Text.Apply.NoWarn">No Warn</sys:String>
<sys:String x:Key="Text.Apply.NoWarn.Desc">Turns off the trailing whitespace warning</sys:String>
<sys:String x:Key="Text.Apply.Warn">Warn</sys:String>
<sys:String x:Key="Text.Apply.Warn.Desc">Outputs warnings for a few such errors, but applies</sys:String>
<sys:String x:Key="Text.Apply.Error">Error</sys:String>
<sys:String x:Key="Text.Apply.Error.Desc">Raise errors and refuses to apply the patch</sys:String>
<sys:String x:Key="Text.Apply.ErrorAll">Error All</sys:String>
<sys:String x:Key="Text.Apply.ErrorAll.Desc">Similar to 'error', but shows more</sys:String>
<sys:String x:Key="Text.Blame">Blame</sys:String>
<sys:String x:Key="Text.Blame.Title">SOURCEGIT - BLAME</sys:String>
<sys:String x:Key="Text.Blame.Tip">Use right mouse button to view commit information.</sys:String>
<sys:String x:Key="Text.Blame.SHA">COMMIT SHA</sys:String>
<sys:String x:Key="Text.Blame.Author">AUTHOR</sys:String>
<sys:String x:Key="Text.Blame.ModifyTime">MODIFY TIME</sys:String>
<sys:String x:Key="Text.Submodule">SUBMODULES</sys:String>
<sys:String x:Key="Text.Submodule.Add">Add Submodule</sys:String>
<sys:String x:Key="Text.Submodule.FetchNested">Fetch nested submodules</sys:String>
<sys:String x:Key="Text.Submodule.Open">Open Submodule Repository</sys:String>
<sys:String x:Key="Text.Submodule.CopyPath">Copy Relative Path</sys:String>
<sys:String x:Key="Text.CherryPick">Cherry-Pick This Commit</sys:String>
<sys:String x:Key="Text.CherryPick.Title">Cherry Pick</sys:String>
<sys:String x:Key="Text.CherryPick.Commit">Commit :</sys:String>
<sys:String x:Key="Text.CherryPick.CommitChanges">Commit all changes</sys:String>
<sys:String x:Key="Text.Clone">Clone Remote Repository</sys:String>
<sys:String x:Key="Text.Clone.RemoteURL">Repository URL :</sys:String>
<sys:String x:Key="Text.Clone.RemoteURL.Placeholder">Git Repository URL</sys:String>
<sys:String x:Key="Text.Clone.RemoteFolder">Parent Folder :</sys:String>
<sys:String x:Key="Text.Clone.RemoteFolder.Placeholder">Folder to contain this repository</sys:String>
<sys:String x:Key="Text.Clone.LocalName">Local Name :</sys:String>
<sys:String x:Key="Text.Clone.LocalName.Placeholder">Repository name. Optional.</sys:String>
<sys:String x:Key="Text.Clone.RemoteName">Remote Name :</sys:String>
<sys:String x:Key="Text.Clone.RemoteName.Placeholder">Remote name. Optional.</sys:String>
<sys:String x:Key="Text.CommitViewer.Info">INFORMATION</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.Author">AUTHOR</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.Committer">COMMITTER</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.SHA">SHA</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.Parents">PARENTS</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.Refs">REFS</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.Message">MESSAGE</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.Changed">CHANGED</sys:String>
<sys:String x:Key="Text.CommitViewer.Changes">CHANGES</sys:String>
<sys:String x:Key="Text.CommitViewer.Changes.Search">Search Files ...</sys:String>
<sys:String x:Key="Text.CommitViewer.Changes.SwitchMode">SWITCH TO LIST/TREE VIEW</sys:String>
<sys:String x:Key="Text.CommitViewer.Files">FILES</sys:String>
<sys:String x:Key="Text.Configure">Configure</sys:String>
<sys:String x:Key="Text.Configure.Credential">CREDENTIAL</sys:String>
<sys:String x:Key="Text.Configure.User">User :</sys:String>
<sys:String x:Key="Text.Configure.User.Placeholder">User name for this repository</sys:String>
<sys:String x:Key="Text.Configure.Email">Email :</sys:String>
<sys:String x:Key="Text.Configure.Email.Placeholder">Email address</sys:String>
<sys:String x:Key="Text.Configure.CommitTemplate">COMMIT TEMPLATE</sys:String>
<sys:String x:Key="Text.Configure.Template">Template :</sys:String>
<sys:String x:Key="Text.CreateBranch">Create Branch</sys:String>
<sys:String x:Key="Text.CreateBranch.Title">Create Local Branch</sys:String>
<sys:String x:Key="Text.CreateBranch.BasedOn">Based On :</sys:String>
<sys:String x:Key="Text.CreateBranch.Name">New Branch Name :</sys:String>
<sys:String x:Key="Text.CreateBranch.Name.Placeholder">Enter branch name.</sys:String>
<sys:String x:Key="Text.CreateBranch.LocalChanges">Local Changes :</sys:String>
<sys:String x:Key="Text.CreateBranch.LocalChanges.StashAndReply">Stash &amp; Reapply</sys:String>
<sys:String x:Key="Text.CreateBranch.LocalChanges.Discard">Discard</sys:String>
<sys:String x:Key="Text.CreateBranch.Checkout">Check out after created</sys:String>
<sys:String x:Key="Text.CreateTag">Create Tag</sys:String>
<sys:String x:Key="Text.CreateTag.BasedOn">New Tag At :</sys:String>
<sys:String x:Key="Text.CreateTag.Name">Tag Name :</sys:String>
<sys:String x:Key="Text.CreateTag.Name.Placeholder">Recommanded format v1.0.0-alpha</sys:String>
<sys:String x:Key="Text.CreateTag.Message">Tag Message :</sys:String>
<sys:String x:Key="Text.CreateTag.Message.Placeholder">Optional.</sys:String>
<sys:String x:Key="Text.Dashboard.Explore">Explore</sys:String>
<sys:String x:Key="Text.Dashboard.Explore.Tip">Open In File Browser</sys:String>
<sys:String x:Key="Text.Dashboard.Terminal">Terminal</sys:String>
<sys:String x:Key="Text.Dashboard.Terminal.Tip">Open Git Bash</sys:String>
<sys:String x:Key="Text.Dashboard.Search">Search</sys:String>
<sys:String x:Key="Text.Dashboard.Search.Tip">Search Commit</sys:String>
<sys:String x:Key="Text.Dashboard.Configure.Tip">Configure this repository</sys:String>
<sys:String x:Key="Text.Dashboard.Workspace">WORKSPACE</sys:String>
<sys:String x:Key="Text.Dashboard.LocalBranches">LOCAL BRANCHES</sys:String>
<sys:String x:Key="Text.Dashboard.NewBranch">NEW BRANCH</sys:String>
<sys:String x:Key="Text.Dashboard.Remotes">REMOTES</sys:String>
<sys:String x:Key="Text.Dashboard.Remotes.Add">ADD REMOTE</sys:String>
<sys:String x:Key="Text.Dashboard.Tags">TAGS</sys:String>
<sys:String x:Key="Text.Dashboard.Tags.Add">NEW TAG</sys:String>
<sys:String x:Key="Text.Dashboard.Submodules">SUBMODULES</sys:String>
<sys:String x:Key="Text.Dashboard.Submodules.Add">ADD SUBMODULE</sys:String>
<sys:String x:Key="Text.Dashboard.Submodules.Update">UPDATE SUBMODULE</sys:String>
<sys:String x:Key="Text.Dashboard.Resolve">RESOLVE</sys:String>
<sys:String x:Key="Text.Dashboard.Continue">CONTINUE</sys:String>
<sys:String x:Key="Text.Dashboard.Abort">ABORT</sys:String>
<sys:String x:Key="Text.GitFlow">GIT FLOW</sys:String>
<sys:String x:Key="Text.GitFlow.Init">Initialize Git-Flow</sys:String>
<sys:String x:Key="Text.GitFlow.ProductionBranch">Production Branch :</sys:String>
<sys:String x:Key="Text.GitFlow.DevelopBranch">Development Branch :</sys:String>
<sys:String x:Key="Text.GitFlow.Feature">Feature :</sys:String>
<sys:String x:Key="Text.GitFlow.Release">Release :</sys:String>
<sys:String x:Key="Text.GitFlow.Hotfix">Hotfix :</sys:String>
<sys:String x:Key="Text.GitFlow.FeaturePrefix">Feature Prefix :</sys:String>
<sys:String x:Key="Text.GitFlow.ReleasePrefix">Release Prefix :</sys:String>
<sys:String x:Key="Text.GitFlow.HotfixPrefix">Hotfix Prefix :</sys:String>
<sys:String x:Key="Text.GitFlow.TagPrefix">Version Tag Prefix :</sys:String>
<sys:String x:Key="Text.GitFlow.StartFeature">Start Feature ...</sys:String>
<sys:String x:Key="Text.GitFlow.StartRelease">Start Release ...</sys:String>
<sys:String x:Key="Text.GitFlow.StartHotfix">Start Hotfix ...</sys:String>
<sys:String x:Key="Text.GitFlow.StartFeatureTitle">GIT FLOW - Start Feature</sys:String>
<sys:String x:Key="Text.GitFlow.StartReleaseTitle">GIT FLOW - Start Release</sys:String>
<sys:String x:Key="Text.GitFlow.StartHotfixTitle">GIT FLOW - Start Hotfix</sys:String>
<sys:String x:Key="Text.GitFlow.StartPlaceholder">Enter name</sys:String>
<sys:String x:Key="Text.GitFlow.FinishFeature">GIT FLOW - Finish Feature</sys:String>
<sys:String x:Key="Text.GitFlow.FinishRelease">GIT FLOW - Finish Release</sys:String>
<sys:String x:Key="Text.GitFlow.FinishHotfix">GIT FLOW - Finish Hotfix</sys:String>
<sys:String x:Key="Text.GitFlow.BranchRequired">{0} branch name is required.</sys:String>
<sys:String x:Key="Text.GitFlow.BranchInvalid">{0} branch name contains invalid characters.</sys:String>
<sys:String x:Key="Text.GitFlow.PrefixRequired">{0} prefix is required.</sys:String>
<sys:String x:Key="Text.GitFlow.PrefixInvalid">{0} contains invalid characters.</sys:String>
<sys:String x:Key="Text.GitFlow.DevSameAsProd">Development branch is same with production!</sys:String>
<sys:String x:Key="Text.RepoCM.Refresh">Refresh</sys:String>
<sys:String x:Key="Text.RepoCM.Bookmark">Bookmark</sys:String>
<sys:String x:Key="Text.RepoCM.CopyPath">CopyPath</sys:String>
<sys:String x:Key="Text.RepoCM.Open">Open</sys:String>
<sys:String x:Key="Text.RepoCM.Explore">Open Container Folder</sys:String>
<sys:String x:Key="Text.BranchCM.Push">Push '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.DiscardAll">Discard all changes</sys:String>
<sys:String x:Key="Text.BranchCM.FastForward">Fast-Forward to '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.Pull">Pull '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.PullInto">Pull '{0}' into '{1}'</sys:String>
<sys:String x:Key="Text.BranchCM.Checkout">Checkout '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.Merge">Merge '{0}' into '{1}'</sys:String>
<sys:String x:Key="Text.BranchCM.Rebase">Rebase '{0}' on '{1}'</sys:String>
<sys:String x:Key="Text.BranchCM.Finish">Git Flow - Finish '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.Rename">Rename '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.Delete">Delete '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.Tracking">Tracking ...</sys:String>
<sys:String x:Key="Text.BranchCM.CopyName">Copy Branch Name</sys:String>
<sys:String x:Key="Text.RemoteCM.Fetch">Fetch '{0}'</sys:String>
<sys:String x:Key="Text.RemoteCM.Edit">Edit '{0}'</sys:String>
<sys:String x:Key="Text.RemoteCM.Delete">Delete '{0}'</sys:String>
<sys:String x:Key="Text.RemoteCM.CopyURL">Copy Remote URL</sys:String>
<sys:String x:Key="Text.CommitCM.Reset">Reset '{0}' to Here</sys:String>
<sys:String x:Key="Text.CommitCM.InteractiveRebase">Interactive Rebase '{0}' from Here</sys:String>
<sys:String x:Key="Text.CommitCM.Rebase">Rebase '{0}' to Here</sys:String>
<sys:String x:Key="Text.CommitCM.CherryPick">Cherry-Pick This Commit</sys:String>
<sys:String x:Key="Text.CommitCM.Revert">Revert Commit</sys:String>
<sys:String x:Key="Text.CommitCM.SaveAsPatch">Save as Patch</sys:String>
<sys:String x:Key="Text.CommitCM.CopySHA">Copy Commit SHA</sys:String>
<sys:String x:Key="Text.CommitCM.CopyInfo">Copy Commit Info</sys:String>
<sys:String x:Key="Text.TagCM.Push">Push '{0}'</sys:String>
<sys:String x:Key="Text.TagCM.Delete">Delete '{0}'</sys:String>
<sys:String x:Key="Text.TagCM.Copy">Copy Tag Name</sys:String>
<sys:String x:Key="Text.StashCM.Apply">Apply</sys:String>
<sys:String x:Key="Text.StashCM.Pop">Pop</sys:String>
<sys:String x:Key="Text.StashCM.Drop">Drop</sys:String>
<sys:String x:Key="Text.FileCM.Unstage">Unstage</sys:String>
<sys:String x:Key="Text.FileCM.Stage">Stage...</sys:String>
<sys:String x:Key="Text.FileCM.Discard">Discard...</sys:String>
<sys:String x:Key="Text.FileCM.Stash">Stash...</sys:String>
<sys:String x:Key="Text.FileCM.UnstageMulti">Unstage {0} files</sys:String>
<sys:String x:Key="Text.FileCM.StageMulti">Stage {0} files...</sys:String>
<sys:String x:Key="Text.FileCM.DiscardMulti">Discard {0} files...</sys:String>
<sys:String x:Key="Text.FileCM.StashMulti">Stash {0} files...</sys:String>
<sys:String x:Key="Text.FileCM.SaveAsPatch">Save As Patch...</sys:String>
<sys:String x:Key="Text.DeleteBranch">Confirm To Delete Branch</sys:String>
<sys:String x:Key="Text.DeleteBranch.Branch">Branch :</sys:String>
<sys:String x:Key="Text.DeleteRemote">Confirm To Delete Remote</sys:String>
<sys:String x:Key="Text.DeleteRemote.Remote">Remote :</sys:String>
<sys:String x:Key="Text.DeleteTag">Confirm To Delete Tag</sys:String>
<sys:String x:Key="Text.DeleteTag.Tag">Tag :</sys:String>
<sys:String x:Key="Text.DeleteTag.WithRemote">Delete from remote repositories</sys:String>
<sys:String x:Key="Text.Diff.Next">Next Difference</sys:String>
<sys:String x:Key="Text.Diff.Prev">Previous Difference</sys:String>
<sys:String x:Key="Text.Diff.Mode">Toggle One-Side/Two-Sides</sys:String>
<sys:String x:Key="Text.Diff.Welcome">SELECT FILE TO VIEW CHANGES</sys:String>
<sys:String x:Key="Text.Diff.NoChange">NO CHANGES OR ONLY EOL CHANGES</sys:String>
<sys:String x:Key="Text.Diff.Binary">BINARY DIFF</sys:String>
<sys:String x:Key="Text.Diff.Binary.Old">OLD :</sys:String>
<sys:String x:Key="Text.Diff.Binary.New">New :</sys:String>
<sys:String x:Key="Text.Diff.LFS">LFS OBJECT CHANGE</sys:String>
<sys:String x:Key="Text.Diff.Copy">Copy Selected Lines</sys:String>
<sys:String x:Key="Text.Discard">Confirm To Discard Changes</sys:String>
<sys:String x:Key="Text.Discard.Changes">Changes :</sys:String>
<sys:String x:Key="Text.Discard.Warning">You can't undo this action!!!</sys:String>
<sys:String x:Key="Text.Discard.All">All local changes in working copy.</sys:String>
<sys:String x:Key="Text.Discard.Total">Total {0} changes will be discard</sys:String>
<sys:String x:Key="Text.Fetch">Fetch</sys:String>
<sys:String x:Key="Text.Fetch.Title">Fetch Remote Changes</sys:String>
<sys:String x:Key="Text.Fetch.Remote">Remote :</sys:String>
<sys:String x:Key="Text.Fetch.AllRemotes">Fetch all remotes</sys:String>
<sys:String x:Key="Text.Fetch.Prune">Prune remote dead branches</sys:String>
<sys:String x:Key="Text.FileHistory">File History</sys:String>
<sys:String x:Key="Text.FileDisplayMode">CHANGE FILES DISPLAY MODE</sys:String>
<sys:String x:Key="Text.FileDisplayMode.Grid">Show as Grid</sys:String>
<sys:String x:Key="Text.FileDisplayMode.List">Show as List</sys:String>
<sys:String x:Key="Text.FileDisplayMode.Tree">Show as Tree</sys:String>
<sys:String x:Key="Text.FolderDialog">SELECT FOLDER</sys:String>
<sys:String x:Key="Text.FolderDialog.Selected">SELECTED :</sys:String>
<sys:String x:Key="Text.Histories">Histories</sys:String>
<sys:String x:Key="Text.Histories.Search">SEARCH SHA/SUBJECT/AUTHOR. PRESS ENTER TO SEARCH, ESC TO QUIT</sys:String>
<sys:String x:Key="Text.Histories.SearchClear">CLEAR</sys:String>
<sys:String x:Key="Text.Histories.DisplayMode">Toggle Horizontal/Vertical Layout</sys:String>
<sys:String x:Key="Text.Histories.Selected">SELECTED {0} COMMITS</sys:String>
<sys:String x:Key="Text.Histories.Guide">HISTORIES GUIDE</sys:String>
<sys:String x:Key="Text.Histories.Guide_1">1. Select single commit to view detail</sys:String>
<sys:String x:Key="Text.Histories.Guide_2">2. Select two commits to show differences</sys:String>
<sys:String x:Key="Text.Histories.Guide_3">3. Select more than 2 commits to count</sys:String>
<sys:String x:Key="Text.Histories.Guide_4">4. Try to open context menu with selected commit</sys:String>
<sys:String x:Key="Text.Init">Initialize Repository</sys:String>
<sys:String x:Key="Text.Init.Path">Path :</sys:String>
<sys:String x:Key="Text.Init.Tip">Invalid repository detected. Run `git init` under this path?</sys:String>
<sys:String x:Key="Text.InteractiveRebase">SOURCEGIT - INTERACTIVE REBASE</sys:String>
<sys:String x:Key="Text.InteractiveRebase.Target">Rebase :</sys:String>
<sys:String x:Key="Text.InteractiveRebase.On">On :</sys:String>
<sys:String x:Key="Text.InteractiveRebase.Start">REBASE</sys:String>
<sys:String x:Key="Text.InteractiveRebase.MoveUp">MOVE UP</sys:String>
<sys:String x:Key="Text.InteractiveRebase.MoveDown">MOVE DOWN</sys:String>
<sys:String x:Key="Text.Launcher">Source Git</sys:String>
<sys:String x:Key="Text.Launcher.NewPageButton">NEW PAGE</sys:String>
<sys:String x:Key="Text.Launcher.Preference">PREFERENCE</sys:String>
<sys:String x:Key="Text.Launcher.About">ABOUT</sys:String>
<sys:String x:Key="Text.Launcher.Error">ERROR</sys:String>
<sys:String x:Key="Text.Launcher.NewPage">New Page</sys:String>
<sys:String x:Key="Text.Launcher.NewPageTip">Welcome Page</sys:String>
<sys:String x:Key="Text.Merge">Merge Branch</sys:String>
<sys:String x:Key="Text.Merge.Source">Source Branch :</sys:String>
<sys:String x:Key="Text.Merge.Into">Into :</sys:String>
<sys:String x:Key="Text.Merge.Mode">Merge Option :</sys:String>
<sys:String x:Key="Text.NewPage.Title">Welcome to SourceGit :)</sys:String>
<sys:String x:Key="Text.NewPage.OpenOrInit">Open Local Repository</sys:String>
<sys:String x:Key="Text.NewPage.Clone">Clone Remote Repository</sys:String>
<sys:String x:Key="Text.NewPage.Repositories">REPOSITORIES</sys:String>
<sys:String x:Key="Text.NewPage.DragDrop">DRAG-DROP YOUR FOLDER</sys:String>
<sys:String x:Key="Text.NewPage.OpenOrInitDialog">Open or init local repository</sys:String>
<sys:String x:Key="Text.NewPage.NewFolder">Add Folder</sys:String>
<sys:String x:Key="Text.NewPage.NewSubFolder">Add Sub-Folder</sys:String>
<sys:String x:Key="Text.NewPage.Rename">Rename</sys:String>
<sys:String x:Key="Text.NewPage.Delete">Delete</sys:String>
<sys:String x:Key="Text.Pull">Pull</sys:String>
<sys:String x:Key="Text.Pull.Title">Pull (Fetch &amp; Merge)</sys:String>
<sys:String x:Key="Text.Pull.Remote">Remote :</sys:String>
<sys:String x:Key="Text.Pull.Branch">Branch :</sys:String>
<sys:String x:Key="Text.Pull.Into">Into :</sys:String>
<sys:String x:Key="Text.Pull.UseRebase">Use rebase instead of merge</sys:String>
<sys:String x:Key="Text.Pull.AutoStash">Stash &amp; reapply local changes</sys:String>
<sys:String x:Key="Text.Push">Push</sys:String>
<sys:String x:Key="Text.Push.Title">Push Changes To Remote</sys:String>
<sys:String x:Key="Text.Push.Local">Local Branch :</sys:String>
<sys:String x:Key="Text.Push.Remote">Remote :</sys:String>
<sys:String x:Key="Text.Push.To">To :</sys:String>
<sys:String x:Key="Text.Push.WithAllTags">Push all tags</sys:String>
<sys:String x:Key="Text.Push.Force">Force push</sys:String>
<sys:String x:Key="Text.PushTag">Push Tag To Remote</sys:String>
<sys:String x:Key="Text.PushTag.Tag">Tag :</sys:String>
<sys:String x:Key="Text.PushTag.Remote">Remote :</sys:String>
<sys:String x:Key="Text.Rebase">Rebase Current Branch</sys:String>
<sys:String x:Key="Text.Rebase.Target">Rebase :</sys:String>
<sys:String x:Key="Text.Rebase.On">On :</sys:String>
<sys:String x:Key="Text.Rebase.AutoStash">Stash &amp; reapply local changes</sys:String>
<sys:String x:Key="Text.Remote.AddTitle">Add Remote</sys:String>
<sys:String x:Key="Text.Remote.EditTitle">Edit Remote</sys:String>
<sys:String x:Key="Text.Remote.Name">Name :</sys:String>
<sys:String x:Key="Text.Remote.Name.Placeholder">Remote name</sys:String>
<sys:String x:Key="Text.Remote.URL">Repository URL :</sys:String>
<sys:String x:Key="Text.Remote.URL.Placeholder">Remote git repository URL</sys:String>
<sys:String x:Key="Text.RenameBranch">Rename Branch</sys:String>
<sys:String x:Key="Text.RenameBranch.Target">Branch :</sys:String>
<sys:String x:Key="Text.RenameBranch.Name">New Name :</sys:String>
<sys:String x:Key="Text.RenameBranch.Name.Placeholder">Unique name for this branch</sys:String>
<sys:String x:Key="Text.Reset">Reset Current Branch To Revision</sys:String>
<sys:String x:Key="Text.Reset.Target">Current Branch :</sys:String>
<sys:String x:Key="Text.Reset.MoveTo">Move To :</sys:String>
<sys:String x:Key="Text.Reset.Mode">Reset Mode :</sys:String>
<sys:String x:Key="Text.Revert">Confirm To Revert Commit</sys:String>
<sys:String x:Key="Text.Revert.Commit">Commit :</sys:String>
<sys:String x:Key="Text.Revert.CommitChanges">Commit revert changes</sys:String>
<sys:String x:Key="Text.Preference">Preference</sys:String>
<sys:String x:Key="Text.Preference.General">GENERAL SETTING</sys:String>
<sys:String x:Key="Text.Preference.RestartRequired">RESTART REQUIRED</sys:String>
<sys:String x:Key="Text.Preference.Locale">Display Language :</sys:String>
<sys:String x:Key="Text.Preference.UseLight">Light Theme :</sys:String>
<sys:String x:Key="Text.Preference.CheckUpdate">Check for Update :</sys:String>
<sys:String x:Key="Text.Preference.Git">GIT INSTANCE</sys:String>
<sys:String x:Key="Text.Preference.Git.Path">Install Path :</sys:String>
<sys:String x:Key="Text.Preference.Git.Path.Placeholder">Input path for git.exe</sys:String>
<sys:String x:Key="Text.Preference.Git.Dir">Default Clone Dir :</sys:String>
<sys:String x:Key="Text.Preference.Git.Dir.Placeholder">Default path to clone repo into</sys:String>
<sys:String x:Key="Text.Preference.Global">GLOBAL SETTING</sys:String>
<sys:String x:Key="Text.Preference.User">Name :</sys:String>
<sys:String x:Key="Text.Preference.Email">Email :</sys:String>
<sys:String x:Key="Text.Preference.CRLF">Auto CRLF</sys:String>
<sys:String x:Key="Text.Preference.Merger">MERGE TOOL</sys:String>
<sys:String x:Key="Text.Preference.Merger.Type">Merger :</sys:String>
<sys:String x:Key="Text.Preference.Merger.Path">Install Path :</sys:String>
<sys:String x:Key="Text.Preference.Merger.Path.Placeholder">Input path for merge tool</sys:String>
<sys:String x:Key="Text.Preference.Merger.Cmd">Command :</sys:String>
<sys:String x:Key="Text.Preference.Dialog.GitExe">Select Git Executable File</sys:String>
<sys:String x:Key="Text.Preference.Dialog.GitDir">Select default clone path</sys:String>
<sys:String x:Key="Text.Preference.Dialog.Merger">Select {0} Install Path</sys:String>
<sys:String x:Key="Text.Stash">Stash</sys:String>
<sys:String x:Key="Text.Stash.Title">Stash Local Changes</sys:String>
<sys:String x:Key="Text.Stash.Message">Message :</sys:String>
<sys:String x:Key="Text.Stash.Message.Placeholder">Optional. Name of this stash</sys:String>
<sys:String x:Key="Text.Stash.IncludeUntracked">Include untracked files</sys:String>
<sys:String x:Key="Text.Stashes">Stashes</sys:String>
<sys:String x:Key="Text.Stashes.Stashes">STASHES</sys:String>
<sys:String x:Key="Text.Stashes.Changes">CHANGES</sys:String>
<sys:String x:Key="Text.Stashes.Changes.Tip">Untracked files not shown</sys:String>
<sys:String x:Key="Text.TwoCommitsDiff">COMMIT : {0} -> {1}</sys:String>
<sys:String x:Key="Text.UpdateAvailable">UPDATE AVAILABLE</sys:String>
<sys:String x:Key="Text.UpdateAvailable.Title">{0} is available!</sys:String>
<sys:String x:Key="Text.UpdateAvailable.Time">Publish Time</sys:String>
<sys:String x:Key="Text.UpdateAvailable.Based">Base On Commit</sys:String>
<sys:String x:Key="Text.UpdateAvailable.IsPreRelease">Is Pre-release</sys:String>
<sys:String x:Key="Text.UpdateAvailable.Download" xml:space="preserve">DOWNLOAD</sys:String>
<sys:String x:Key="Text.WorkingCopy">Commit</sys:String>
<sys:String x:Key="Text.WorkingCopy.Unstaged">UNSTAGED</sys:String>
<sys:String x:Key="Text.WorkingCopy.Unstaged.Stage">STAGE</sys:String>
<sys:String x:Key="Text.WorkingCopy.Unstaged.StageAll">STAGE ALL</sys:String>
<sys:String x:Key="Text.WorkingCopy.Staged">STAGED</sys:String>
<sys:String x:Key="Text.WorkingCopy.Staged.Unstage">UNSTAGE</sys:String>
<sys:String x:Key="Text.WorkingCopy.Staged.UnstageAll">UNSTAGE ALL</sys:String>
<sys:String x:Key="Text.WorkingCopy.Conflicts">CONFLICTS DETECTED</sys:String>
<sys:String x:Key="Text.WorkingCopy.UseTheirs">USE THEIRS</sys:String>
<sys:String x:Key="Text.WorkingCopy.UseMine">USE MINE</sys:String>
<sys:String x:Key="Text.WorkingCopy.OpenMerger">OPEN MERGE</sys:String>
<sys:String x:Key="Text.WorkingCopy.CommitMessageTip">Enter commit message</sys:String>
<sys:String x:Key="Text.WorkingCopy.MessageHistories">MESSAGE HISTORIES</sys:String>
<sys:String x:Key="Text.WorkingCopy.Amend">Amend</sys:String>
<sys:String x:Key="Text.WorkingCopy.Commit">COMMIT</sys:String>
<sys:String x:Key="Text.WorkingCopy.CommitAndPush">COMMIT &amp; PUSH</sys:String>
<sys:String x:Key="Text.WorkingCopy.NoCommitHistories">NO RECENT INPUT MESSAGES</sys:String>
<sys:String x:Key="Text.WorkingCopy.HasCommitHistories">RECENT INPUT MESSAGES</sys:String>
<sys:String x:Key="Text.Conflict.CherryPick">Cherry-Pick merge request detected! Press 'Abort' to restore original HEAD</sys:String>
<sys:String x:Key="Text.Conflict.Rebase">Rebase merge request detected! Press 'Abort' to restore original HEAD</sys:String>
<sys:String x:Key="Text.Conflict.Revert">Revert merge request detected! Press 'Abort' to restore original HEAD</sys:String>
<sys:String x:Key="Text.Conflict.Merge">Merge request detected! Press 'Abort' to restore original HEAD</sys:String>
<sys:String x:Key="Text.NotConfigured">Git has NOT been configured.\nPlease to go [Preference] and configure it first.</sys:String>
<sys:String x:Key="Text.PathNotFound">Path[{0}] not exists!</sys:String>
<sys:String x:Key="Text.MissingBash">Can NOT locate bash.exe. Make sure bash.exe exists under the same folder with git.exe</sys:String>
<sys:String x:Key="Text.BinaryNotSupported">BINARY FILE BLAME NOT SUPPORTED!!!</sys:String>
<sys:String x:Key="Text.GitDirNotFound">GIT_DIR for this repository NOT FOUND!</sys:String>
<sys:String x:Key="Text.InitGitFlowFailed">Initialize Git-flow failed!</sys:String>
<sys:String x:Key="Text.BadGitFlowType">Bad git-flow branch type!</sys:String>
<sys:String x:Key="Text.BadCloneFolder">EXISTS and FULL ACCESS CONTROL needed</sys:String>
<sys:String x:Key="Text.BadRemoteUri">Remote git URL not supported</sys:String>
<sys:String x:Key="Text.EmptyRemoteName">Remote name can NOT be null</sys:String>
<sys:String x:Key="Text.BadRemoteName">Bad name for remote. Regex: ^[\\w\\-\\.]+$</sys:String>
<sys:String x:Key="Text.DuplicatedRemoteName">Duplicated remote name!</sys:String>
<sys:String x:Key="Text.EmptyBranchName">Branch name can NOT be null</sys:String>
<sys:String x:Key="Text.BadBranchName">Bad name for branch. Regex: ^[\\w\\-/\\.]+$</sys:String>
<sys:String x:Key="Text.DuplicatedBranchName">Duplicated branch name!</sys:String>
<sys:String x:Key="Text.EmptyTagName">Tag name can NOT be null</sys:String>
<sys:String x:Key="Text.BadTagName">Bad name for tag. Regex: ^[\\w\\-\\.]+$</sys:String>
<sys:String x:Key="Text.DuplicatedTagName">Duplicated tag name!</sys:String>
<sys:String x:Key="Text.EmptyCommitMessage">Commit subject can NOT be empty</sys:String>
<sys:String x:Key="Text.BadPatchFile">Invalid path for patch file</sys:String>
<sys:String x:Key="Text.BadSubmodulePath">Invalid path for submodules</sys:String>
</ResourceDictionary>

View file

@ -0,0 +1,432 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<sys:String x:Key="Text.Start" xml:space="preserve">开 始</sys:String>
<sys:String x:Key="Text.Sure" xml:space="preserve">确 定</sys:String>
<sys:String x:Key="Text.Save" xml:space="preserve">保 存</sys:String>
<sys:String x:Key="Text.Close" xml:space="preserve">关 闭</sys:String>
<sys:String x:Key="Text.Cancel" xml:space="preserve">取 消</sys:String>
<sys:String x:Key="Text.Goto">点击前往</sys:String>
<sys:String x:Key="Text.RevealFile">在文件浏览器中查看</sys:String>
<sys:String x:Key="Text.SaveAs">另存为...</sys:String>
<sys:String x:Key="Text.SaveFileTo">另存文件到...</sys:String>
<sys:String x:Key="Text.CopyPath">复制路径</sys:String>
<sys:String x:Key="Text.Bytes">{0} 字节</sys:String>
<sys:String x:Key="Text.Filter">过滤</sys:String>
<sys:String x:Key="Text.Optional">选填</sys:String>
<sys:String x:Key="Text.URL">仓库地址 </sys:String>
<sys:String x:Key="Text.RepositoryURL">远程仓库地址</sys:String>
<sys:String x:Key="Text.ParentFolder">本地目录 </sys:String>
<sys:String x:Key="Text.ParentFolder.Placeholder">本地存放的父级目录,选填.</sys:String>
<sys:String x:Key="Text.About">关于软件</sys:String>
<sys:String x:Key="Text.About.Title">SourceGit - 开源Git图形客户端</sys:String>
<sys:String x:Key="Text.Apply">应用补丁</sys:String>
<sys:String x:Key="Text.Apply.Title">应用补丁</sys:String>
<sys:String x:Key="Text.Apply.File">补丁文件 </sys:String>
<sys:String x:Key="Text.Apply.File.Placeholder">选择补丁文件</sys:String>
<sys:String x:Key="Text.Apply.WS">空白符号处理 </sys:String>
<sys:String x:Key="Text.Apply.IgnoreWS">忽略空白符号</sys:String>
<sys:String x:Key="Text.Apply.NoWarn">忽略</sys:String>
<sys:String x:Key="Text.Apply.NoWarn.Desc">关闭所有警告</sys:String>
<sys:String x:Key="Text.Apply.Warn">警告</sys:String>
<sys:String x:Key="Text.Apply.Warn.Desc">应用补丁,输出关于空白符的警告</sys:String>
<sys:String x:Key="Text.Apply.Error">错误</sys:String>
<sys:String x:Key="Text.Apply.Error.Desc">输出错误,并终止应用补丁</sys:String>
<sys:String x:Key="Text.Apply.ErrorAll">更多错误</sys:String>
<sys:String x:Key="Text.Apply.ErrorAll.Desc">与【错误】级别相似,但输出内容更多</sys:String>
<sys:String x:Key="Text.Blame">逐行追溯</sys:String>
<sys:String x:Key="Text.Blame.Title">追溯</sys:String>
<sys:String x:Key="Text.Blame.Tip">右键点击查看所选行修改记录</sys:String>
<sys:String x:Key="Text.Blame.SHA">提交指纹</sys:String>
<sys:String x:Key="Text.Blame.Author">修改者</sys:String>
<sys:String x:Key="Text.Blame.ModifyTime">修改时间</sys:String>
<sys:String x:Key="Text.Submodule">子模块</sys:String>
<sys:String x:Key="Text.Submodule.Add">添加子模块</sys:String>
<sys:String x:Key="Text.Submodule.FetchNested">拉取子孙模块</sys:String>
<sys:String x:Key="Text.Submodule.Open">打开仓库</sys:String>
<sys:String x:Key="Text.Submodule.CopyPath">复制路径</sys:String>
<sys:String x:Key="Text.CherryPick">挑选此提交</sys:String>
<sys:String x:Key="Text.CherryPick.Title">挑选提交</sys:String>
<sys:String x:Key="Text.CherryPick.Commit">提交ID </sys:String>
<sys:String x:Key="Text.CherryPick.CommitChanges">提交变化</sys:String>
<sys:String x:Key="Text.Clone">克隆远程仓库</sys:String>
<sys:String x:Key="Text.Clone.RemoteURL">远程仓库 </sys:String>
<sys:String x:Key="Text.Clone.RemoteURL.Placeholder">远程仓库地址</sys:String>
<sys:String x:Key="Text.Clone.RemoteFolder">父级目录 </sys:String>
<sys:String x:Key="Text.Clone.RemoteFolder.Placeholder">选择存放本仓库的父级文件夹路径</sys:String>
<sys:String x:Key="Text.Clone.LocalName">本地仓库名 </sys:String>
<sys:String x:Key="Text.Clone.LocalName.Placeholder">本地仓库目录的名字,选填</sys:String>
<sys:String x:Key="Text.Clone.RemoteName">远程名 </sys:String>
<sys:String x:Key="Text.Clone.RemoteName.Placeholder">远程的名字,选填</sys:String>
<sys:String x:Key="Text.CommitViewer.Info">基本信息</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.Author">修改者</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.Committer">提交者</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.SHA">提交指纹</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.Parents">父提交</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.Refs">相关引用</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.Message">提交信息</sys:String>
<sys:String x:Key="Text.CommitViewer.Info.Changed">变更列表</sys:String>
<sys:String x:Key="Text.CommitViewer.Changes">变更对比</sys:String>
<sys:String x:Key="Text.CommitViewer.Changes.Search">查找文件...</sys:String>
<sys:String x:Key="Text.CommitViewer.Changes.SwitchMode">切换树形/列表模式</sys:String>
<sys:String x:Key="Text.CommitViewer.Files">文件列表</sys:String>
<sys:String x:Key="Text.Configure">配置</sys:String>
<sys:String x:Key="Text.Configure.Credential">仓库凭证</sys:String>
<sys:String x:Key="Text.Configure.User">用户 </sys:String>
<sys:String x:Key="Text.Configure.User.Placeholder">应用于本仓库的用户名</sys:String>
<sys:String x:Key="Text.Configure.Email">邮箱 </sys:String>
<sys:String x:Key="Text.Configure.Email.Placeholder">邮箱地址</sys:String>
<sys:String x:Key="Text.Configure.CommitTemplate">提交模板</sys:String>
<sys:String x:Key="Text.Configure.Template">模板内容 </sys:String>
<sys:String x:Key="Text.CreateBranch">新建分支</sys:String>
<sys:String x:Key="Text.CreateBranch.Title">创建本地分支</sys:String>
<sys:String x:Key="Text.CreateBranch.BasedOn">新分支基于 </sys:String>
<sys:String x:Key="Text.CreateBranch.Name">新分支名 </sys:String>
<sys:String x:Key="Text.CreateBranch.Name.Placeholder">填写分支名称</sys:String>
<sys:String x:Key="Text.CreateBranch.LocalChanges">未提交更改 </sys:String>
<sys:String x:Key="Text.CreateBranch.LocalChanges.StashAndReply">贮藏并自动恢复</sys:String>
<sys:String x:Key="Text.CreateBranch.LocalChanges.Discard">忽略</sys:String>
<sys:String x:Key="Text.CreateBranch.Checkout">完成后切换到新分支</sys:String>
<sys:String x:Key="Text.CreateTag">新建标签</sys:String>
<sys:String x:Key="Text.CreateTag.BasedOn">标签位于 </sys:String>
<sys:String x:Key="Text.CreateTag.Name">标签名 </sys:String>
<sys:String x:Key="Text.CreateTag.Name.Placeholder">推荐格式 v1.0.0-alpha</sys:String>
<sys:String x:Key="Text.CreateTag.Message">标签描述 </sys:String>
<sys:String x:Key="Text.CreateTag.Message.Placeholder">选填</sys:String>
<sys:String x:Key="Text.Dashboard.Explore">浏览</sys:String>
<sys:String x:Key="Text.Dashboard.Explore.Tip">在文件浏览器中打开</sys:String>
<sys:String x:Key="Text.Dashboard.Terminal">终端</sys:String>
<sys:String x:Key="Text.Dashboard.Terminal.Tip">打开GIT终端</sys:String>
<sys:String x:Key="Text.Dashboard.Search">查找</sys:String>
<sys:String x:Key="Text.Dashboard.Search.Tip">查找提交</sys:String>
<sys:String x:Key="Text.Dashboard.Configure.Tip">配置本仓库</sys:String>
<sys:String x:Key="Text.Dashboard.Workspace">工作区</sys:String>
<sys:String x:Key="Text.Dashboard.LocalBranches">本地分支</sys:String>
<sys:String x:Key="Text.Dashboard.NewBranch">新建分支</sys:String>
<sys:String x:Key="Text.Dashboard.Remotes">远程列表</sys:String>
<sys:String x:Key="Text.Dashboard.Remotes.Add">添加远程</sys:String>
<sys:String x:Key="Text.Dashboard.Tags">标签列表</sys:String>
<sys:String x:Key="Text.Dashboard.Tags.Add">新建标签</sys:String>
<sys:String x:Key="Text.Dashboard.Submodules">子模块列表</sys:String>
<sys:String x:Key="Text.Dashboard.Submodules.Add">添加子模块</sys:String>
<sys:String x:Key="Text.Dashboard.Submodules.Update">更新子模块</sys:String>
<sys:String x:Key="Text.Dashboard.Resolve">解决冲突</sys:String>
<sys:String x:Key="Text.Dashboard.Continue">下一步</sys:String>
<sys:String x:Key="Text.Dashboard.Abort">终止冲突解决</sys:String>
<sys:String x:Key="Text.GitFlow">GIT工作流</sys:String>
<sys:String x:Key="Text.GitFlow.Init">初始化GIT工作流</sys:String>
<sys:String x:Key="Text.GitFlow.ProductionBranch">发布分支 </sys:String>
<sys:String x:Key="Text.GitFlow.DevelopBranch">开发分支 </sys:String>
<sys:String x:Key="Text.GitFlow.Feature">特性分支 </sys:String>
<sys:String x:Key="Text.GitFlow.Release">版本分支 </sys:String>
<sys:String x:Key="Text.GitFlow.Hotfix">修复分支 </sys:String>
<sys:String x:Key="Text.GitFlow.FeaturePrefix">特性分支名前缀 </sys:String>
<sys:String x:Key="Text.GitFlow.ReleasePrefix">版本分支名前缀 </sys:String>
<sys:String x:Key="Text.GitFlow.HotfixPrefix">修复分支名前缀 </sys:String>
<sys:String x:Key="Text.GitFlow.TagPrefix">版本标签前缀 </sys:String>
<sys:String x:Key="Text.GitFlow.StartFeature">开始特性分支...</sys:String>
<sys:String x:Key="Text.GitFlow.StartRelease">开始版本分支...</sys:String>
<sys:String x:Key="Text.GitFlow.StartHotfix">开始修复分支...</sys:String>
<sys:String x:Key="Text.GitFlow.StartFeatureTitle">开始特性分支</sys:String>
<sys:String x:Key="Text.GitFlow.StartReleaseTitle">开始版本分支</sys:String>
<sys:String x:Key="Text.GitFlow.StartHotfixTitle">开始修复分支</sys:String>
<sys:String x:Key="Text.GitFlow.StartPlaceholder">输入分支名</sys:String>
<sys:String x:Key="Text.GitFlow.FinishFeature">结束特性分支</sys:String>
<sys:String x:Key="Text.GitFlow.FinishRelease">结束版本分支</sys:String>
<sys:String x:Key="Text.GitFlow.FinishHotfix">结束修复分支</sys:String>
<sys:String x:Key="Text.GitFlow.BranchRequired">{0}分支名未填写!</sys:String>
<sys:String x:Key="Text.GitFlow.BranchInvalid">{0}分支名包含非法字符!</sys:String>
<sys:String x:Key="Text.GitFlow.PrefixRequired">{0}前缀未填写!</sys:String>
<sys:String x:Key="Text.GitFlow.PrefixInvalid">{0}前缀包含非法字符!</sys:String>
<sys:String x:Key="Text.GitFlow.DevSameAsProd">开发分支与发布分支不可相同!</sys:String>
<sys:String x:Key="Text.RepoCM.Refresh">刷新</sys:String>
<sys:String x:Key="Text.RepoCM.Bookmark">书签</sys:String>
<sys:String x:Key="Text.RepoCM.CopyPath">复制路径</sys:String>
<sys:String x:Key="Text.RepoCM.Open">打开</sys:String>
<sys:String x:Key="Text.RepoCM.Explore">在浏览器中查看</sys:String>
<sys:String x:Key="Text.BranchCM.Push">推送 '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.DiscardAll">放弃所有更改</sys:String>
<sys:String x:Key="Text.BranchCM.FastForward">快进到 '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.Pull">拉回 '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.PullInto">拉回 '{0}' 内容至 '{1}'</sys:String>
<sys:String x:Key="Text.BranchCM.Checkout">检出 '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.Merge">合并 '{0}' 到 '{1}'</sys:String>
<sys:String x:Key="Text.BranchCM.Rebase">变基 '{0}' 分支至 '{1}'</sys:String>
<sys:String x:Key="Text.BranchCM.Finish">GIT工作流 - 完成 '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.Rename">重命名 '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.Delete">删除 '{0}'</sys:String>
<sys:String x:Key="Text.BranchCM.Tracking">切换上游分支...</sys:String>
<sys:String x:Key="Text.BranchCM.CopyName">复制分支名</sys:String>
<sys:String x:Key="Text.RemoteCM.Fetch">拉取 '{0}' 更新</sys:String>
<sys:String x:Key="Text.RemoteCM.Edit">编辑 '{0}'</sys:String>
<sys:String x:Key="Text.RemoteCM.Delete">删除 '{0}'</sys:String>
<sys:String x:Key="Text.RemoteCM.CopyURL">复制远程地址</sys:String>
<sys:String x:Key="Text.CommitCM.Reset">重置 '{0}' 到此处</sys:String>
<sys:String x:Key="Text.CommitCM.InteractiveRebase">从此处开始对 '{0}' 交互式变基</sys:String>
<sys:String x:Key="Text.CommitCM.Rebase">变基 '{0}' 到此处</sys:String>
<sys:String x:Key="Text.CommitCM.CherryPick">挑选此提交</sys:String>
<sys:String x:Key="Text.CommitCM.Revert">回滚此提交</sys:String>
<sys:String x:Key="Text.CommitCM.SaveAsPatch">另存为补丁</sys:String>
<sys:String x:Key="Text.CommitCM.CopySHA">复制提交指纹</sys:String>
<sys:String x:Key="Text.CommitCM.CopyInfo">复制提交信息</sys:String>
<sys:String x:Key="Text.TagCM.Push">推送 '{0}'</sys:String>
<sys:String x:Key="Text.TagCM.Delete">删除 '{0}'</sys:String>
<sys:String x:Key="Text.TagCM.Copy">复制标签名</sys:String>
<sys:String x:Key="Text.StashCM.Apply">应用</sys:String>
<sys:String x:Key="Text.StashCM.Pop">应用并删除</sys:String>
<sys:String x:Key="Text.StashCM.Drop">删除</sys:String>
<sys:String x:Key="Text.FileCM.Unstage">从暂存中移除</sys:String>
<sys:String x:Key="Text.FileCM.Stage">暂存...</sys:String>
<sys:String x:Key="Text.FileCM.Discard">放弃更改...</sys:String>
<sys:String x:Key="Text.FileCM.Stash">贮藏...</sys:String>
<sys:String x:Key="Text.FileCM.UnstageMulti">从暂存中移除 {0} 个文件</sys:String>
<sys:String x:Key="Text.FileCM.StageMulti">暂存 {0} 个文件...</sys:String>
<sys:String x:Key="Text.FileCM.DiscardMulti">放弃 {0} 个文件的更改...</sys:String>
<sys:String x:Key="Text.FileCM.StashMulti">贮藏选中的 {0} 个文件...</sys:String>
<sys:String x:Key="Text.FileCM.SaveAsPatch">另存为补丁...</sys:String>
<sys:String x:Key="Text.DeleteBranch">确定要删除此分支吗?</sys:String>
<sys:String x:Key="Text.DeleteBranch.Branch">分支名 </sys:String>
<sys:String x:Key="Text.DeleteRemote">确定要移除该远程吗?</sys:String>
<sys:String x:Key="Text.DeleteRemote.Remote">远程名 </sys:String>
<sys:String x:Key="Text.DeleteTag">确定要移除该标签吗?</sys:String>
<sys:String x:Key="Text.DeleteTag.Tag">标签名 </sys:String>
<sys:String x:Key="Text.DeleteTag.WithRemote">同时删除远程仓库中的此标签</sys:String>
<sys:String x:Key="Text.Diff.Next">下一个差异</sys:String>
<sys:String x:Key="Text.Diff.Prev">上一个差异</sys:String>
<sys:String x:Key="Text.Diff.Mode">切换显示模式</sys:String>
<sys:String x:Key="Text.Diff.Welcome">请选择需要对比的文件</sys:String>
<sys:String x:Key="Text.Diff.NoChange">没有变更或仅有换行符差异</sys:String>
<sys:String x:Key="Text.Diff.Binary">二进制文件</sys:String>
<sys:String x:Key="Text.Diff.Binary.Old">原始大小 </sys:String>
<sys:String x:Key="Text.Diff.Binary.New">当前大小 </sys:String>
<sys:String x:Key="Text.Diff.LFS">LFS对象变更</sys:String>
<sys:String x:Key="Text.Diff.Copy">复制</sys:String>
<sys:String x:Key="Text.Discard">放弃更改确认</sys:String>
<sys:String x:Key="Text.Discard.Changes">需要放弃的变更 </sys:String>
<sys:String x:Key="Text.Discard.Warning">本操作不支持回退,请确认后继续!!!</sys:String>
<sys:String x:Key="Text.Discard.All">所有本地址未提交的修改</sys:String>
<sys:String x:Key="Text.Discard.Total">总计{0}项选中更改</sys:String>
<sys:String x:Key="Text.Fetch">拉取</sys:String>
<sys:String x:Key="Text.Fetch.Title">拉取远程仓库内容</sys:String>
<sys:String x:Key="Text.Fetch.Remote">远程仓库 </sys:String>
<sys:String x:Key="Text.Fetch.AllRemotes">拉取所有的远程仓库</sys:String>
<sys:String x:Key="Text.Fetch.Prune">自动清理远程已删除分支</sys:String>
<sys:String x:Key="Text.FileHistory">文件历史</sys:String>
<sys:String x:Key="Text.FileDisplayMode">切换显示模式</sys:String>
<sys:String x:Key="Text.FileDisplayMode.Grid">网格模式</sys:String>
<sys:String x:Key="Text.FileDisplayMode.List">列表模式</sys:String>
<sys:String x:Key="Text.FileDisplayMode.Tree">树形模式</sys:String>
<sys:String x:Key="Text.FolderDialog">选择目录...</sys:String>
<sys:String x:Key="Text.FolderDialog.Selected">当前选择 </sys:String>
<sys:String x:Key="Text.Histories">历史记录</sys:String>
<sys:String x:Key="Text.Histories.Search">查询提交指纹、信息、作者。回车键开始ESC键取消</sys:String>
<sys:String x:Key="Text.Histories.SearchClear">清空</sys:String>
<sys:String x:Key="Text.Histories.DisplayMode">切换横向/纵向显示</sys:String>
<sys:String x:Key="Text.Histories.Selected">已选中{0}项提交</sys:String>
<sys:String x:Key="Text.Histories.Guide">操作说明</sys:String>
<sys:String x:Key="Text.Histories.Guide_1">1. 单选时,显示选中提交的详细信息</sys:String>
<sys:String x:Key="Text.Histories.Guide_2">2. 双选时,按选中顺序对比两个提交</sys:String>
<sys:String x:Key="Text.Histories.Guide_3">3. 多选时,仅统计选中行数</sys:String>
<sys:String x:Key="Text.Histories.Guide_4">4. 右键用于操作选中的某个提交</sys:String>
<sys:String x:Key="Text.Init">初始化新仓库</sys:String>
<sys:String x:Key="Text.Init.Path">路径 </sys:String>
<sys:String x:Key="Text.Init.Tip">点击【确定】将在此目录执行`git init`操作</sys:String>
<sys:String x:Key="Text.InteractiveRebase">交互式变基</sys:String>
<sys:String x:Key="Text.InteractiveRebase.Target">操作分支 </sys:String>
<sys:String x:Key="Text.InteractiveRebase.On">开始提交 </sys:String>
<sys:String x:Key="Text.InteractiveRebase.Start" xml:space="preserve">开 始</sys:String>
<sys:String x:Key="Text.InteractiveRebase.MoveUp">向上移动</sys:String>
<sys:String x:Key="Text.InteractiveRebase.MoveDown">向下移动</sys:String>
<sys:String x:Key="Text.Launcher">Source Git</sys:String>
<sys:String x:Key="Text.Launcher.NewPageButton">新建空白页</sys:String>
<sys:String x:Key="Text.Launcher.Preference">偏好设置</sys:String>
<sys:String x:Key="Text.Launcher.About">关于</sys:String>
<sys:String x:Key="Text.Launcher.Error">出错了</sys:String>
<sys:String x:Key="Text.Launcher.NewPage">新标签页</sys:String>
<sys:String x:Key="Text.Launcher.NewPageTip">起始页</sys:String>
<sys:String x:Key="Text.Merge">合并分支</sys:String>
<sys:String x:Key="Text.Merge.Source">合并分支 </sys:String>
<sys:String x:Key="Text.Merge.Into">目标分支 </sys:String>
<sys:String x:Key="Text.Merge.Mode">合并方式 </sys:String>
<sys:String x:Key="Text.NewPage.Title">欢迎使用本软件</sys:String>
<sys:String x:Key="Text.NewPage.OpenOrInit">打开本地仓库</sys:String>
<sys:String x:Key="Text.NewPage.Clone">克隆远程仓库</sys:String>
<sys:String x:Key="Text.NewPage.Repositories">仓库列表</sys:String>
<sys:String x:Key="Text.NewPage.DragDrop">支持拖放操作</sys:String>
<sys:String x:Key="Text.NewPage.OpenOrInitDialog">打开/初始化本地仓库</sys:String>
<sys:String x:Key="Text.NewPage.NewFolder">新建分组</sys:String>
<sys:String x:Key="Text.NewPage.NewSubFolder">新建子分组</sys:String>
<sys:String x:Key="Text.NewPage.Rename">重命名</sys:String>
<sys:String x:Key="Text.NewPage.Delete">删除</sys:String>
<sys:String x:Key="Text.Pull">拉回</sys:String>
<sys:String x:Key="Text.Pull.Title">拉回(拉取并合并)</sys:String>
<sys:String x:Key="Text.Pull.Remote">远程 </sys:String>
<sys:String x:Key="Text.Pull.Branch">拉取分支 </sys:String>
<sys:String x:Key="Text.Pull.Into">本地分支 </sys:String>
<sys:String x:Key="Text.Pull.UseRebase">使用变基方式合并分支</sys:String>
<sys:String x:Key="Text.Pull.AutoStash">自动贮藏并恢复本地变更</sys:String>
<sys:String x:Key="Text.Push">推送</sys:String>
<sys:String x:Key="Text.Push.Title">推送到远程仓库</sys:String>
<sys:String x:Key="Text.Push.Local">本地分支 </sys:String>
<sys:String x:Key="Text.Push.Remote">远程仓库 </sys:String>
<sys:String x:Key="Text.Push.To">远程分支 </sys:String>
<sys:String x:Key="Text.Push.WithAllTags">同时推送标签</sys:String>
<sys:String x:Key="Text.Push.Force">启用强制推送</sys:String>
<sys:String x:Key="Text.PushTag">推送标签到远程仓库</sys:String>
<sys:String x:Key="Text.PushTag.Tag">标签 </sys:String>
<sys:String x:Key="Text.PushTag.Remote">远程仓库 </sys:String>
<sys:String x:Key="Text.Rebase">变基操作</sys:String>
<sys:String x:Key="Text.Rebase.Target">分支 </sys:String>
<sys:String x:Key="Text.Rebase.On">目标提交 </sys:String>
<sys:String x:Key="Text.Rebase.AutoStash">自动贮藏并恢复本地变更</sys:String>
<sys:String x:Key="Text.Remote.AddTitle">添加远程仓库</sys:String>
<sys:String x:Key="Text.Remote.EditTitle">编辑远程仓库</sys:String>
<sys:String x:Key="Text.Remote.Name">远程名 </sys:String>
<sys:String x:Key="Text.Remote.Name.Placeholder">唯一远程名</sys:String>
<sys:String x:Key="Text.Remote.URL">仓库地址 </sys:String>
<sys:String x:Key="Text.Remote.URL.Placeholder">远程仓库的地址</sys:String>
<sys:String x:Key="Text.RenameBranch">分支重命名</sys:String>
<sys:String x:Key="Text.RenameBranch.Target">分支 </sys:String>
<sys:String x:Key="Text.RenameBranch.Name">新的名称 </sys:String>
<sys:String x:Key="Text.RenameBranch.Name.Placeholder">新的分支名不能与现有分支名相同</sys:String>
<sys:String x:Key="Text.Reset">重置当前分支到指定版本</sys:String>
<sys:String x:Key="Text.Reset.Target">当前分支 </sys:String>
<sys:String x:Key="Text.Reset.MoveTo">提交 </sys:String>
<sys:String x:Key="Text.Reset.Mode">重置模式 </sys:String>
<sys:String x:Key="Text.Revert">确定要回滚吗?</sys:String>
<sys:String x:Key="Text.Revert.Commit">目标提交 </sys:String>
<sys:String x:Key="Text.Revert.CommitChanges">回滚后提交更改</sys:String>
<sys:String x:Key="Text.Preference">偏好设置</sys:String>
<sys:String x:Key="Text.Preference.General">通用配置</sys:String>
<sys:String x:Key="Text.Preference.RestartRequired">需要重启软件</sys:String>
<sys:String x:Key="Text.Preference.Locale">显示语言 </sys:String>
<sys:String x:Key="Text.Preference.UseLight">启用浅色主题 </sys:String>
<sys:String x:Key="Text.Preference.CheckUpdate">检测更新 </sys:String>
<sys:String x:Key="Text.Preference.Git">GIT配置</sys:String>
<sys:String x:Key="Text.Preference.Git.Path">安装路径 </sys:String>
<sys:String x:Key="Text.Preference.Git.Path.Placeholder">填写git.exe所在位置</sys:String>
<sys:String x:Key="Text.Preference.Git.Dir">默认克隆路径 </sys:String>
<sys:String x:Key="Text.Preference.Git.Dir.Placeholder">默认的仓库本地存放位置</sys:String>
<sys:String x:Key="Text.Preference.Global">全局设置</sys:String>
<sys:String x:Key="Text.Preference.User">用户名 </sys:String>
<sys:String x:Key="Text.Preference.Email">邮箱 </sys:String>
<sys:String x:Key="Text.Preference.CRLF">自动换行转换 </sys:String>
<sys:String x:Key="Text.Preference.Merger">外部合并工具</sys:String>
<sys:String x:Key="Text.Preference.Merger.Type">工具 </sys:String>
<sys:String x:Key="Text.Preference.Merger.Path">安装路径 </sys:String>
<sys:String x:Key="Text.Preference.Merger.Path.Placeholder">填写工具可执行文件所在位置</sys:String>
<sys:String x:Key="Text.Preference.Merger.Cmd">指令 </sys:String>
<sys:String x:Key="Text.Preference.Dialog.GitExe">选择git.exe所在位置</sys:String>
<sys:String x:Key="Text.Preference.Dialog.GitDir">选择仓库本地存放位置</sys:String>
<sys:String x:Key="Text.Preference.Dialog.Merger">选择{0}所在位置</sys:String>
<sys:String x:Key="Text.Stash">贮藏</sys:String>
<sys:String x:Key="Text.Stash.Title">贮藏本地变更</sys:String>
<sys:String x:Key="Text.Stash.Message">信息 </sys:String>
<sys:String x:Key="Text.Stash.Message.Placeholder">选填,用于命名此贮藏</sys:String>
<sys:String x:Key="Text.Stash.IncludeUntracked">包含未跟踪的文件</sys:String>
<sys:String x:Key="Text.Stashes">贮藏列表</sys:String>
<sys:String x:Key="Text.Stashes.Stashes">贮藏列表</sys:String>
<sys:String x:Key="Text.Stashes.Changes">查看变更</sys:String>
<sys:String x:Key="Text.Stashes.Changes.Tip">不显示未跟踪的文件</sys:String>
<sys:String x:Key="Text.TwoCommitsDiff">对比提交 : {0} -> {1}</sys:String>
<sys:String x:Key="Text.UpdateAvailable">检测更新</sys:String>
<sys:String x:Key="Text.UpdateAvailable.Title">{0}已发布!</sys:String>
<sys:String x:Key="Text.UpdateAvailable.Time">发布时间</sys:String>
<sys:String x:Key="Text.UpdateAvailable.Based">GIT版本</sys:String>
<sys:String x:Key="Text.UpdateAvailable.IsPreRelease">预览版</sys:String>
<sys:String x:Key="Text.UpdateAvailable.Download" xml:space="preserve">下 载</sys:String>
<sys:String x:Key="Text.WorkingCopy">本地更改</sys:String>
<sys:String x:Key="Text.WorkingCopy.Unstaged">未暂存</sys:String>
<sys:String x:Key="Text.WorkingCopy.Unstaged.Stage">暂存选中</sys:String>
<sys:String x:Key="Text.WorkingCopy.Unstaged.StageAll">暂存所有</sys:String>
<sys:String x:Key="Text.WorkingCopy.Staged">已暂存</sys:String>
<sys:String x:Key="Text.WorkingCopy.Staged.Unstage">从暂存区移除选中</sys:String>
<sys:String x:Key="Text.WorkingCopy.Staged.UnstageAll">从暂存区移除所有</sys:String>
<sys:String x:Key="Text.WorkingCopy.Conflicts">检测到冲突</sys:String>
<sys:String x:Key="Text.WorkingCopy.UseTheirs">使用THEIRS</sys:String>
<sys:String x:Key="Text.WorkingCopy.UseMine">使用MINE</sys:String>
<sys:String x:Key="Text.WorkingCopy.OpenMerger">打开合并工具</sys:String>
<sys:String x:Key="Text.WorkingCopy.CommitMessageTip">填写提交信息</sys:String>
<sys:String x:Key="Text.WorkingCopy.MessageHistories">历史提交信息</sys:String>
<sys:String x:Key="Text.WorkingCopy.Amend">修补</sys:String>
<sys:String x:Key="Text.WorkingCopy.Commit">提交</sys:String>
<sys:String x:Key="Text.WorkingCopy.CommitAndPush">提交并推送</sys:String>
<sys:String x:Key="Text.WorkingCopy.NoCommitHistories">没有提交信息记录</sys:String>
<sys:String x:Key="Text.WorkingCopy.HasCommitHistories">最近输入的提交信息</sys:String>
<sys:String x:Key="Text.Conflict.CherryPick">检测到挑选提交冲突! </sys:String>
<sys:String x:Key="Text.Conflict.Rebase">检测到变基冲突!</sys:String>
<sys:String x:Key="Text.Conflict.Revert">检测到回滚提交冲突!</sys:String>
<sys:String x:Key="Text.Conflict.Merge">检测到分支合并冲突!</sys:String>
<sys:String x:Key="Text.NotConfigured">GIT尚未配置。请打开【偏好设置】配置GIT路径。</sys:String>
<sys:String x:Key="Text.PathNotFound">路径({0})不存在或不可读取!</sys:String>
<sys:String x:Key="Text.MissingBash">无法找到bash.exe请确保其在git.exe同目录中</sys:String>
<sys:String x:Key="Text.BinaryNotSupported">二进制文件不支持该操作!!!</sys:String>
<sys:String x:Key="Text.GitDirNotFound">获取仓库GIT_DIR失败!</sys:String>
<sys:String x:Key="Text.InitGitFlowFailed">初始化GIT FLOW失败!</sys:String>
<sys:String x:Key="Text.BadGitFlowType">不支持的GIT FLOW分支!</sys:String>
<sys:String x:Key="Text.BadCloneFolder">目录不存在或不可写!!!</sys:String>
<sys:String x:Key="Text.BadRemoteUri">非法的远程仓库地址!</sys:String>
<sys:String x:Key="Text.EmptyRemoteName">远程仓库地址不可为空</sys:String>
<sys:String x:Key="Text.BadRemoteName">远程仓库地址包含非法字符!仅支持字母、数字、下划线、横线或英文点号!</sys:String>
<sys:String x:Key="Text.DuplicatedRemoteName">远程仓库名已存在!</sys:String>
<sys:String x:Key="Text.EmptyBranchName">分支名不可为空</sys:String>
<sys:String x:Key="Text.BadBranchName">分支名包含非法字符!仅支持字母、数字、下划线、横线或英文点号!</sys:String>
<sys:String x:Key="Text.DuplicatedBranchName">分支名已存在!</sys:String>
<sys:String x:Key="Text.EmptyTagName">标签名不可为空!</sys:String>
<sys:String x:Key="Text.BadTagName">标签名包含非法字符!仅支持字母、数字、下划线、横线或英文点号!</sys:String>
<sys:String x:Key="Text.DuplicatedTagName">标签名已存在!</sys:String>
<sys:String x:Key="Text.EmptyCommitMessage">提交信息未填写!</sys:String>
<sys:String x:Key="Text.BadPatchFile">补丁文件不存在或不可访问!</sys:String>
<sys:String x:Key="Text.BadSubmodulePath">非法的子模块路径!</sys:String>
</ResourceDictionary>

View file

@ -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">

View file

@ -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>

View file

@ -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>

View file

@ -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;

View file

@ -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>

View file

@ -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;

View file

@ -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>

View file

@ -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>

View file

@ -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;
});
}

View file

@ -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"
@ -230,7 +230,7 @@
<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>

View file

@ -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);
};

View file

@ -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>

View file

@ -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 &amp; 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>

View file

@ -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>

View file

@ -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;

View file

@ -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>

View file

@ -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;

View file

@ -3,7 +3,6 @@
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"
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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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;

View file

@ -3,7 +3,6 @@
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"
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>

View file

@ -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);
}
}

View file

@ -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>

View file

@ -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 -->

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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();

View file

@ -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>

View file

@ -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;
}

View file

@ -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>

View file

@ -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;

View file

@ -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,10 +204,11 @@
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>

View file

@ -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}",

View file

@ -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>

View file

@ -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>

View file

@ -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"

View file

@ -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;

View file

@ -3,7 +3,6 @@
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"
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>

View file

@ -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. -->

View file

@ -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;
}

View file

@ -23,9 +23,9 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Pull (Fetch &amp; 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 &amp; 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>

View file

@ -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>

View file

@ -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>

View file

@ -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 &amp; 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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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}"/>

View file

@ -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;

View file

@ -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>

View file

@ -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

View file

@ -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();

View file

@ -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>

View file

@ -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);
};

View file

@ -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>

View file

@ -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";

View file

@ -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 &amp; 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>

View file

@ -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());