diff mbox series

[v10,07/12] merge-index i18n: mark die() messages for translation

Message ID patch-v10-07.12-de4d11798db-20221215T084803Z-avarab@gmail.com (mailing list archive)
State New, archived
Headers show
Series merge-index: prepare to rewrite merge drivers in C | expand

Commit Message

Ævar Arnfjörð Bjarmason Dec. 15, 2022, 8:52 a.m. UTC
Mark the die() messages for translation with _(). We don't rely on the
specifics of these messages as plumbing, so they can be safely
translated.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/merge-index.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/builtin/merge-index.c b/builtin/merge-index.c
index 2dc789fb787..4d91e7ea122 100644
--- a/builtin/merge-index.c
+++ b/builtin/merge-index.c
@@ -16,7 +16,7 @@  static int merge_entry(int pos, const char *path)
 	struct child_process cmd = CHILD_PROCESS_INIT;
 
 	if (pos >= the_index.cache_nr)
-		die("'%s' is not in the cache", path);
+		die(_("'%s' is not in the cache"), path);
 	found = 0;
 	do {
 		const struct cache_entry *ce = the_index.cache[pos];
@@ -31,7 +31,7 @@  static int merge_entry(int pos, const char *path)
 		arguments[stage + 4] = ownbuf[stage];
 	} while (++pos < the_index.cache_nr);
 	if (!found)
-		die("'%s' is not in the cache", path);
+		die(_("'%s' is not in the cache"), path);
 
 	strvec_pushv(&cmd.args, arguments);
 	if (run_command(&cmd)) {
@@ -39,7 +39,7 @@  static int merge_entry(int pos, const char *path)
 			err++;
 		else {
 			if (!quiet)
-				die("merge program failed");
+				die(_("merge program failed"));
 			exit(1);
 		}
 	}
@@ -130,6 +130,6 @@  int cmd_merge_index(int argc, const char **argv, const char *prefix)
 			merge_one_path(argv[i]);
 
 	if (err && !quiet)
-		die("merge program failed");
+		die(_("merge program failed"));
 	return err;
 }