{"thread":{"id":"60380","subject":"[PATCH] Include gettext.h in MyFirstContribution tutorial","startedAt":"2023-10-17T04:15:20Z","lastAt":"2023-10-26T21:21:25Z","messageCount":3,"participants":["Jacob Stopak","Junio C Hamano","Emily Shaffer"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"483328","messageId":"20231017041503.3249-1-jacob@initialcommit.io","threadId":"60380","inReplyTo":null,"subject":"[PATCH] Include gettext.h in MyFirstContribution tutorial","fromName":"Jacob Stopak","fromEmail":"jacob@initialcommit.io","sentAt":"2023-10-17T04:15:03Z","receivedAt":"2023-10-17T04:15:20Z","isPatch":true,"sender":{"key":"jacob@initialcommit.io","avatar":"https://avatars.githubusercontent.com/u/49353917?v=4"},"body":"The tutorial in Documentation/MyFirstContribution.txt has steps to print\nsome text using the \"_\" function. However, this leads to compiler errors\nwhen running \"make\" since \"gettext.h\" is not #included.\n\nUpdate docs with a note to #include \"gettext.h\" in \"builtin/psuh.c\".\n\nSigned-off-by: Jacob Stopak <jacob@initialcommit.io>\n---\n Documentation/MyFirstContribution.txt | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt\nindex 62d11a5cd7..7cfed60c2e 100644\n--- a/Documentation/MyFirstContribution.txt\n+++ b/Documentation/MyFirstContribution.txt\n@@ -160,10 +160,11 @@ in order to keep the declarations alphabetically sorted:\n int cmd_psuh(int argc, const char **argv, const char *prefix);\n ----\n \n-Be sure to `#include \"builtin.h\"` in your `psuh.c`.\n+Be sure to `#include \"builtin.h\"` in your `psuh.c`. You'll also need to\n+`#include \"gettext.h\"` to use functions related to printing output text.\n \n-Go ahead and add some throwaway printf to that function. This is a decent\n-starting point as we can now add build rules and register the command.\n+Go ahead and add some throwaway printf to the `cmd_psuh` function. This is a\n+decent starting point as we can now add build rules and register the command.\n \n NOTE: Your throwaway text, as well as much of the text you will be adding over\n the course of this tutorial, is user-facing. That means it needs to be\n-- \n2.42.0.398.ga9ecda2788.dirty\n\n"},{"id":"483456","messageId":"xmqqzg0fpqay.fsf@gitster.g","threadId":"60380","inReplyTo":"20231017041503.3249-1-jacob@initialcommit.io","subject":"Re: [PATCH] Include gettext.h in MyFirstContribution tutorial","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-10-18T21:35:17Z","receivedAt":"2023-10-18T21:35:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jacob Stopak <jacob@initialcommit.io> writes:\n\n> The tutorial in Documentation/MyFirstContribution.txt has steps to print\n> some text using the \"_\" function. However, this leads to compiler errors\n> when running \"make\" since \"gettext.h\" is not #included.\n>\n> Update docs with a note to #include \"gettext.h\" in \"builtin/psuh.c\".\n>\n> Signed-off-by: Jacob Stopak <jacob@initialcommit.io>\n> ---\n>  Documentation/MyFirstContribution.txt | 7 ++++---\n>  1 file changed, 4 insertions(+), 3 deletions(-)\n\nWho's the first responder on this document these days?  I think the\n\"psuh\" was Emily's invention, so sending it in her direction.\n\nThanks.\n\n> diff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt\n> index 62d11a5cd7..7cfed60c2e 100644\n> --- a/Documentation/MyFirstContribution.txt\n> +++ b/Documentation/MyFirstContribution.txt\n> @@ -160,10 +160,11 @@ in order to keep the declarations alphabetically sorted:\n>  int cmd_psuh(int argc, const char **argv, const char *prefix);\n>  ----\n>  \n> -Be sure to `#include \"builtin.h\"` in your `psuh.c`.\n> +Be sure to `#include \"builtin.h\"` in your `psuh.c`. You'll also need to\n> +`#include \"gettext.h\"` to use functions related to printing output text.\n>  \n> -Go ahead and add some throwaway printf to that function. This is a decent\n> -starting point as we can now add build rules and register the command.\n> +Go ahead and add some throwaway printf to the `cmd_psuh` function. This is a\n> +decent starting point as we can now add build rules and register the command.\n>  \n>  NOTE: Your throwaway text, as well as much of the text you will be adding over\n>  the course of this tutorial, is user-facing. That means it needs to be\n"},{"id":"483933","messageId":"ZTrYTcMxVfWKrOvi@google.com","threadId":"60380","inReplyTo":"xmqqzg0fpqay.fsf@gitster.g","subject":"Re: [PATCH] Include gettext.h in MyFirstContribution tutorial","fromName":"Emily Shaffer","fromEmail":"nasamuffin@google.com","sentAt":"2023-10-26T21:21:17Z","receivedAt":"2023-10-26T21:21:25Z","isPatch":true,"sender":{"key":"nasamuffin@google.com","avatar":"https://avatars.githubusercontent.com/u/1606826?v=4"},"body":"On Wed, Oct 18, 2023 at 02:35:17PM -0700, Junio C Hamano wrote:\n> \n> Jacob Stopak <jacob@initialcommit.io> writes:\n> \n> > The tutorial in Documentation/MyFirstContribution.txt has steps to print\n> > some text using the \"_\" function. However, this leads to compiler errors\n> > when running \"make\" since \"gettext.h\" is not #included.\n> >\n> > Update docs with a note to #include \"gettext.h\" in \"builtin/psuh.c\".\n> >\n> > Signed-off-by: Jacob Stopak <jacob@initialcommit.io>\n> > ---\n> >  Documentation/MyFirstContribution.txt | 7 ++++---\n> >  1 file changed, 4 insertions(+), 3 deletions(-)\n> \n> Who's the first responder on this document these days?  I think the\n> \"psuh\" was Emily's invention, so sending it in her direction.\n> \n> Thanks.\n\nThanks for the nudge and sorry for the slow response (and thanks to Jack\nfor pointing out to me that I was delinquent).\n\nI like this change. Nice touch disambiguating \"function\" in the\nfollowing paragraph.\n\nReviewed-by: Emily Shaffer <nasamuffin@google.com>\n\n> \n> > diff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt\n> > index 62d11a5cd7..7cfed60c2e 100644\n> > --- a/Documentation/MyFirstContribution.txt\n> > +++ b/Documentation/MyFirstContribution.txt\n> > @@ -160,10 +160,11 @@ in order to keep the declarations alphabetically sorted:\n> >  int cmd_psuh(int argc, const char **argv, const char *prefix);\n> >  ----\n> >  \n> > -Be sure to `#include \"builtin.h\"` in your `psuh.c`.\n> > +Be sure to `#include \"builtin.h\"` in your `psuh.c`. You'll also need to\n> > +`#include \"gettext.h\"` to use functions related to printing output text.\n> >  \n> > -Go ahead and add some throwaway printf to that function. This is a decent\n> > -starting point as we can now add build rules and register the command.\n> > +Go ahead and add some throwaway printf to the `cmd_psuh` function. This is a\n> > +decent starting point as we can now add build rules and register the command.\n> >  \n> >  NOTE: Your throwaway text, as well as much of the text you will be adding over\n> >  the course of this tutorial, is user-facing. That means it needs to be\n"}]}