git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 15/23] object.c: mark more strings for translation

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Jun 30, 2018, 09:08 UTC
Message-ID
<20180630090818.28937-16-pclouds@gmail.com>
In-Reply-To
<20180630090818.28937-1-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 object.c        | 10 +++++-----
 t/t1450-fsck.sh |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/object.c b/object.c
index 10d167825e..477e686da7 100644
--- a/object.c
+++ b/object.c
@@ -49,7 +49,7 @@ int type_from_string_gently(const char *str, ssize_t len, int gentle)
 	if (gentle)
 		return -1;
 
-	die("invalid object type \"%s\"", str);
+	die(_("invalid object type \"%s\""), str);
 }
 
 /*
@@ -169,7 +169,7 @@ void *object_as_type(struct object *obj, enum object_type type, int quiet)
 	}
 	else {
 		if (!quiet)
-			error("object %s is a %s, not a %s",
+			error(_("object %s is a %s, not a %s"),
 			      oid_to_hex(&obj->oid),
 			      type_name(obj->type), type_name(type));
 		return NULL;
@@ -229,7 +229,7 @@ struct object *parse_object_buffer(const struct object_id *oid, enum object_type
 			obj = &tag->object;
 		}
 	} else {
-		warning("object %s has unknown type id %d", oid_to_hex(oid), type);
+		warning(_("object %s has unknown type id %d"), oid_to_hex(oid), type);
 		obj = NULL;
 	}
 	return obj;
@@ -262,7 +262,7 @@ struct object *parse_object(const struct object_id *oid)
 	    (!obj && has_object_file(oid) &&
 	     oid_object_info(the_repository, oid, NULL) == OBJ_BLOB)) {
 		if (check_object_signature(repl, NULL, 0, NULL) < 0) {
-			error("sha1 mismatch %s", oid_to_hex(oid));
+			error(_("sha1 mismatch %s"), oid_to_hex(oid));
 			return NULL;
 		}
 		parse_blob_buffer(lookup_blob(oid), NULL, 0);
@@ -273,7 +273,7 @@ struct object *parse_object(const struct object_id *oid)
 	if (buffer) {
 		if (check_object_signature(repl, buffer, size, type_name(type)) < 0) {
 			free(buffer);
-			error("sha1 mismatch %s", oid_to_hex(repl));
+			error(_("sha1 mismatch %s"), oid_to_hex(repl));
 			return NULL;
 		}
 
diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
index 91fd71444d..7b7602ddb4 100755
--- a/t/t1450-fsck.sh
+++ b/t/t1450-fsck.sh
@@ -372,7 +372,7 @@ test_expect_success 'rev-list --verify-objects with bad sha1' '
 
 	test_might_fail git rev-list --verify-objects refs/heads/bogus >/dev/null 2>out &&
 	cat out &&
-	grep -q "error: sha1 mismatch 63ffffffffffffffffffffffffffffffffffffff" out
+	test_i18ngrep -q "error: sha1 mismatch 63ffffffffffffffffffffffffffffffffffffff" out
 '
 
 test_expect_success 'force fsck to ignore double author' '
-- 
2.18.0.rc2.476.g39500d3211
Previous: Derrick StoleeNext: Nguyễn Thái Ngọc Duy
Message 14 of 29 in “Mark strings for translation”
  1. 00/23 Mark strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  2. 01/23 Update messages in preparation for i18nNguyễn Thái Ngọc Duy, Jun 30, 2018
  3. 03/23 archive-zip.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  4. 02/23 archive-tar.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  5. 04/23 builtin/config.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  6. Elijah NewrenJul 1, 2018
  7. 05/23 builtin/grep.c: mark strings for translation and no full stopsNguyễn Thái Ngọc Duy, Jun 30, 2018
  8. 06/23 builtin/pack-objects.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  9. Elijah NewrenJul 1, 2018
  10. 07/23 builtin/replace.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  11. Elijah NewrenJul 1, 2018
  12. 08/23 commit-graph.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  13. Derrick StoleeJul 2, 2018
  14. 15/23 object.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  15. 17/23 refs.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  16. 16/23 pkt-line.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  17. 19/23 replace-object.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  18. 18/23 refspec.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  19. 14/23 exec-cmd.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  20. 13/23 environment.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  21. 12/23 dir.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  22. 11/23 convert.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  23. 10/23 connect.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  24. 09/23 config.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  25. Elijah NewrenJul 1, 2018
  26. 20/23 sequencer.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  27. 21/23 sha1-file.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  28. 22/23 transport.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018
  29. 23/23 transport-helper.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 30, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.