All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasco Almeida <vascomalmeida@sapo.pt>
To: git@vger.kernel.org
Cc: "Vasco Almeida" <vascomalmeida@sapo.pt>,
	"Jiang Xin" <worldhello.net@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Jean-Noël AVILA" <jn.avila@free.fr>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: [PATCH v3 11/14] i18n: receive-pack: mark messages for translation
Date: Thu, 15 Sep 2016 14:59:05 +0000	[thread overview]
Message-ID: <1473951548-31733-11-git-send-email-vascomalmeida@sapo.pt> (raw)
In-Reply-To: <1473951548-31733-1-git-send-email-vascomalmeida@sapo.pt>
In-Reply-To: <1473259758-11836-1-git-send-email-vascomalmeida@sapo.pt>

Mark messages refuse_unconfigured_deny_msg and
refuse_unconfigured_deny_delete_current_msg for translation.

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
---
 builtin/receive-pack.c | 58 ++++++++++++++++++++++----------------------------
 1 file changed, 25 insertions(+), 33 deletions(-)

diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index f1ce05c..896b16f 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -781,47 +781,39 @@ static int is_ref_checked_out(const char *ref)
 	return !strcmp(head_name, ref);
 }
 
-static char *refuse_unconfigured_deny_msg[] = {
-	"By default, updating the current branch in a non-bare repository",
-	"is denied, because it will make the index and work tree inconsistent",
-	"with what you pushed, and will require 'git reset --hard' to match",
-	"the work tree to HEAD.",
-	"",
-	"You can set 'receive.denyCurrentBranch' configuration variable to",
-	"'ignore' or 'warn' in the remote repository to allow pushing into",
-	"its current branch; however, this is not recommended unless you",
-	"arranged to update its work tree to match what you pushed in some",
-	"other way.",
-	"",
-	"To squelch this message and still keep the default behaviour, set",
-	"'receive.denyCurrentBranch' configuration variable to 'refuse'."
-};
+static char *refuse_unconfigured_deny_msg =
+	N_("By default, updating the current branch in a non-bare repository\n"
+	   "is denied, because it will make the index and work tree inconsistent\n"
+	   "with what you pushed, and will require 'git reset --hard' to match\n"
+	   "the work tree to HEAD.\n"
+	   "\n"
+	   "You can set 'receive.denyCurrentBranch' configuration variable to\n"
+	   "'ignore' or 'warn' in the remote repository to allow pushing into\n"
+	   "its current branch; however, this is not recommended unless you\n"
+	   "arranged to update its work tree to match what you pushed in some\n"
+	   "other way.\n"
+	   "\n"
+	   "To squelch this message and still keep the default behaviour, set\n"
+	   "'receive.denyCurrentBranch' configuration variable to 'refuse'.");
 
 static void refuse_unconfigured_deny(void)
 {
-	int i;
-	for (i = 0; i < ARRAY_SIZE(refuse_unconfigured_deny_msg); i++)
-		rp_error("%s", refuse_unconfigured_deny_msg[i]);
+	rp_error("%s", _(refuse_unconfigured_deny_msg));
 }
 
-static char *refuse_unconfigured_deny_delete_current_msg[] = {
-	"By default, deleting the current branch is denied, because the next",
-	"'git clone' won't result in any file checked out, causing confusion.",
-	"",
-	"You can set 'receive.denyDeleteCurrent' configuration variable to",
-	"'warn' or 'ignore' in the remote repository to allow deleting the",
-	"current branch, with or without a warning message.",
-	"",
-	"To squelch this message, you can set it to 'refuse'."
-};
+static char *refuse_unconfigured_deny_delete_current_msg =
+	N_("By default, deleting the current branch is denied, because the next\n"
+	   "'git clone' won't result in any file checked out, causing confusion.\n"
+	   "\n"
+	   "You can set 'receive.denyDeleteCurrent' configuration variable to\n"
+	   "'warn' or 'ignore' in the remote repository to allow deleting the\n"
+	   "current branch, with or without a warning message.\n"
+	   "\n"
+	   "To squelch this message, you can set it to 'refuse'.");
 
 static void refuse_unconfigured_deny_delete_current(void)
 {
-	int i;
-	for (i = 0;
-	     i < ARRAY_SIZE(refuse_unconfigured_deny_delete_current_msg);
-	     i++)
-		rp_error("%s", refuse_unconfigured_deny_delete_current_msg[i]);
+	rp_error("%s", _(refuse_unconfigured_deny_delete_current_msg));
 }
 
 static int command_singleton_iterator(void *cb_data, unsigned char sha1[20]);
