From c1312cd3af14f6fd63d6ea152a8f2f63b7181838 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Mon, 1 Jun 2015 15:50:05 +0200 Subject: messages: uniform error messages for index write Currently, we have different wordings for the same index write error message, which may be confusing to users and increases the risk of more severely different translated messages: builtin/add.c: die(_("Unable to write new index file")); builtin/apply.c: die(_("Unable to write new index file")); builtin/checkout.c: die(_("unable to write new index file")); builtin/checkout-index.c: die("Unable to write new index file"); builtin/clone.c: die(_("unable to write new index file")); builtin/commit.c: die(_("unable to create temporary index")); builtin/commit.c: die(_("unable to update temporary index file")); builtin/commit.c: die(_("unable to write index file")); builtin/commit.c: die(_("unable to write new_index file")); builtin/commit.c: die(_("unable to write new_index file")); builtin/commit.c: die(_("unable to write new_index file")); builtin/commit.c: die(_("unable to write temporary index file")); builtin/commit.c: "new_index file. Check that disk is not full and quota is\n" builtin/merge.c: return error(_("Unable to write index.")); builtin/mv.c: die(_("Unable to write new index file")); builtin/read-tree.c: die("unable to write new index file"); builtin/rm.c: die(_("Unable to write new index file")); builtin/update-index.c: die("Unable to write new index file"); merge.c: die(_("unable to write new index file")); merge-recursive.c: return error(_("Unable to write index.")); pack-write.c: die_errno("unable to create '%s'", index_name); rerere.c: die("Unable to write new index file"); sequencer.c: die(_("%s: Unable to write new index file"), action_name(opts)); test-scrap-cache-tree.c: die("unable to write index file"); Except for "checkout", "new index" always refers to the new state of the index file, which is extra confusing. "checkout" does not talk about "new work tree" (but "work tree") either. Therefore, word all of these as "unable to write index file" (by possibly omitting "new" or "new_", adjusting capitalization and punctuation, turning "create" into "write"), except for: * Leave "temporary" in place and add TRANSLATORS note. It may happen that the index file is writable but not the temporary one. * Leave pack-write.c alone. It is low level without l10n. Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- sequencer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sequencer.c') diff --git a/sequencer.c b/sequencer.c index c4f4b7d571..f8421a8d61 100644 --- a/sequencer.c +++ b/sequencer.c @@ -317,8 +317,9 @@ static int do_recursive_merge(struct commit *base, struct commit *next, if (active_cache_changed && write_locked_index(&the_index, &index_lock, COMMIT_LOCK)) - /* TRANSLATORS: %s will be "revert" or "cherry-pick" */ - die(_("%s: Unable to write new index file"), action_name(opts)); + /* TRANSLATORS: %s will be "revert" or "cherry-pick" + match this with "unable to write index file" */ + die(_("%s: unable to write index file"), action_name(opts)); rollback_lock_file(&index_lock); if (opts->signoff) -- cgit v1.2.1