i18n: standardise messages
Standardise messages in order to save translators some work. Nuances fixed in this commit: "failed to read %s" "read of %s failed" "detach the HEAD at named commit" "detach HEAD at named commit" "removing '%s' failed" "failed to remove '%s'" "index file corrupt" "corrupt index file" "failed to read %s" "read of %s failed" "detach the HEAD at named commit" "detach HEAD at named commit" Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Vasco Almeida committed
Jun 17, 2016 at 20:21 UTC
e923a8abe9b9e1ada28153160fb86a144162b06e
3 files changed
+7
-7
builtin/apply.c
+3
-3
@@ -3226,7 +3226,7 @@ static int load_patch_target(struct strbuf *buf,
3226
{
3227
if (cached || check_index) {
3228
if (read_file_or_gitlink(ce, buf))
3229
- return error(_("read of %s failed"), name);
3229
+ return error(_("failed to read %s"), name);
3230
} else if (name) {
3231
if (S_ISGITLINK(expected_mode)) {
3232
if (ce)
@@ -3237,7 +3237,7 @@ static int load_patch_target(struct strbuf *buf,
3237
return error(_("reading from '%s' beyond a symbolic link"), name);
3238
} else {
3239
if (read_old_data(st, name, buf))
3240
- return error(_("read of %s failed"), name);
3240
+ return error(_("failed to read %s"), name);
3241
}
3242
}
3243
return 0;
@@ -3282,7 +3282,7 @@ static int load_preimage(struct image *image,
3282
free_fragment_list(patch->fragments);
3283
patch->fragments = NULL;
3284
} else if (status) {
3285
- return error(_("read of %s failed"), patch->old_name);
3285
+ return error(_("failed to read %s"), patch->old_name);
3286
}
3287
}
3288
builtin/checkout.c
+3
-3
@@ -276,7 +276,7 @@ static int checkout_paths(const struct checkout_opts *opts,
276
277
hold_locked_index(lock_file, 1);
278
if (read_cache_preload(&opts->pathspec) < 0)
279
- return error(_("corrupt index file"));
279
+ return error(_("index file corrupt"));
280
281
if (opts->source_tree)
282
read_tree_some(opts->source_tree, &opts->pathspec);
@@ -470,7 +470,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
470
471
hold_locked_index(lock_file, 1);
472
if (read_cache_preload(NULL) < 0)
473
- return error(_("corrupt index file"));
473
+ return error(_("index file corrupt"));
474
475
resolve_undo_clear();
476
if (opts->force) {
@@ -1138,7 +1138,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
1138
OPT_STRING('B', NULL, &opts.new_branch_force, N_("branch"),
1139
N_("create/reset and checkout a branch")),
1140
OPT_BOOL('l', NULL, &opts.new_branch_log, N_("create reflog for new branch")),
1141
- OPT_BOOL(0, "detach", &opts.force_detach, N_("detach the HEAD at named commit")),
1141
+ OPT_BOOL(0, "detach", &opts.force_detach, N_("detach HEAD at named commit")),
1142
OPT_SET_INT('t', "track", &opts.track, N_("set upstream info for new branch"),
1143
BRANCH_TRACK_EXPLICIT),
1144
OPT_STRING(0, "orphan", &opts.new_orphan_branch, N_("new-branch"), N_("new unparented branch")),
builtin/repack.c
+1
-1
@@ -378,7 +378,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
378
item->string,
379
exts[ext].name);
380
if (remove_path(fname))
381
- warning(_("removing '%s' failed"), fname);
381
+ warning(_("failed to remove '%s'"), fname);
382
free(fname);
383
}
384
}