git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Include gettext.h in MyFirstContribution tutorial

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 18, 2023, 21:35 UTC
Message-ID
<xmqqzg0fpqay.fsf@gitster.g>
In-Reply-To
<20231017041503.3249-1-jacob@initialcommit.io>
Jacob Stopak <jacob@initialcommit.io> writes:
Show 10 quoted lines
> The tutorial in Documentation/MyFirstContribution.txt has steps to print
> some text using the "_" function. However, this leads to compiler errors
> when running "make" since "gettext.h" is not #included.
>
> Update docs with a note to #include "gettext.h" in "builtin/psuh.c".
>
> Signed-off-by: Jacob Stopak <jacob@initialcommit.io>
> ---
>  Documentation/MyFirstContribution.txt | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Who's the first responder on this document these days? I think the "psuh" was Emily's invention, so sending it in her direction.

Thanks.
Show 19 quoted lines
> diff --git a/Documentation/MyFirstContribution.txt b/Documentation/MyFirstContribution.txt
> index 62d11a5cd7..7cfed60c2e 100644
> --- a/Documentation/MyFirstContribution.txt
> +++ b/Documentation/MyFirstContribution.txt
> @@ -160,10 +160,11 @@ in order to keep the declarations alphabetically sorted:
>  int cmd_psuh(int argc, const char **argv, const char *prefix);
>  ----
>  
> -Be sure to `#include "builtin.h"` in your `psuh.c`.
> +Be sure to `#include "builtin.h"` in your `psuh.c`. You'll also need to
> +`#include "gettext.h"` to use functions related to printing output text.
>  
> -Go ahead and add some throwaway printf to that function. This is a decent
> -starting point as we can now add build rules and register the command.
> +Go ahead and add some throwaway printf to the `cmd_psuh` function. This is a
> +decent starting point as we can now add build rules and register the command.
>  
>  NOTE: Your throwaway text, as well as much of the text you will be adding over
>  the course of this tutorial, is user-facing. That means it needs to be
Previous: Jacob StopakNext: Emily Shaffer
Message 2 of 3 in “Include gettext.h in MyFirstContribution tutorial”
  1. Include gettext.h in MyFirstContribution tutorialJacob Stopak, Oct 17, 2023
  2. Junio C HamanoOct 18, 2023
  3. Emily ShafferOct 26, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.