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

Re: [PATCH] git-sh-i18n: detect and avoid broken gettext(1) implementation

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jan 20, 2012, 14:02 UTC
Message-ID
<CALxABCYgYT=K0CRJKFOJAeB2wb=vRbwd--YEQtvofA5fmq_t-A@mail.gmail.com>
In-Reply-To
<1327063775-28420-1-git-send-email-avarab@gmail.com>
On Fri, Jan 20, 2012 at 13:49, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 21 quoted lines
> Even though we can load gettext.sh the gettext(1) and eval_gettext
> functions it provides might be completely broken. This reportedly
> happens on some Cygwin installations where we can load gettext.sh, but
> gettext and eval_gettext both return exit code 127 and no output.
>
> The reason we're trying to load gettext.sh (or the equivalent Solaris
> implementation) at all is so we don't have to provide our own fallback
> implementation if the OS already has one installed, but because we
> didn't test whether it actually worked under GNU gettext we might end
> up with broken functions.
>
> Change the detection in git-sh-i18n so that it tests that the output
> of "gettext test" produces "test", on Solaris we already test that
> "gettext -h" produces "-h", so we were already guarded against the
> same sort of failure there.
>
> Reported-by: Alex Riesen <raa.lkml@gmail.com>
> ---
> Here's a minimal patch to git-sh-i18n that should make things work on
> Cygwin and any other platforms with broken gettext functions while
> also using the OS-provided functions if they work.
FWIW, I confirm it works (which is quite obvious).

Just for giggles, I even risked running the tests and, of course, crashed that piece of junk with broken Cygwin installation. Please don't ask me to do that again :) restarting it is PITA as well.

Just for future reference to all poor Cygwin users:

I also left NO_GETTEXT in the config.mak. This, BTW, explains why git works, while gettext binary does not: one .dll dependency less.

Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 17 of 40 in “i18n: disable i18n for shell scripts if NO_GETTEXT defined”
  1. i18n: disable i18n for shell scripts if NO_GETTEXT definedAlex Riesen, Jan 17, 2012
  2. Junio C HamanoJan 17, 2012
  3. Alex RiesenJan 18, 2012
  4. i18n: disable i18n for shell scripts if NO_GETTEXT definedAlex Riesen, Jan 18, 2012
  5. Jonathan NiederJan 19, 2012
  6. Alex RiesenJan 19, 2012
  7. Ævar Arnfjörð BjarmasonJan 18, 2012
  8. Alex RiesenJan 18, 2012
  9. Ævar Arnfjörð BjarmasonJan 18, 2012
  10. Jonathan NiederJan 19, 2012
  11. Junio C HamanoJan 19, 2012
  12. Johannes SixtJan 19, 2012
  13. Junio C HamanoJan 19, 2012
  14. Ævar Arnfjörð BjarmasonJan 20, 2012
  15. Alex RiesenJan 20, 2012
  16. git-sh-i18n: detect and avoid broken gettext(1) implementationÆvar Arnfjörð Bjarmason, Jan 20, 2012
  17. Alex RiesenJan 20, 2012
  18. Junio C HamanoJan 20, 2012
  19. Alex RiesenJan 20, 2012
  20. Junio C HamanoJan 20, 2012
  21. Alex RiesenJan 20, 2012
  22. Junio C HamanoJan 20, 2012
  23. Alex RiesenJan 20, 2012
  24. Junio C HamanoJan 20, 2012
  25. Alex RiesenJan 20, 2012
  26. Alex RiesenJan 19, 2012
  27. Alex RiesenJan 19, 2012
  28. add a Makefile switch to avoid gettext translation in shell scriptsAlex Riesen, Jan 19, 2012
  29. Junio C HamanoJan 23, 2012
  30. 1/2 git-sh-i18n: restructure the logic to compute gettext.sh schemeJunio C Hamano, Jan 23, 2012
  31. 2/2 add a Makefile switch to avoid gettext translation in shell scriptsJunio C Hamano, Jan 23, 2012
  32. Jonathan NiederJan 23, 2012
  33. Junio C HamanoJan 23, 2012
  34. Jonathan NiederJan 23, 2012
  35. 3/2 i18n: do not use gettext.sh by default when NO_GETTEXT is setJonathan Nieder, Jan 24, 2012
  36. Alex RiesenJan 24, 2012
  37. Ævar Arnfjörð BjarmasonJan 24, 2012
  38. Alex RiesenJan 24, 2012
  39. Alex RiesenJan 24, 2012
  40. Junio C HamanoJan 24, 2012

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.