diff --git a/src/App.preference.cs b/src/App.preference.cs
index d51fe99a..29ed49e5 100644
--- a/src/App.preference.cs
+++ b/src/App.preference.cs
@@ -49,6 +49,10 @@ namespace SourceGit {
///
public bool UseLightTheme { get; set; }
///
+ /// Locale
+ ///
+ public string Locale { get; set; } = "en_US";
+ ///
/// Main window width
///
public double WindowWidth { get; set; }
diff --git a/src/App.xaml b/src/App.xaml
index 408df2f0..a85e0cf5 100644
--- a/src/App.xaml
+++ b/src/App.xaml
@@ -9,6 +9,7 @@
+
diff --git a/src/App.xaml.cs b/src/App.xaml.cs
index c2c2f757..a577fc6f 100644
--- a/src/App.xaml.cs
+++ b/src/App.xaml.cs
@@ -30,6 +30,25 @@ namespace SourceGit {
}
}
+ ///
+ /// Load text from locales.
+ ///
+ ///
+ ///
+ public static string Text(string key) {
+ return Current.FindResource("Text." + key) as string;
+ }
+
+ ///
+ /// Format text
+ ///
+ ///
+ ///
+ ///
+ public static string Format(string key, params object[] args) {
+ return string.Format(Text(key), args);
+ }
+
///
/// Raise error message.
///
@@ -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();
diff --git a/src/Git/Repository.cs b/src/Git/Repository.cs
index 6a358570..d0bccb04 100644
--- a/src/Git/Repository.cs
+++ b/src/Git/Repository.cs
@@ -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;
}
diff --git a/src/Helpers/Validations.cs b/src/Helpers/Validations.cs
index 04ba8319..3fb2deb2 100644
--- a/src/Helpers/Validations.cs
+++ b/src/Helpers/Validations.cs
@@ -10,7 +10,7 @@ namespace SourceGit.Helpers {
///
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 {
///
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;
}
}
}
diff --git a/src/Resources/Locales/en_US.xaml b/src/Resources/Locales/en_US.xaml
new file mode 100644
index 00000000..df9588b9
--- /dev/null
+++ b/src/Resources/Locales/en_US.xaml
@@ -0,0 +1,432 @@
+
+ START
+ SURE
+ SAVE
+ CLOSE
+ CANCEL
+ CLICK TO GO
+ Reveal in File Explorer
+ Save As ...
+ Save File to ...
+ Copy Path
+ {0} Bytes
+ FILTER
+ Optional.
+
+ URL :
+ Git Repository URL
+ Parent Folder :
+ Relative foler to store this module. Optional.
+
+ ABOUT
+ SourceGit - OPEN SOURCE GIT CLIENT
+
+ Apply
+ Apply Patch
+ Patch File :
+ Select .patch file to apply
+ Whitespace :
+ Ignore whitespace changes
+ No Warn
+ Turns off the trailing whitespace warning
+ Warn
+ Outputs warnings for a few such errors, but applies
+ Error
+ Raise errors and refuses to apply the patch
+ Error All
+ Similar to 'error', but shows more
+
+ Blame
+ SOURCEGIT - BLAME
+ Use right mouse button to view commit information.
+ COMMIT SHA
+ AUTHOR
+ MODIFY TIME
+
+ SUBMODULES
+ Add Submodule
+ Fetch nested submodules
+ Open Submodule Repository
+ Copy Relative Path
+
+ Cherry-Pick This Commit
+ Cherry Pick
+ Commit :
+ Commit all changes
+
+ Clone Remote Repository
+ Repository URL :
+ Git Repository URL
+ Parent Folder :
+ Folder to contain this repository
+ Local Name :
+ Repository name. Optional.
+ Remote Name :
+ Remote name. Optional.
+
+ INFORMATION
+ AUTHOR
+ COMMITTER
+ SHA
+ PARENTS
+ REFS
+ MESSAGE
+ CHANGED
+ CHANGES
+ Search Files ...
+ SWITCH TO LIST/TREE VIEW
+ FILES
+
+ Configure
+ CREDENTIAL
+ User :
+ User name for this repository
+ Email :
+ Email address
+ COMMIT TEMPLATE
+ Template :
+
+ Create Branch
+ Create Local Branch
+ Based On :
+ New Branch Name :
+ Enter branch name.
+ Local Changes :
+ Stash & Reapply
+ Discard
+ Check out after created
+
+ Create Tag
+ New Tag At :
+ Tag Name :
+ Recommanded format :v1.0.0-alpha
+ Tag Message :
+ Optional.
+
+ Explore
+ Open In File Browser
+ Terminal
+ Open Git Bash
+ Search
+ Search Commit
+ Configure this repository
+ WORKSPACE
+ LOCAL BRANCHES
+ NEW BRANCH
+ REMOTES
+ ADD REMOTE
+ TAGS
+ NEW TAG
+ SUBMODULES
+ ADD SUBMODULE
+ UPDATE SUBMODULE
+ RESOLVE
+ CONTINUE
+ ABORT
+
+ GIT FLOW
+ Initialize Git-Flow
+ Production Branch :
+ Development Branch :
+ Feature :
+ Release :
+ Hotfix :
+ Feature Prefix :
+ Release Prefix :
+ Hotfix Prefix :
+ Version Tag Prefix :
+ Start Feature ...
+ Start Release ...
+ Start Hotfix ...
+ GIT FLOW - Start Feature
+ GIT FLOW - Start Release
+ GIT FLOW - Start Hotfix
+ Enter name
+ GIT FLOW - Finish Feature
+ GIT FLOW - Finish Release
+ GIT FLOW - Finish Hotfix
+ {0} branch name is required.
+ {0} branch name contains invalid characters.
+ {0} prefix is required.
+ {0} contains invalid characters.
+ Development branch is same with production!
+
+ Refresh
+ Bookmark
+ CopyPath
+ Open
+ Open Container Folder
+
+ Push '{0}'
+ Discard all changes
+ Fast-Forward to '{0}'
+ Pull '{0}'
+ Pull '{0}' into '{1}'
+ Checkout '{0}'
+ Merge '{0}' into '{1}'
+ Rebase '{0}' on '{1}'
+ Git Flow - Finish '{0}'
+ Rename '{0}'
+ Delete '{0}'
+ Tracking ...
+ Copy Branch Name
+
+ Fetch '{0}'
+ Edit '{0}'
+ Delete '{0}'
+ Copy Remote URL
+
+ Reset '{0}' to Here
+ Interactive Rebase '{0}' from Here
+ Rebase '{0}' to Here
+ Cherry-Pick This Commit
+ Revert Commit
+ Save as Patch
+ Copy Commit SHA
+ Copy Commit Info
+
+ Push '{0}'
+ Delete '{0}'
+ Copy Tag Name
+
+ Apply
+ Pop
+ Drop
+
+ Unstage
+ Stage...
+ Discard...
+ Stash...
+ Unstage {0} files
+ Stage {0} files...
+ Discard {0} files...
+ Stash {0} files...
+ Save As Patch...
+
+ Confirm To Delete Branch
+ Branch :
+
+ Confirm To Delete Remote
+ Remote :
+
+ Confirm To Delete Tag
+ Tag :
+ Delete from remote repositories
+
+ Next Difference
+ Previous Difference
+ Toggle One-Side/Two-Sides
+ SELECT FILE TO VIEW CHANGES
+ NO CHANGES OR ONLY EOL CHANGES
+ BINARY DIFF
+ OLD :
+ New :
+ LFS OBJECT CHANGE
+ Copy Selected Lines
+
+ Confirm To Discard Changes
+ Changes :
+ You can't undo this action!!!
+ All local changes in working copy.
+ Total {0} changes will be discard
+
+ Fetch
+ Fetch Remote Changes
+ Remote :
+ Fetch all remotes
+ Prune remote dead branches
+
+ File History
+
+ CHANGE FILES DISPLAY MODE
+ Show as Grid
+ Show as List
+ Show as Tree
+
+ SELECT FOLDER
+ SELECTED :
+
+ Histories
+ SEARCH SHA/SUBJECT/AUTHOR. PRESS ENTER TO SEARCH, ESC TO QUIT
+ CLEAR
+ Toggle Horizontal/Vertical Layout
+ SELECTED {0} COMMITS
+ HISTORIES GUIDE
+ 1. Select single commit to view detail
+ 2. Select two commits to show differences
+ 3. Select more than 2 commits to count
+ 4. Try to open context menu with selected commit
+
+ Initialize Repository
+ Path :
+ Invalid repository detected. Run `git init` under this path?
+
+ SOURCEGIT - INTERACTIVE REBASE
+ Rebase :
+ On :
+ REBASE
+ MOVE UP
+ MOVE DOWN
+
+ Source Git
+ NEW PAGE
+ PREFERENCE
+ ABOUT
+ ERROR
+ New Page
+ Welcome Page
+
+ Merge Branch
+ Source Branch :
+ Into :
+ Merge Option :
+
+ Welcome to SourceGit :)
+ Open Local Repository
+ Clone Remote Repository
+ REPOSITORIES
+ DRAG-DROP YOUR FOLDER
+ Open or init local repository
+ Add Folder
+ Add Sub-Folder
+ Rename
+ Delete
+
+ Pull
+ Pull (Fetch & Merge)
+ Remote :
+ Branch :
+ Into :
+ Use rebase instead of merge
+ Stash & reapply local changes
+
+ Push
+ Push Changes To Remote
+ Local Branch :
+ Remote :
+ To :
+ Push all tags
+ Force push
+
+ Push Tag To Remote
+ Tag :
+ Remote :
+
+ Rebase Current Branch
+ Rebase :
+ On :
+ Stash & reapply local changes
+
+ Add Remote
+ Edit Remote
+ Name :
+ Remote name
+ Repository URL :
+ Remote git repository URL
+
+ Rename Branch
+ Branch :
+ New Name :
+ Unique name for this branch
+
+ Reset Current Branch To Revision
+ Current Branch :
+ Move To :
+ Reset Mode :
+
+ Confirm To Revert Commit
+ Commit :
+ Commit revert changes
+
+ Preference
+ GENERAL SETTING
+ RESTART REQUIRED
+ Display Language :
+ Light Theme :
+ Check for Update :
+ GIT INSTANCE
+ Install Path :
+ Input path for git.exe
+ Default Clone Dir :
+ Default path to clone repo into
+ GLOBAL SETTING
+ Name :
+ Email :
+ Auto CRLF
+ MERGE TOOL
+ Merger :
+ Install Path :
+ Input path for merge tool
+ Command :
+ Select Git Executable File
+ Select default clone path
+ Select {0} Install Path
+
+ Stash
+ Stash Local Changes
+ Message :
+ Optional. Name of this stash
+ Include untracked files
+
+ Stashes
+ STASHES
+ CHANGES
+ Untracked files not shown
+
+ COMMIT : {0} -> {1}
+
+ UPDATE AVAILABLE
+ {0} is available!
+ Publish Time
+ Base On Commit
+ Is Pre-release
+ DOWNLOAD
+
+ Commit
+ UNSTAGED
+ STAGE
+ STAGE ALL
+ STAGED
+ UNSTAGE
+ UNSTAGE ALL
+ CONFLICTS DETECTED
+ USE THEIRS
+ USE MINE
+ OPEN MERGE
+ Enter commit message
+ MESSAGE HISTORIES
+ Amend
+ COMMIT
+ COMMIT & PUSH
+ NO RECENT INPUT MESSAGES
+ RECENT INPUT MESSAGES
+
+ Cherry-Pick merge request detected! Press 'Abort' to restore original HEAD
+ Rebase merge request detected! Press 'Abort' to restore original HEAD
+ Revert merge request detected! Press 'Abort' to restore original HEAD
+ Merge request detected! Press 'Abort' to restore original HEAD
+
+ Git has NOT been configured.\nPlease to go [Preference] and configure it first.
+ Path[{0}] not exists!
+ Can NOT locate bash.exe. Make sure bash.exe exists under the same folder with git.exe
+ BINARY FILE BLAME NOT SUPPORTED!!!
+ GIT_DIR for this repository NOT FOUND!
+ Initialize Git-flow failed!
+ Bad git-flow branch type!
+ EXISTS and FULL ACCESS CONTROL needed
+ Remote git URL not supported
+ Remote name can NOT be null
+ Bad name for remote. Regex: ^[\\w\\-\\.]+$
+ Duplicated remote name!
+ Branch name can NOT be null
+ Bad name for branch. Regex: ^[\\w\\-/\\.]+$
+ Duplicated branch name!
+ Tag name can NOT be null
+ Bad name for tag. Regex: ^[\\w\\-\\.]+$
+ Duplicated tag name!
+ Commit subject can NOT be empty
+ Invalid path for patch file
+ Invalid path for submodules
+
\ No newline at end of file
diff --git a/src/Resources/Locales/zh_CN.xaml b/src/Resources/Locales/zh_CN.xaml
new file mode 100644
index 00000000..c8420b02
--- /dev/null
+++ b/src/Resources/Locales/zh_CN.xaml
@@ -0,0 +1,432 @@
+
+ 开 始
+ 确 定
+ 保 存
+ 关 闭
+ 取 消
+ 点击前往
+ 在文件浏览器中查看
+ 另存为...
+ 另存文件到...
+ 复制路径
+ {0} 字节
+ 过滤
+ 选填
+
+ 仓库地址 :
+ 远程仓库地址
+ 本地目录 :
+ 本地存放的父级目录,选填.
+
+ 关于软件
+ SourceGit - 开源Git图形客户端
+
+ 应用补丁
+ 应用补丁
+ 补丁文件 :
+ 选择补丁文件
+ 空白符号处理 :
+ 忽略空白符号
+ 忽略
+ 关闭所有警告
+ 警告
+ 应用补丁,输出关于空白符的警告
+ 错误
+ 输出错误,并终止应用补丁
+ 更多错误
+ 与【错误】级别相似,但输出内容更多
+
+ 逐行追溯
+ 追溯
+ 右键点击查看所选行修改记录
+ 提交指纹
+ 修改者
+ 修改时间
+
+ 子模块
+ 添加子模块
+ 拉取子孙模块
+ 打开仓库
+ 复制路径
+
+ 挑选此提交
+ 挑选提交
+ 提交ID :
+ 提交变化
+
+ 克隆远程仓库
+ 远程仓库 :
+ 远程仓库地址
+ 父级目录 :
+ 选择存放本仓库的父级文件夹路径
+ 本地仓库名 :
+ 本地仓库目录的名字,选填
+ 远程名 :
+ 远程的名字,选填
+
+ 基本信息
+ 修改者
+ 提交者
+ 提交指纹
+ 父提交
+ 相关引用
+ 提交信息
+ 变更列表
+ 变更对比
+ 查找文件...
+ 切换树形/列表模式
+ 文件列表
+
+ 配置
+ 仓库凭证
+ 用户 :
+ 应用于本仓库的用户名
+ 邮箱 :
+ 邮箱地址
+ 提交模板
+ 模板内容 :
+
+ 新建分支
+ 创建本地分支
+ 新分支基于 :
+ 新分支名 :
+ 填写分支名称
+ 未提交更改 :
+ 贮藏并自动恢复
+ 忽略
+ 完成后切换到新分支
+
+ 新建标签
+ 标签位于 :
+ 标签名 :
+ 推荐格式 :v1.0.0-alpha
+ 标签描述 :
+ 选填
+
+ 浏览
+ 在文件浏览器中打开
+ 终端
+ 打开GIT终端
+ 查找
+ 查找提交
+ 配置本仓库
+ 工作区
+ 本地分支
+ 新建分支
+ 远程列表
+ 添加远程
+ 标签列表
+ 新建标签
+ 子模块列表
+ 添加子模块
+ 更新子模块
+ 解决冲突
+ 下一步
+ 终止冲突解决
+
+ GIT工作流
+ 初始化GIT工作流
+ 发布分支 :
+ 开发分支 :
+ 特性分支 :
+ 版本分支 :
+ 修复分支 :
+ 特性分支名前缀 :
+ 版本分支名前缀 :
+ 修复分支名前缀 :
+ 版本标签前缀 :
+ 开始特性分支...
+ 开始版本分支...
+ 开始修复分支...
+ 开始特性分支
+ 开始版本分支
+ 开始修复分支
+ 输入分支名
+ 结束特性分支
+ 结束版本分支
+ 结束修复分支
+ {0}分支名未填写!
+ {0}分支名包含非法字符!
+ {0}前缀未填写!
+ {0}前缀包含非法字符!
+ 开发分支与发布分支不可相同!
+
+ 刷新
+ 书签
+ 复制路径
+ 打开
+ 在浏览器中查看
+
+ 推送 '{0}'
+ 放弃所有更改
+ 快进到 '{0}'
+ 拉回 '{0}'
+ 拉回 '{0}' 内容至 '{1}'
+ 检出 '{0}'
+ 合并 '{0}' 到 '{1}'
+ 变基 '{0}' 分支至 '{1}'
+ GIT工作流 - 完成 '{0}'
+ 重命名 '{0}'
+ 删除 '{0}'
+ 切换上游分支...
+ 复制分支名
+
+ 拉取 '{0}' 更新
+ 编辑 '{0}'
+ 删除 '{0}'
+ 复制远程地址
+
+ 重置 '{0}' 到此处
+ 从此处开始对 '{0}' 交互式变基
+ 变基 '{0}' 到此处
+ 挑选此提交
+ 回滚此提交
+ 另存为补丁
+ 复制提交指纹
+ 复制提交信息
+
+ 推送 '{0}'
+ 删除 '{0}'
+ 复制标签名
+
+ 应用
+ 应用并删除
+ 删除
+
+ 从暂存中移除
+ 暂存...
+ 放弃更改...
+ 贮藏...
+ 从暂存中移除 {0} 个文件
+ 暂存 {0} 个文件...
+ 放弃 {0} 个文件的更改...
+ 贮藏选中的 {0} 个文件...
+ 另存为补丁...
+
+ 确定要删除此分支吗?
+ 分支名 :
+
+ 确定要移除该远程吗?
+ 远程名 :
+
+ 确定要移除该标签吗?
+ 标签名 :
+ 同时删除远程仓库中的此标签
+
+ 下一个差异
+ 上一个差异
+ 切换显示模式
+ 请选择需要对比的文件
+ 没有变更或仅有换行符差异
+ 二进制文件
+ 原始大小 :
+ 当前大小 :
+ LFS对象变更
+ 复制
+
+ 放弃更改确认
+ 需要放弃的变更 :
+ 本操作不支持回退,请确认后继续!!!
+ 所有本地址未提交的修改
+ 总计{0}项选中更改
+
+ 拉取
+ 拉取远程仓库内容
+ 远程仓库 :
+ 拉取所有的远程仓库
+ 自动清理远程已删除分支
+
+ 文件历史
+
+ 切换显示模式
+ 网格模式
+ 列表模式
+ 树形模式
+
+ 选择目录...
+ 当前选择 :
+
+ 历史记录
+ 查询提交指纹、信息、作者。回车键开始,ESC键取消
+ 清空
+ 切换横向/纵向显示
+ 已选中{0}项提交
+ 操作说明
+ 1. 单选时,显示选中提交的详细信息
+ 2. 双选时,按选中顺序对比两个提交
+ 3. 多选时,仅统计选中行数
+ 4. 右键用于操作选中的某个提交
+
+ 初始化新仓库
+ 路径 :
+ 点击【确定】将在此目录执行`git init`操作
+
+ 交互式变基
+ 操作分支 :
+ 开始提交 :
+ 开 始
+ 向上移动
+ 向下移动
+
+ Source Git
+ 新建空白页
+ 偏好设置
+ 关于
+ 出错了
+ 新标签页
+ 起始页
+
+ 合并分支
+ 合并分支 :
+ 目标分支 :
+ 合并方式 :
+
+ 欢迎使用本软件
+ 打开本地仓库
+ 克隆远程仓库
+ 仓库列表
+ 支持拖放操作
+ 打开/初始化本地仓库
+ 新建分组
+ 新建子分组
+ 重命名
+ 删除
+
+ 拉回
+ 拉回(拉取并合并)
+ 远程 :
+ 拉取分支 :
+ 本地分支 :
+ 使用变基方式合并分支
+ 自动贮藏并恢复本地变更
+
+ 推送
+ 推送到远程仓库
+ 本地分支 :
+ 远程仓库 :
+ 远程分支 :
+ 同时推送标签
+ 启用强制推送
+
+ 推送标签到远程仓库
+ 标签 :
+ 远程仓库 :
+
+ 变基操作
+ 分支 :
+ 目标提交 :
+ 自动贮藏并恢复本地变更
+
+ 添加远程仓库
+ 编辑远程仓库
+ 远程名 :
+ 唯一远程名
+ 仓库地址 :
+ 远程仓库的地址
+
+ 分支重命名
+ 分支 :
+ 新的名称 :
+ 新的分支名不能与现有分支名相同
+
+ 重置当前分支到指定版本
+ 当前分支 :
+ 提交 :
+ 重置模式 :
+
+ 确定要回滚吗?
+ 目标提交 :
+ 回滚后提交更改
+
+ 偏好设置
+ 通用配置
+ 需要重启软件
+ 显示语言 :
+ 启用浅色主题 :
+ 检测更新 :
+ GIT配置
+ 安装路径 :
+ 填写git.exe所在位置
+ 默认克隆路径 :
+ 默认的仓库本地存放位置
+ 全局设置
+ 用户名 :
+ 邮箱 :
+ 自动换行转换 :
+ 外部合并工具
+ 工具 :
+ 安装路径 :
+ 填写工具可执行文件所在位置
+ 指令 :
+ 选择git.exe所在位置
+ 选择仓库本地存放位置
+ 选择{0}所在位置
+
+ 贮藏
+ 贮藏本地变更
+ 信息 :
+ 选填,用于命名此贮藏
+ 包含未跟踪的文件
+
+ 贮藏列表
+ 贮藏列表
+ 查看变更
+ 不显示未跟踪的文件
+
+ 对比提交 : {0} -> {1}
+
+ 检测更新
+ {0}已发布!
+ 发布时间
+ GIT版本
+ 预览版
+ 下 载
+
+ 本地更改
+ 未暂存
+ 暂存选中
+ 暂存所有
+ 已暂存
+ 从暂存区移除选中
+ 从暂存区移除所有
+ 检测到冲突
+ 使用THEIRS
+ 使用MINE
+ 打开合并工具
+ 填写提交信息
+ 历史提交信息
+ 修补
+ 提交
+ 提交并推送
+ 没有提交信息记录
+ 最近输入的提交信息
+
+ 检测到挑选提交冲突!
+ 检测到变基冲突!
+ 检测到回滚提交冲突!
+ 检测到分支合并冲突!
+
+ GIT尚未配置。请打开【偏好设置】配置GIT路径。
+ 路径({0})不存在或不可读取!
+ 无法找到bash.exe,请确保其在git.exe同目录中!
+ 二进制文件不支持该操作!!!
+ 获取仓库GIT_DIR失败!
+ 初始化GIT FLOW失败!
+ 不支持的GIT FLOW分支!
+ 目录不存在或不可写!!!
+ 非法的远程仓库地址!
+ 远程仓库地址不可为空
+ 远程仓库地址包含非法字符!仅支持字母、数字、下划线、横线或英文点号!
+ 远程仓库名已存在!
+ 分支名不可为空
+ 分支名包含非法字符!仅支持字母、数字、下划线、横线或英文点号!
+ 分支名已存在!
+ 标签名不可为空!
+ 标签名包含非法字符!仅支持字母、数字、下划线、横线或英文点号!
+ 标签名已存在!
+ 提交信息未填写!
+ 补丁文件不存在或不可访问!
+ 非法的子模块路径!
+
\ No newline at end of file
diff --git a/src/UI/About.xaml b/src/UI/About.xaml
index 2e2b84da..c0d90469 100644
--- a/src/UI/About.xaml
+++ b/src/UI/About.xaml
@@ -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">
@@ -33,7 +33,7 @@
-
+
-
+
@@ -71,7 +71,7 @@
+ Content="{StaticResource Text.Apply.IgnoreWS}"/>
@@ -81,8 +81,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/UI/Apply.xaml.cs b/src/UI/Apply.xaml.cs
index 0c025c24..1e03f916 100644
--- a/src/UI/Apply.xaml.cs
+++ b/src/UI/Apply.xaml.cs
@@ -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;
diff --git a/src/UI/Blame.xaml b/src/UI/Blame.xaml
index 913f83ac..c084db56 100644
--- a/src/UI/Blame.xaml
+++ b/src/UI/Blame.xaml
@@ -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">
@@ -53,7 +53,7 @@
Fill="{StaticResource Brush.Logo}"
WindowChrome.IsHitTestVisibleInChrome="True"
MouseLeftButtonDown="LogoMouseButtonDown"/>
-
+
@@ -102,7 +102,7 @@
-
+
@@ -187,11 +187,11 @@
-
+
-
+
-
+
diff --git a/src/UI/Blame.xaml.cs b/src/UI/Blame.xaml.cs
index 071825b8..9b1d1478 100644
--- a/src/UI/Blame.xaml.cs
+++ b/src/UI/Blame.xaml.cs
@@ -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;
diff --git a/src/UI/CherryPick.xaml b/src/UI/CherryPick.xaml
index 5cc0f258..2b0b4ec0 100644
--- a/src/UI/CherryPick.xaml
+++ b/src/UI/CherryPick.xaml
@@ -20,15 +20,15 @@
-
+
-
+
-
+
@@ -38,8 +38,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/UI/Clone.xaml b/src/UI/Clone.xaml
index 9ba6304f..24691f98 100644
--- a/src/UI/Clone.xaml
+++ b/src/UI/Clone.xaml
@@ -24,12 +24,12 @@
-
+
-
+
+ helpers:TextBoxHelper.Placeholder="{StaticResource Text.Clone.RemoteURL.Placeholder}">
@@ -39,7 +39,7 @@
-
+
@@ -49,7 +49,7 @@
+ helpers:TextBoxHelper.Placeholder="{StaticResource Text.Clone.RemoteFolder.Placeholder}">
@@ -63,19 +63,19 @@
-
+
-
+
@@ -87,8 +87,8 @@
-
-
+
+
diff --git a/src/UI/Clone.xaml.cs b/src/UI/Clone.xaml.cs
index 8293853b..c3debd0a 100644
--- a/src/UI/Clone.xaml.cs
+++ b/src/UI/Clone.xaml.cs
@@ -49,7 +49,7 @@ namespace SourceGit.UI {
///
///
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;
});
}
diff --git a/src/UI/CommitViewer.xaml b/src/UI/CommitViewer.xaml
index 6c041649..845df1ff 100644
--- a/src/UI/CommitViewer.xaml
+++ b/src/UI/CommitViewer.xaml
@@ -32,7 +32,7 @@
-
+
@@ -68,7 +68,7 @@
-
+
@@ -95,7 +95,7 @@
-
+
@@ -122,7 +122,7 @@
-
+
-
+
@@ -144,7 +144,7 @@
@@ -153,7 +153,7 @@
-
+
@@ -202,7 +202,7 @@
-
+
-
-
+
+
-
+
@@ -298,12 +298,12 @@
-
+
@@ -400,7 +400,7 @@
-
+
@@ -456,7 +456,7 @@
-
+
diff --git a/src/UI/CommitViewer.xaml.cs b/src/UI/CommitViewer.xaml.cs
index 95411d0a..3121fd10 100644
--- a/src/UI/CommitViewer.xaml.cs
+++ b/src/UI/CommitViewer.xaml.cs
@@ -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);
};
diff --git a/src/UI/Configure.xaml b/src/UI/Configure.xaml
index 8bd23ef3..368874ee 100644
--- a/src/UI/Configure.xaml
+++ b/src/UI/Configure.xaml
@@ -27,25 +27,25 @@
-
-
+
+
-
+ helpers:TextBoxHelper.Placeholder="{StaticResource Text.Configure.User.Placeholder}"/>
+
+ helpers:TextBoxHelper.Placeholder="{StaticResource Text.Configure.Email.Placeholder}"/>
-
-
+
+
-
-
+
+
diff --git a/src/UI/CreateBranch.xaml b/src/UI/CreateBranch.xaml
index f9329d34..54a4a2d7 100644
--- a/src/UI/CreateBranch.xaml
+++ b/src/UI/CreateBranch.xaml
@@ -29,20 +29,20 @@
-
+
-
+
-
+
+ helpers:TextBoxHelper.Placeholder="{StaticResource Text.CreateBranch.Name.Placeholder}">
@@ -52,17 +52,17 @@
-
+
-
-
+
+
+ Content="{StaticResource Text.CreateBranch.Checkout}"/>
@@ -72,8 +72,8 @@
-
-
+
+
diff --git a/src/UI/CreateTag.xaml b/src/UI/CreateTag.xaml
index 874c2c29..5467c7c6 100644
--- a/src/UI/CreateTag.xaml
+++ b/src/UI/CreateTag.xaml
@@ -23,19 +23,19 @@
-
+
-
+
-
+
+ helpers:TextBoxHelper.Placeholder="{StaticResource Text.CreateTag.Name.Placeholder}">
@@ -45,13 +45,13 @@
-
+
@@ -62,8 +62,8 @@
-
-
+
+
diff --git a/src/UI/CreateTag.xaml.cs b/src/UI/CreateTag.xaml.cs
index 36f2eaef..44c1c648 100644
--- a/src/UI/CreateTag.xaml.cs
+++ b/src/UI/CreateTag.xaml.cs
@@ -42,11 +42,6 @@ namespace SourceGit.UI {
///
///
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;
diff --git a/src/UI/Dashboard.xaml b/src/UI/Dashboard.xaml
index d1f9ef78..e75339f1 100644
--- a/src/UI/Dashboard.xaml
+++ b/src/UI/Dashboard.xaml
@@ -46,17 +46,17 @@
-
+
-
+
-
+
-
+
@@ -66,47 +66,47 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -143,7 +143,7 @@
-
+
-
+
@@ -166,7 +166,7 @@
-
+
@@ -181,7 +181,7 @@
-
+
@@ -198,11 +198,11 @@
-
-
+
+
-
+
@@ -245,7 +245,7 @@
Checked="FilterChanged"
Unchecked="FilterChanged"
Style="{StaticResource Style.ToggleButton.Filter}"
- ToolTip="FILTER"/>
+ ToolTip="{StaticResource Text.Filter}"/>
@@ -280,8 +280,8 @@
-
-
+
+
@@ -333,7 +333,7 @@
Checked="FilterChanged"
Unchecked="FilterChanged"
Style="{StaticResource Style.ToggleButton.Filter}"
- ToolTip="FILTER"/>
+ ToolTip="{StaticResource Text.Filter}"/>
@@ -369,8 +369,8 @@
-
-
+
+
@@ -416,7 +416,7 @@
Checked="FilterChanged"
Unchecked="FilterChanged"
Style="{StaticResource Style.ToggleButton.Filter}"
- ToolTip="FILTER"/>
+ ToolTip="{StaticResource Text.Filter}"/>
@@ -440,11 +440,11 @@
-
-
+
+
-
+
@@ -508,7 +508,7 @@
-
+
-
-
+
+
diff --git a/src/UI/Dashboard.xaml.cs b/src/UI/Dashboard.xaml.cs
index fdd65ffe..2bc1b05f 100644
--- a/src/UI/Dashboard.xaml.cs
+++ b/src/UI/Dashboard.xaml.cs
@@ -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;
diff --git a/src/UI/DeleteBranch.xaml b/src/UI/DeleteBranch.xaml
index f7da0af7..246d8cc8 100644
--- a/src/UI/DeleteBranch.xaml
+++ b/src/UI/DeleteBranch.xaml
@@ -2,8 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:SourceGit.UI"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="160" d:DesignWidth="500" Height="128" Width="500">
@@ -20,9 +19,9 @@
-
+
-
+
@@ -36,8 +35,8 @@
-
-
+
+
diff --git a/src/UI/DeleteRemote.xaml b/src/UI/DeleteRemote.xaml
index 4e518edd..e40bc79b 100644
--- a/src/UI/DeleteRemote.xaml
+++ b/src/UI/DeleteRemote.xaml
@@ -19,9 +19,9 @@
-
+
-
+
@@ -35,8 +35,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/UI/DeleteTag.xaml b/src/UI/DeleteTag.xaml
index 2e52af58..71d8bf8b 100644
--- a/src/UI/DeleteTag.xaml
+++ b/src/UI/DeleteTag.xaml
@@ -20,15 +20,15 @@
-
+
-
+
-
+
@@ -38,8 +38,8 @@
-
-
+
+
diff --git a/src/UI/DiffViewer.xaml b/src/UI/DiffViewer.xaml
index aed8631a..5abe1585 100644
--- a/src/UI/DiffViewer.xaml
+++ b/src/UI/DiffViewer.xaml
@@ -49,18 +49,18 @@
-
+
-
+
@@ -79,7 +79,7 @@
-
+
@@ -88,13 +88,13 @@
-
+
-
+
-
+
@@ -103,14 +103,14 @@
-
+
-
+
diff --git a/src/UI/DiffViewer.xaml.cs b/src/UI/DiffViewer.xaml.cs
index cf65d767..0df44b5e 100644
--- a/src/UI/DiffViewer.xaml.cs
+++ b/src/UI/DiffViewer.xaml.cs
@@ -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;
diff --git a/src/UI/Discard.xaml b/src/UI/Discard.xaml
index 4fad830d..5720e084 100644
--- a/src/UI/Discard.xaml
+++ b/src/UI/Discard.xaml
@@ -2,8 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:SourceGit.UI"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="160" d:DesignWidth="500" Height="160" Width="500">
@@ -21,15 +20,15 @@
-
+
-
+
-
+
-
+
@@ -39,8 +38,8 @@
-
-
+
+
diff --git a/src/UI/Discard.xaml.cs b/src/UI/Discard.xaml.cs
index 5404bd94..0d6a7d3f 100644
--- a/src/UI/Discard.xaml.cs
+++ b/src/UI/Discard.xaml.cs
@@ -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);
}
}
diff --git a/src/UI/Fetch.xaml b/src/UI/Fetch.xaml
index a10b33ba..7fbe9643 100644
--- a/src/UI/Fetch.xaml
+++ b/src/UI/Fetch.xaml
@@ -27,9 +27,9 @@
-
+
-
+
@@ -44,12 +44,12 @@
+ Content="{StaticResource Text.Fetch.AllRemotes}"/>
+ Content="{StaticResource Text.Fetch.Prune}"/>
@@ -59,8 +59,8 @@
-
-
+
+
diff --git a/src/UI/FileHistories.xaml b/src/UI/FileHistories.xaml
index 675948b4..3363a2ed 100644
--- a/src/UI/FileHistories.xaml
+++ b/src/UI/FileHistories.xaml
@@ -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">
@@ -54,7 +53,7 @@
Fill="{StaticResource Brush.Logo}"
WindowChrome.IsHitTestVisibleInChrome="True"
MouseLeftButtonDown="LogoMouseButtonDown"/>
-
+
diff --git a/src/UI/FilesDisplayModeSwitch.xaml b/src/UI/FilesDisplayModeSwitch.xaml
index d1eac590..68e3f7e6 100644
--- a/src/UI/FilesDisplayModeSwitch.xaml
+++ b/src/UI/FilesDisplayModeSwitch.xaml
@@ -18,22 +18,22 @@
-
+
-
diff --git a/src/UI/GitFlowFinishBranch.xaml b/src/UI/GitFlowFinishBranch.xaml
index 7b1bd662..052c4d0c 100644
--- a/src/UI/GitFlowFinishBranch.xaml
+++ b/src/UI/GitFlowFinishBranch.xaml
@@ -35,8 +35,8 @@
-
-
+
+
diff --git a/src/UI/GitFlowFinishBranch.xaml.cs b/src/UI/GitFlowFinishBranch.xaml.cs
index cfbab6d1..8bfc3965 100644
--- a/src/UI/GitFlowFinishBranch.xaml.cs
+++ b/src/UI/GitFlowFinishBranch.xaml.cs
@@ -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();
diff --git a/src/UI/GitFlowSetup.xaml b/src/UI/GitFlowSetup.xaml
index 616eab54..875463d9 100644
--- a/src/UI/GitFlowSetup.xaml
+++ b/src/UI/GitFlowSetup.xaml
@@ -26,21 +26,21 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
@@ -52,8 +52,8 @@
-
-
+
+
diff --git a/src/UI/GitFlowSetup.xaml.cs b/src/UI/GitFlowSetup.xaml.cs
index 8b9ae8db..5574ab22 100644
--- a/src/UI/GitFlowSetup.xaml.cs
+++ b/src/UI/GitFlowSetup.xaml.cs
@@ -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;
}
diff --git a/src/UI/GitFlowStartBranch.xaml b/src/UI/GitFlowStartBranch.xaml
index 472b56d2..65ee7fb3 100644
--- a/src/UI/GitFlowStartBranch.xaml
+++ b/src/UI/GitFlowStartBranch.xaml
@@ -24,7 +24,7 @@
-
+
@@ -42,8 +42,8 @@
-
-
+
+
diff --git a/src/UI/GitFlowStartBranch.xaml.cs b/src/UI/GitFlowStartBranch.xaml.cs
index 8d602ccb..6b710d52 100644
--- a/src/UI/GitFlowStartBranch.xaml.cs
+++ b/src/UI/GitFlowStartBranch.xaml.cs
@@ -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;
diff --git a/src/UI/Histories.xaml b/src/UI/Histories.xaml
index a35c8800..08756556 100644
--- a/src/UI/Histories.xaml
+++ b/src/UI/Histories.xaml
@@ -38,12 +38,12 @@
-
+
-
+
-
+
@@ -191,7 +191,7 @@
@@ -204,13 +204,14 @@
Fill="{StaticResource Brush.FG1}">
-
-
-
-
+
+
+
+
+
-
+
diff --git a/src/UI/Histories.xaml.cs b/src/UI/Histories.xaml.cs
index b6d9ec20..8ac0f227 100644
--- a/src/UI/Histories.xaml.cs
+++ b/src/UI/Histories.xaml.cs
@@ -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}",
diff --git a/src/UI/Init.xaml b/src/UI/Init.xaml
index fd644564..60ea1d96 100644
--- a/src/UI/Init.xaml
+++ b/src/UI/Init.xaml
@@ -20,15 +20,15 @@
-
+
-
+
-
+
@@ -38,8 +38,8 @@
-
-
+
+
diff --git a/src/UI/InteractiveRebase.xaml b/src/UI/InteractiveRebase.xaml
index ace1a269..df640a99 100644
--- a/src/UI/InteractiveRebase.xaml
+++ b/src/UI/InteractiveRebase.xaml
@@ -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">
@@ -56,7 +56,7 @@
Fill="{StaticResource Brush.Logo}"
WindowChrome.IsHitTestVisibleInChrome="True"
MouseLeftButtonDown="LogoMouseButtonDown"/>
-
+
@@ -161,11 +161,11 @@
Grid.Column="4"
Orientation="Horizontal"
Margin="4,0">
-
+
-
+
@@ -211,17 +211,17 @@
-
+
-
+
-
-
+
+
diff --git a/src/UI/Launcher.xaml b/src/UI/Launcher.xaml
index 56545384..fe55f0c5 100644
--- a/src/UI/Launcher.xaml
+++ b/src/UI/Launcher.xaml
@@ -67,7 +67,7 @@
-
+