Skip to content

Commit 6472028

Browse files
keszybzgitster
authored andcommitted
i18n: mark @{upstream} error messages for translation
Signed-off-by: Zbigniew Jędrzejewski-Szmek <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 17c8221 commit 6472028

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

sha1_name.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -861,15 +861,15 @@ int interpret_branch_name(const char *name, struct strbuf *buf)
861861
* points to something different than a branch.
862862
*/
863863
if (!upstream)
864-
return error("HEAD does not point to a branch");
864+
return error(_("HEAD does not point to a branch"));
865865
if (!upstream->merge || !upstream->merge[0]->dst) {
866866
if (!ref_exists(upstream->refname))
867-
return error("No such branch: '%s'", cp);
867+
return error(_("No such branch: '%s'"), cp);
868868
if (!upstream->merge)
869-
return error("No upstream configured for branch '%s'",
869+
return error(_("No upstream configured for branch '%s'"),
870870
upstream->name);
871871
return error(
872-
"Upstream branch '%s' not stored as a remote-tracking branch",
872+
_("Upstream branch '%s' not stored as a remote-tracking branch"),
873873
upstream->merge[0]->src);
874874
}
875875
free(cp);

t/t1507-rev-parse-upstream.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ test_expect_success 'branch@{u} error message when no upstream' '
129129
fatal: Needed a single revision
130130
EOF
131131
error_message non-tracking@{u} 2>actual &&
132-
test_cmp expect actual
132+
test_i18ncmp expect actual
133133
'
134134

135135
test_expect_success '@{u} error message when no upstream' '
@@ -138,7 +138,7 @@ test_expect_success '@{u} error message when no upstream' '
138138
fatal: Needed a single revision
139139
EOF
140140
test_must_fail git rev-parse --verify @{u} 2>actual &&
141-
test_cmp expect actual
141+
test_i18ncmp expect actual
142142
'
143143

144144
test_expect_success 'branch@{u} error message with misspelt branch' '
@@ -147,7 +147,7 @@ test_expect_success 'branch@{u} error message with misspelt branch' '
147147
fatal: Needed a single revision
148148
EOF
149149
error_message no-such-branch@{u} 2>actual &&
150-
test_cmp expect actual
150+
test_i18ncmp expect actual
151151
'
152152

153153
test_expect_success '@{u} error message when not on a branch' '
@@ -157,7 +157,7 @@ test_expect_success '@{u} error message when not on a branch' '
157157
EOF
158158
git checkout HEAD^0 &&
159159
test_must_fail git rev-parse --verify @{u} 2>actual &&
160-
test_cmp expect actual
160+
test_i18ncmp expect actual
161161
'
162162

163163
test_expect_success 'branch@{u} error message if upstream branch not fetched' '
@@ -166,7 +166,7 @@ test_expect_success 'branch@{u} error message if upstream branch not fetched' '
166166
fatal: Needed a single revision
167167
EOF
168168
error_message bad-upstream@{u} 2>actual &&
169-
test_cmp expect actual
169+
test_i18ncmp expect actual
170170
'
171171

172172
test_expect_success 'pull works when tracking a local branch' '

0 commit comments

Comments
 (0)