i18n: mark @{upstream} error messages for translation
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Zbigniew Jędrzejewski-Szmek committed
Apr 14, 2012 at 09:54 UTC
647202889397e775c294234ebd3df8b2c4473f0f
2 files changed
+9
-9
sha1_name.c
+4
-4
@@ -861,15 +861,15 @@ int interpret_branch_name(const char *name, struct strbuf *buf)
861
* points to something different than a branch.
862
*/
863
if (!upstream)
864
- return error("HEAD does not point to a branch");
864
+ return error(_("HEAD does not point to a branch"));
865
if (!upstream->merge || !upstream->merge[0]->dst) {
866
if (!ref_exists(upstream->refname))
867
- return error("No such branch: '%s'", cp);
867
+ return error(_("No such branch: '%s'"), cp);
868
if (!upstream->merge)
869
- return error("No upstream configured for branch '%s'",
869
+ return error(_("No upstream configured for branch '%s'"),
870
upstream->name);
871
return error(
872
- "Upstream branch '%s' not stored as a remote-tracking branch",
872
+ _("Upstream branch '%s' not stored as a remote-tracking branch"),
873
upstream->merge[0]->src);
874
}
875
free(cp);
t/t1507-rev-parse-upstream.sh
+5
-5
@@ -129,7 +129,7 @@ test_expect_success 'branch@{u} error message when no upstream' '
129
fatal: Needed a single revision
130
EOF
131
error_message non-tracking@{u} 2>actual &&
132
- test_cmp expect actual
132
+ test_i18ncmp expect actual
133
'
134
135
test_expect_success '@{u} error message when no upstream' '
@@ -138,7 +138,7 @@ test_expect_success '@{u} error message when no upstream' '
138
fatal: Needed a single revision
139
EOF
140
test_must_fail git rev-parse --verify @{u} 2>actual &&
141
- test_cmp expect actual
141
+ test_i18ncmp expect actual
142
'
143
144
test_expect_success 'branch@{u} error message with misspelt branch' '
@@ -147,7 +147,7 @@ test_expect_success 'branch@{u} error message with misspelt branch' '
147
fatal: Needed a single revision
148
EOF
149
error_message no-such-branch@{u} 2>actual &&
150
- test_cmp expect actual
150
+ test_i18ncmp expect actual
151
'
152
153
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' '
157
EOF
158
git checkout HEAD^0 &&
159
test_must_fail git rev-parse --verify @{u} 2>actual &&
160
- test_cmp expect actual
160
+ test_i18ncmp expect actual
161
'
162
163
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' '
166
fatal: Needed a single revision
167
EOF
168
error_message bad-upstream@{u} 2>actual &&
169
- test_cmp expect actual
169
+ test_i18ncmp expect actual
170
'
171
172
test_expect_success 'pull works when tracking a local branch' '