All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Ævar Arnfjörð" <avarab@gmail.com>,
	"Jiang Xin" <worldhello.net@gmail.com>,
	"Jonathan Nieder" <jrnieder@gmail.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH i18n 06/11] i18n: make warn_dangling_symref() automatically append \n
Date: Mon, 16 Apr 2012 19:49:58 +0700	[thread overview]
Message-ID: <1334580603-11577-7-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <1334580603-11577-1-git-send-email-pclouds@gmail.com>

This helps remove \n from translatable strings
---
 builtin/fetch.c  |    4 ++--
 builtin/remote.c |    4 ++--
 refs.c           |    1 +
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/builtin/fetch.c b/builtin/fetch.c
index 65f5f9b..a8c3e4c 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -537,8 +537,8 @@ static int prune_refs(struct refspec *refs, int ref_count, struct ref *ref_map)
 	int result = 0;
 	struct ref *ref, *stale_refs = get_stale_heads(refs, ref_count, ref_map);
 	const char *dangling_msg = dry_run
-		? _("   (%s will become dangling)\n")
-		: _("   (%s has become dangling)\n");
+		? _("   (%s will become dangling)")
+		: _("   (%s has become dangling)");
 
 	for (ref = stale_refs; ref; ref = ref->next) {
 		if (!dry_run)
diff --git a/builtin/remote.c b/builtin/remote.c
index fec92bc..1b03473 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1260,8 +1260,8 @@ static int prune_remote(const char *remote, int dry_run)
 	int result = 0, i;
 	struct ref_states states;
 	const char *dangling_msg = dry_run
-		? " %s will become dangling!\n"
-		: " %s has become dangling!\n";
+		? " %s will become dangling!"
+		: " %s has become dangling!";
 
 	memset(&states, 0, sizeof(states));
 	get_remote_ref_states(remote, &states, GET_REF_STATES);
diff --git a/refs.c b/refs.c
index c9f6835..54b2a03 100644
--- a/refs.c
+++ b/refs.c
@@ -395,6 +395,7 @@ static int warn_if_dangling_symref(const char *refname, const unsigned char *sha
 		return 0;
 
 	fprintf(d->fp, d->msg_fmt, refname);
+	fprintf(d->fp, "\n");
 	return 0;
 }
 
-- 
1.7.3.1.256.g2539c.dirty

  parent reply	other threads:[~2012-04-16 12:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16 12:49 [PATCH i18n 00/11] Mark more strings for translation Nguyễn Thái Ngọc Duy
2012-04-16 12:49 ` [PATCH i18n 01/11] Add three convenient format printing functions with \n automatically appended Nguyễn Thái Ngọc Duy
2012-04-16 17:26   ` Jonathan Nieder
2012-04-17  8:12   ` Erik Faye-Lund
2012-04-16 12:49 ` [PATCH i18n 02/11] i18n: mark relative dates for translation Nguyễn Thái Ngọc Duy
2012-04-16 12:49 ` [PATCH i18n 03/11] i18n: parseopt: lookup help and argument translations when showing usage Nguyễn Thái Ngọc Duy
2012-04-16 17:54   ` Jonathan Nieder
2012-04-16 23:35     ` Jonathan Nieder
2012-04-16 12:49 ` [PATCH i18n 04/11] i18n: help: mark parseopt strings for translation Nguyễn Thái Ngọc Duy
2012-04-16 12:49 ` [PATCH i18n 05/11] i18n: help: mark " Nguyễn Thái Ngọc Duy
2012-04-18 19:30   ` Jonathan Nieder
2012-04-16 12:49 ` Nguyễn Thái Ngọc Duy [this message]
2012-04-16 12:49 ` [PATCH i18n 07/11] i18n: remote: " Nguyễn Thái Ngọc Duy
2012-04-16 12:50 ` [PATCH i18n 08/11] i18n: apply: " Nguyễn Thái Ngọc Duy
2012-04-16 12:50 ` [PATCH i18n 09/11] i18n: apply: update say_patch_name to give translators complete sentence Nguyễn Thái Ngọc Duy
2012-04-22 16:42   ` Zbigniew Jędrzejewski-Szmek
2012-04-23 11:33     ` Nguyen Thai Ngoc Duy
2012-04-16 12:50 ` [PATCH i18n 10/11] i18n: index-pack: mark strings for translation Nguyễn Thái Ngọc Duy
2012-04-16 12:50 ` [PATCH i18n 11/11] i18n: bundle: " Nguyễn Thái Ngọc Duy
2012-04-18 19:40 ` [PATCH i18n 00/11] Mark more " Jonathan Nieder
2012-04-22  3:24   ` Nguyen Thai Ngoc Duy

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=1334580603-11577-7-git-send-email-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=worldhello.net@gmail.com \
    /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.