-- 
2.7.4


  parent reply	other threads:[~2016-09-15 15:01 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07 14:49 [PATCH 01/13] i18n: apply: mark plural string for translation Vasco Almeida
2016-09-07 14:49 ` [PATCH 02/13] i18n: apply: mark error messages " Vasco Almeida
2016-09-07 14:49 ` [PATCH 03/13] i18n: apply: mark info " Vasco Almeida
2016-09-07 14:49 ` [PATCH 04/13] i18n: blame: mark error " Vasco Almeida
2016-09-10  9:41   ` Jean-Noël AVILA
2016-09-12 15:40     ` Junio C Hamano
2016-09-07 14:49 ` [PATCH 05/13] i18n: branch: mark option description " Vasco Almeida
2016-09-07 14:49 ` [PATCH 06/13] i18n: config: mark error message " Vasco Almeida
2016-09-07 14:49 ` [PATCH 07/13] i18n: merge-recursive: mark error messages " Vasco Almeida
2016-09-09 19:23   ` Junio C Hamano
2016-09-07 14:49 ` [PATCH 08/13] i18n: merge-recursive: mark verbose message " Vasco Almeida
2016-09-07 14:49 ` [PATCH 09/13] i18n: notes: mark error messages " Vasco Almeida
2016-09-07 14:49 ` [PATCH 10/13] notes: lowercase first word of error messages Vasco Almeida
2016-09-07 14:49 ` [PATCH 11/13] i18n: receive-pack: mark messages for translation Vasco Almeida
2016-09-07 14:49 ` [PATCH 12/13] i18n: show-branch: mark error " Vasco Almeida
2016-09-07 14:49 ` [PATCH 13/13] i18n: update-index: mark warning " Vasco Almeida
2016-09-07 14:49 ` [PATCH 13/13] i18n: update-index: mark warnings " Vasco Almeida
2016-09-08 20:45 ` [PATCH 01/13] i18n: apply: mark plural string " Junio C Hamano
2016-09-12 11:29 ` [PATCH v2 01/14] " Vasco Almeida
2016-09-12 11:29 ` [PATCH v2 02/14] i18n: apply: mark error messages " Vasco Almeida
2016-09-12 11:29 ` [PATCH v2 03/14] i18n: apply: mark info " Vasco Almeida
2016-09-12 11:29 ` [PATCH v2 04/14] i18n: blame: mark error " Vasco Almeida
2016-09-12 11:29 ` [PATCH v2 05/14] i18n: branch: mark option description " Vasco Almeida
2016-09-12 11:29 ` [PATCH v2 06/14] i18n: config: mark error message " Vasco Almeida
2016-09-12 11:29 ` [PATCH v2 07/14] i18n: merge-recursive: mark error messages " Vasco Almeida
2016-09-12 11:47   ` Jean-Noël Avila
2016-09-12 17:01     ` Junio C Hamano
2016-09-12 16:04   ` Junio C Hamano
2016-09-13 16:54     ` Vasco Almeida
2016-09-12 11:29 ` [PATCH v2 08/14] i18n: merge-recursive: mark verbose message " Vasco Almeida
2016-09-12 11:29 ` [PATCH v2 09/14] i18n: notes: mark error messages " Vasco Almeida
2016-09-12 12:23   ` Jean-Noël Avila
2016-09-13 16:35     ` Vasco Almeida
2016-09-13 20:23       ` Jean-Noël AVILA
2016-09-13 22:01         ` Junio C Hamano
2016-09-12 11:29 ` [PATCH v2 10/14] notes: lowercase first word of error messages Vasco Almeida
2016-09-12 11:29 ` [PATCH v2 11/14] i18n: receive-pack: mark messages for translation Vasco Almeida
2016-09-12 11:30 ` [PATCH v2 12/14] i18n: show-branch: mark error " Vasco Almeida
2016-09-12 12:12   ` Jean-Noël Avila
2016-09-12 17:02     ` Junio C Hamano
2016-09-12 17:19       ` Jean-Noël AVILA
2016-09-12 20:46         ` Junio C Hamano
2016-09-12 11:30 ` [PATCH v2 13/14] i18n: update-index: mark warnings " Vasco Almeida
2016-09-12 11:30 ` [PATCH v2 14/14] i18n: show-branch: mark plural strings " Vasco Almeida
2016-09-15 14:58 ` [PATCH v3 01/14] i18n: apply: mark plural string " Vasco Almeida
2016-09-15 14:58 ` [PATCH v3 02/14] i18n: apply: mark error messages " Vasco Almeida
2016-09-15 14:58 ` [PATCH v3 03/14] i18n: apply: mark info " Vasco Almeida
2016-09-15 14:58 ` [PATCH v3 04/14] i18n: blame: mark error " Vasco Almeida
2016-09-15 20:14   ` Junio C Hamano
2016-09-15 14:58 ` [PATCH v3 05/14] i18n: branch: mark option description " Vasco Almeida
2016-09-15 14:59 ` [PATCH v3 06/14] i18n: config: mark error message " Vasco Almeida
2016-09-15 14:59 ` [PATCH v3 07/14] i18n: merge-recursive: mark error messages " Vasco Almeida
2016-09-15 14:59 ` [PATCH v3 08/14] i18n: merge-recursive: mark verbose message " Vasco Almeida
2016-09-15 14:59 ` [PATCH v3 09/14] i18n: notes: mark error messages " Vasco Almeida
2016-09-15 14:59 ` [PATCH v3 10/14] notes: lowercase first word of error messages Vasco Almeida
2016-09-15 14:59 ` Vasco Almeida [this message]
2016-09-15 14:59 ` [PATCH v3 12/14] i18n: show-branch: mark error messages for translation Vasco Almeida
2016-09-15 14:59 ` [PATCH v3 13/14] i18n: show-branch: mark plural strings " Vasco Almeida
2016-09-15 20:19   ` Junio C Hamano
2016-09-15 14:59 ` [PATCH v3 14/14] i18n: update-index: mark warnings " Vasco Almeida

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=1473951548-31733-11-git-send-email-vascomalmeida@sapo.pt \
    --to=vascomalmeida@sapo.pt \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jn.avila@free.fr \
    --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.