From: Junio C Hamano <gitster@pobox.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH 09/22] credential-cache--daemon.c: mark strings for translation
Date: Mon, 29 Feb 2016 10:30:31 -0800 [thread overview]
Message-ID: <xmqq1t7vcqt4.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1456555333-5853-10-git-send-email-pclouds@gmail.com> ("Nguyễn Thái Ngọc Duy"'s message of "Sat, 27 Feb 2016 13:42:00 +0700")
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
All (or at least most of) these look old ones. I'm inclined to say
we should do the whole thing post 2.8.0 release for this file.
> credential-cache--daemon.c | 34 +++++++++++++++++-----------------
> 1 file changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/credential-cache--daemon.c b/credential-cache--daemon.c
> index 63ca7c8..ab33355 100644
> --- a/credential-cache--daemon.c
> +++ b/credential-cache--daemon.c
> @@ -98,12 +98,12 @@ static int read_request(FILE *fh, struct credential *c,
>
> strbuf_getline_lf(&item, fh);
> if (!skip_prefix(item.buf, "action=", &p))
> - return error("client sent bogus action line: %s", item.buf);
> + return error(_("client sent bogus action line: %s"), item.buf);
> strbuf_addstr(action, p);
>
> strbuf_getline_lf(&item, fh);
> if (!skip_prefix(item.buf, "timeout=", &p))
> - return error("client sent bogus timeout line: %s", item.buf);
> + return error(_("client sent bogus timeout line: %s"), item.buf);
> *timeout = atoi(p);
>
> if (credential_read(c, fh) < 0)
> @@ -132,16 +132,16 @@ static void serve_one_client(FILE *in, FILE *out)
> remove_credential(&c);
> else if (!strcmp(action.buf, "store")) {
> if (timeout < 0)
> - warning("cache client didn't specify a timeout");
> + warning(_("cache client didn't specify a timeout"));
> else if (!c.username || !c.password)
> - warning("cache client gave us a partial credential");
> + warning(_("cache client gave us a partial credential"));
> else {
> remove_credential(&c);
> cache_credential(&c, timeout);
> }
> }
> else
> - warning("cache client sent unknown action: %s", action.buf);
> + warning(_("cache client sent unknown action: %s"), action.buf);
>
> credential_clear(&c);
> strbuf_release(&action);
> @@ -160,7 +160,7 @@ static int serve_cache_loop(int fd)
> pfd.events = POLLIN;
> if (poll(&pfd, 1, 1000 * wakeup) < 0) {
> if (errno != EINTR)
> - die_errno("poll failed");
> + die_errno(_("poll failed"));
> return 1;
> }
>
> @@ -170,12 +170,12 @@ static int serve_cache_loop(int fd)
>
> client = accept(fd, NULL, NULL);
> if (client < 0) {
> - warning("accept failed: %s", strerror(errno));
> + warning(_("accept failed: %s"), strerror(errno));
> return 1;
> }
> client2 = dup(client);
> if (client2 < 0) {
> - warning("dup failed: %s", strerror(errno));
> + warning(_("dup failed: %s"), strerror(errno));
> close(client);
> return 1;
> }
> @@ -195,13 +195,13 @@ static void serve_cache(const char *socket_path, int debug)
>
> fd = unix_stream_listen(socket_path);
> if (fd < 0)
> - die_errno("unable to bind to '%s'", socket_path);
> + die_errno(_("unable to bind to '%s'"), socket_path);
>
> printf("ok\n");
> fclose(stdout);
> if (!debug) {
> if (!freopen("/dev/null", "w", stderr))
> - die_errno("unable to point stderr to /dev/null");
> + die_errno(_("unable to point stderr to /dev/null"));
> }
>
> while (serve_cache_loop(fd))
> @@ -211,10 +211,10 @@ static void serve_cache(const char *socket_path, int debug)
> }
>
> static const char permissions_advice[] =
> -"The permissions on your socket directory are too loose; other\n"
> +N_("The permissions on your socket directory are too loose; other\n"
> "users may be able to read your cached credentials. Consider running:\n"
> "\n"
> -" chmod 0700 %s";
> +" chmod 0700 %s");
> static void init_socket_directory(const char *path)
> {
> struct stat st;
> @@ -223,7 +223,7 @@ static void init_socket_directory(const char *path)
>
> if (!stat(dir, &st)) {
> if (st.st_mode & 077)
> - die(permissions_advice, dir);
> + die(_(permissions_advice), dir);
> } else {
> /*
> * We must be sure to create the directory with the correct mode,
> @@ -232,9 +232,9 @@ static void init_socket_directory(const char *path)
> * our protected socket.
> */
> if (safe_create_leading_directories_const(dir) < 0)
> - die_errno("unable to create directories for '%s'", dir);
> + die_errno(_("unable to create directories for '%s'"), dir);
> if (mkdir(dir, 0700) < 0)
> - die_errno("unable to mkdir '%s'", dir);
> + die_errno(_("unable to mkdir '%s'"), dir);
> }
>
> if (chdir(dir))
> @@ -253,7 +253,7 @@ int main(int argc, const char **argv)
> const char *socket_path;
> int ignore_sighup = 0;
> static const char *usage[] = {
> - "git-credential-cache--daemon [opts] <socket_path>",
> + N_("git-credential-cache--daemon [opts] <socket_path>"),
> NULL
> };
> int debug = 0;
> @@ -274,7 +274,7 @@ int main(int argc, const char **argv)
> usage_with_options(usage, options);
>
> if (!is_absolute_path(socket_path))
> - die("socket directory must be an absolute path");
> + die(_("socket directory must be an absolute path"));
>
> init_socket_directory(socket_path);
> register_tempfile(&socket_file, socket_path);
next prev parent reply other threads:[~2016-02-29 18:30 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-27 6:41 [PATCH 00/22] Mark more strings for translation Nguyễn Thái Ngọc Duy
2016-02-27 6:41 ` [PATCH 01/22] credential-cache--daemon: enable localized messages Nguyễn Thái Ngọc Duy
2016-02-27 6:41 ` [PATCH 02/22] builtin/blame.c: mark strings for translation Nguyễn Thái Ngọc Duy
2016-02-28 18:57 ` Junio C Hamano
2016-02-29 0:33 ` Duy Nguyen
2016-02-29 18:22 ` Junio C Hamano
2016-02-27 6:41 ` [PATCH 03/22] builtin/checkout.c: " Nguyễn Thái Ngọc Duy
2016-02-28 19:00 ` Junio C Hamano
2016-02-27 6:41 ` [PATCH 04/22] builtin/clone.c: " Nguyễn Thái Ngọc Duy
2016-02-28 19:05 ` Junio C Hamano
2016-02-27 6:41 ` [PATCH 05/22] builtin/config.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:25 ` Junio C Hamano
2016-02-27 6:41 ` [PATCH 06/22] " Nguyễn Thái Ngọc Duy
2016-02-27 6:41 ` [PATCH 07/22] builtin/update-index.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:27 ` Junio C Hamano
2016-02-27 6:41 ` [PATCH 08/22] convert.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:29 ` Junio C Hamano
2016-02-27 6:42 ` [PATCH 09/22] credential-cache--daemon.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:30 ` Junio C Hamano [this message]
2016-02-27 6:42 ` [PATCH 10/22] http.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:31 ` Junio C Hamano
2016-02-27 6:42 ` [PATCH 11/22] ident.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:34 ` Junio C Hamano
2016-03-01 14:56 ` Jeff King
2016-02-27 6:42 ` [PATCH 12/22] notes.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:36 ` Junio C Hamano
2016-02-27 6:42 ` [PATCH 13/22] ref-filter.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:41 ` Junio C Hamano
2016-02-27 6:42 ` [PATCH 14/22] refs/files-backend.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:43 ` Junio C Hamano
2016-03-01 10:40 ` Duy Nguyen
2016-02-27 6:42 ` [PATCH 15/22] remote-curl.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:50 ` Junio C Hamano
2016-02-27 6:42 ` [PATCH 16/22] run-command.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:52 ` Junio C Hamano
2016-03-01 0:00 ` Stefan Beller
2016-02-27 6:42 ` [PATCH 17/22] sha1_file.c: " Nguyễn Thái Ngọc Duy
2016-02-27 6:42 ` [PATCH 18/22] submodule.c: " Nguyễn Thái Ngọc Duy
2016-02-27 6:42 ` [PATCH 19/22] trailer.c: " Nguyễn Thái Ngọc Duy
2016-02-29 18:55 ` Junio C Hamano
2016-02-27 6:42 ` [PATCH 20/22] transport-helper.c: mark strings for translating Nguyễn Thái Ngọc Duy
2016-02-27 6:42 ` [PATCH 21/22] transport.c: " Nguyễn Thái Ngọc Duy
2016-02-27 6:42 ` [PATCH 22/22] wrapper.c: mark strings for translation Nguyễn Thái Ngọc Duy
2016-02-27 17:34 ` [PATCH 00/22] Mark more " Junio C Hamano
2016-02-27 19:00 ` Junio C Hamano
2016-02-28 0:43 ` Duy Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq1t7vcqt4.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.