i18n: receive-pack: mark messages for translation
Mark messages refuse_unconfigured_deny_msg and refuse_unconfigured_deny_delete_current_msg for translation. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Vasco Almeida committed
Sep 15, 2016 at 14:59 UTC
8ba35a2dc696c1b9eb95976a690b61d375a083d5
1 file changed
+25
-33
builtin/receive-pack.c
+25
-33
@@ -775,47 +775,39 @@ static int is_ref_checked_out(const char *ref)
775
return !strcmp(head_name, ref);
776
}
777
778
-static char *refuse_unconfigured_deny_msg[] = {
779
- "By default, updating the current branch in a non-bare repository",
780
- "is denied, because it will make the index and work tree inconsistent",
781
- "with what you pushed, and will require 'git reset --hard' to match",
782
- "the work tree to HEAD.",
783
- "",
784
- "You can set 'receive.denyCurrentBranch' configuration variable to",
785
- "'ignore' or 'warn' in the remote repository to allow pushing into",
786
- "its current branch; however, this is not recommended unless you",
787
- "arranged to update its work tree to match what you pushed in some",
788
- "other way.",
789
- "",
790
- "To squelch this message and still keep the default behaviour, set",
791
- "'receive.denyCurrentBranch' configuration variable to 'refuse'."
792
-};
778
+static char *refuse_unconfigured_deny_msg =
779
+ N_("By default, updating the current branch in a non-bare repository\n"
780
+ "is denied, because it will make the index and work tree inconsistent\n"
781
+ "with what you pushed, and will require 'git reset --hard' to match\n"
782
+ "the work tree to HEAD.\n"
783
+ "\n"
784
+ "You can set 'receive.denyCurrentBranch' configuration variable to\n"
785
+ "'ignore' or 'warn' in the remote repository to allow pushing into\n"
786
+ "its current branch; however, this is not recommended unless you\n"
787
+ "arranged to update its work tree to match what you pushed in some\n"
788
+ "other way.\n"
789
+ "\n"
790
+ "To squelch this message and still keep the default behaviour, set\n"
791
+ "'receive.denyCurrentBranch' configuration variable to 'refuse'.");
792
793
static void refuse_unconfigured_deny(void)
794
{
796
- int i;
797
- for (i = 0; i < ARRAY_SIZE(refuse_unconfigured_deny_msg); i++)
798
- rp_error("%s", refuse_unconfigured_deny_msg[i]);
795
+ rp_error("%s", _(refuse_unconfigured_deny_msg));
796
}
797
801
-static char *refuse_unconfigured_deny_delete_current_msg[] = {
802
- "By default, deleting the current branch is denied, because the next",
803
- "'git clone' won't result in any file checked out, causing confusion.",
804
- "",
805
- "You can set 'receive.denyDeleteCurrent' configuration variable to",
806
- "'warn' or 'ignore' in the remote repository to allow deleting the",
807
- "current branch, with or without a warning message.",
808
- "",
809
- "To squelch this message, you can set it to 'refuse'."
810
-};
798
+static char *refuse_unconfigured_deny_delete_current_msg =
799
+ N_("By default, deleting the current branch is denied, because the next\n"
800
+ "'git clone' won't result in any file checked out, causing confusion.\n"
801
+ "\n"
802
+ "You can set 'receive.denyDeleteCurrent' configuration variable to\n"
803
+ "'warn' or 'ignore' in the remote repository to allow deleting the\n"
804
+ "current branch, with or without a warning message.\n"
805
+ "\n"
806
+ "To squelch this message, you can set it to 'refuse'.");
807
808
static void refuse_unconfigured_deny_delete_current(void)
809
{
814
- int i;
815
- for (i = 0;
816
- i < ARRAY_SIZE(refuse_unconfigured_deny_delete_current_msg);
817
- i++)
818
- rp_error("%s", refuse_unconfigured_deny_delete_current_msg[i]);
810
+ rp_error("%s", _(refuse_unconfigured_deny_delete_current_msg));
811
}
812
813
static int command_singleton_iterator(void *cb_data, unsigned char sha1[20]);