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

[PATCH 10/22] http.c: mark strings for translation

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Feb 27, 2016, 06:42 UTC
Message-ID
<1456555333-5853-11-git-send-email-pclouds@gmail.com>
In-Reply-To
<1456555333-5853-1-git-send-email-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 http.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/http.c b/http.c
index 1d5e3bb..d56cb52 100644
--- a/http.c
+++ b/http.c
@@ -404,7 +404,7 @@ static void init_curl_proxy_auth(CURL *result)
 			}
 		}
 		if (i == ARRAY_SIZE(proxy_authmethods)) {
-			warning("unsupported proxy authentication method %s: using anyauth",
+			warning(_("unsupported proxy authentication method %s: using anyauth"),
 					http_proxy_authmethod);
 			curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
 		}
@@ -445,7 +445,7 @@ static int sockopt_callback(void *client, curl_socket_t fd, curlsocktype type)
 
 	rc = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&ka, len);
 	if (rc < 0)
-		warning("unable to set SO_KEEPALIVE on socket %s",
+		warning(_("unable to set SO_KEEPALIVE on socket %s"),
 			strerror(errno));
 
 	return 0; /* CURL_SOCKOPT_OK only exists since curl 7.21.5 */
@@ -469,7 +469,7 @@ static CURL *get_curl_handle(void)
 	long allowed_protocols = 0;
 
 	if (!result)
-		die("curl_easy_init failed");
+		die(_("curl_easy_init failed"));
 
 	if (!curl_ssl_verify) {
 		curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 0);
@@ -503,7 +503,7 @@ static CURL *get_curl_handle(void)
 			}
 		}
 		if (i == ARRAY_SIZE(sslversions))
-			warning("unsupported ssl version %s: using default",
+			warning(_("unsupported ssl version %s: using default"),
 				ssl_version);
 	}
 
@@ -558,8 +558,8 @@ static CURL *get_curl_handle(void)
 	curl_easy_setopt(result, CURLOPT_REDIR_PROTOCOLS, allowed_protocols);
 #else
 	if (transport_restrict_protocols())
-		warning("protocol restrictions not applied to curl redirects because\n"
-			"your curl version is too old (>= 7.19.4)");
+		warning(_("protocol restrictions not applied to curl redirects because\n"
+			  "your curl version is too old (>= 7.19.4)"));
 #endif
 
 	if (getenv("GIT_CURL_VERBOSE"))
@@ -659,7 +659,7 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
 	free(normalized_url);
 
 	if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK)
-		die("curl_global_init failed");
+		die(_("curl_global_init failed"));
 
 	http_proactive_auth = proactive_auth;
 
@@ -681,7 +681,7 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
 
 	curlm = curl_multi_init();
 	if (!curlm)
-		die("curl_multi_init failed");
+		die(_("curl_multi_init failed"));
 #endif
 
 	if (getenv("GIT_SSL_NO_VERIFY"))
