Skip to content

Commit 01175ba

Browse files
committed
fix: use translatable strings for git branch status labels
1 parent 81af784 commit 01175ba

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/extensions/default/Git/src/Branch.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ define(function (require, exports) {
479479

480480
$gitBranchName
481481
.off("click")
482-
.text("not a git repo");
483-
Panel.setBranchName("not a git repo", "");
482+
.text(Strings.GIT_NOT_A_REPO);
483+
Panel.setBranchName(Strings.GIT_NOT_A_REPO, "");
484484
$("#git-panel .git-panel-branch").removeClass("clickable").off("click");
485485
Panel.disable("not-repo");
486486

@@ -539,8 +539,8 @@ define(function (require, exports) {
539539
if (ErrorHandler.contains(ex, "unknown revision")) {
540540
$gitBranchName
541541
.off("click")
542-
.text("no branch");
543-
Panel.setBranchName("no branch", "");
542+
.text(Strings.GIT_NO_BRANCH);
543+
Panel.setBranchName(Strings.GIT_NO_BRANCH, "");
544544
$("#git-panel .git-panel-branch").removeClass("clickable").off("click");
545545
Panel.enable();
546546
} else {

src/nls/root/strings.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,6 +2150,8 @@ define({
21502150
"GIT_COMMIT": "Git commit\u2026",
21512151
"GIT_COMMIT_IN_PROGRESS": "Git Commit in Progress",
21522152
"GIT_DIFF": "Git diff —",
2153+
"GIT_NO_BRANCH": "no branch",
2154+
"GIT_NOT_A_REPO": "not a git repo",
21532155
"GIT_PULL_RESPONSE": "Git Pull response",
21542156
"GIT_PUSH_RESPONSE": "Git Push response",
21552157
"GIT_REMOTES": "Git remotes",

0 commit comments

Comments
 (0)