@@ -1544,7 +1544,7 @@ static int http_get_file(const char *url, const char *filename,
 	strbuf_addf(&tmpfile, "%s.temp", filename);
 	result = fopen(tmpfile.buf, "a");
 	if (!result) {
-		error("Unable to open local file %s", tmpfile.buf);
+		error(_("Unable to open local file %s"), tmpfile.buf);
 		ret = HTTP_ERROR;
 		goto cleanup;
 	}
@@ -1601,7 +1601,7 @@ static char *fetch_pack_index(unsigned char *sha1, const char *base_url)
 	tmp = strbuf_detach(&buf, NULL);
 
 	if (http_get_file(url, tmp, NULL) != HTTP_OK) {
-		error("Unable to get pack index %s", url);
+		error(_("Unable to get pack index %s"), url);
 		free(tmp);
 		tmp = NULL;
 	}
@@ -1778,7 +1778,7 @@ struct http_pack_request *new_http_pack_request(
 		sha1_pack_name(target->sha1));
 	preq->packfile = fopen(preq->tmpfile, "a");
 	if (!preq->packfile) {
-		error("Unable to open local file %s for pack",
+		error(_("Unable to open local file %s for pack"),
 		      preq->tmpfile);
 		goto abort;
 	}
@@ -1866,7 +1866,7 @@ struct http_object_request *new_http_object_request(const char *base_url,
 	unlink_or_warn(freq->tmpfile);
 
 	if (freq->localfile != -1)
-		error("fd leakage in start: %d", freq->localfile);
+		error(_("fd leakage in start: %d"), freq->localfile);
 	freq->localfile = open(freq->tmpfile,
 			       O_WRONLY | O_CREAT | O_EXCL, 0666);
 	/*
@@ -1885,7 +1885,7 @@ struct http_object_request *new_http_object_request(const char *base_url,
 	}
 
 	if (freq->localfile < 0) {
-		error("Couldn't create temporary file %s: %s",
+		error(_("Couldn't create temporary file %s: %s"),
 		      freq->tmpfile, strerror(errno));
 		goto abort;
 	}
@@ -1931,7 +1931,7 @@ struct http_object_request *new_http_object_request(const char *base_url,
 			prev_posn = 0;
 			lseek(freq->localfile, 0, SEEK_SET);
 			if (ftruncate(freq->localfile, 0) < 0) {
-				error("Couldn't truncate temporary file %s: %s",
+				error(_("Couldn't truncate temporary file %s: %s"),
 					  freq->tmpfile, strerror(errno));
 				goto abort;
 			}
@@ -1985,7 +1985,7 @@ int finish_http_object_request(struct http_object_request *freq)
 	process_http_object_request(freq);
 
 	if (freq->http_code == 416) {
-		warning("requested range invalid; we may already have all the data.");
+		warning(_("requested range invalid; we may already have all the data."));
 	} else if (freq->curl_result != CURLE_OK) {
 		if (stat(freq->tmpfile, &st) == 0)
 			if (st.st_size == 0)
-- 
2.8.0.rc0.205.g7ec8cf1
Previous: Junio C HamanoNext: Junio C Hamano
Message 20 of 46 in “Mark more strings for translation”
  1. 00/22 Mark more strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  2. 01/22 credential-cache--daemon: enable localized messagesNguyễn Thái Ngọc Duy, Feb 27, 2016
  3. 02/22 builtin/blame.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  4. Junio C HamanoFeb 28, 2016
  5. Duy NguyenFeb 29, 2016
  6. Junio C HamanoFeb 29, 2016
  7. 03/22 builtin/checkout.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  8. Junio C HamanoFeb 28, 2016
  9. 04/22 builtin/clone.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  10. Junio C HamanoFeb 28, 2016
  11. 05/22 builtin/config.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  12. Junio C HamanoFeb 29, 2016
  13. 06/22 builtin/config.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  14. 07/22 builtin/update-index.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  15. Junio C HamanoFeb 29, 2016
  16. 08/22 convert.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  17. Junio C HamanoFeb 29, 2016
  18. 09/22 credential-cache--daemon.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  19. Junio C HamanoFeb 29, 2016
  20. 10/22 http.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  21. Junio C HamanoFeb 29, 2016
  22. 11/22 ident.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  23. Junio C HamanoFeb 29, 2016
  24. Jeff KingMar 1, 2016
  25. 12/22 notes.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  26. Junio C HamanoFeb 29, 2016
  27. 13/22 ref-filter.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  28. Junio C HamanoFeb 29, 2016
  29. 14/22 refs/files-backend.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  30. Junio C HamanoFeb 29, 2016
  31. Duy NguyenMar 1, 2016
  32. 15/22 remote-curl.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  33. Junio C HamanoFeb 29, 2016
  34. 16/22 run-command.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  35. Junio C HamanoFeb 29, 2016
  36. Stefan BellerMar 1, 2016
  37. 17/22 sha1_file.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  38. 18/22 submodule.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  39. 19/22 trailer.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  40. Junio C HamanoFeb 29, 2016
  41. 20/22 transport-helper.c: mark strings for translatingNguyễn Thái Ngọc Duy, Feb 27, 2016
  42. 21/22 transport.c: mark strings for translatingNguyễn Thái Ngọc Duy, Feb 27, 2016
  43. 22/22 wrapper.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  44. Junio C HamanoFeb 27, 2016
  45. Junio C HamanoFeb 27, 2016
  46. Duy NguyenFeb 28, 2016

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.