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

Re: [PATCH] i18n: disable i18n for shell scripts if NO_GETTEXT defined

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jan 19, 2012, 07:13 UTC
Message-ID
<4F17C294.6010004@viscovery.net>
In-Reply-To
<7vfwfclf4v.fsf@alter.siamese.dyndns.org>
Am 1/19/2012 1:17, schrieb Junio C Hamano:
Show 13 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> 
>> On Wed, Jan 18, 2012 at 19:57, Alex Riesen <raa.lkml@gmail.com> wrote:
>> ...
>>> Well, if I say NO_GETTEXT, I kind of want none of local gettext,
>>> whether it works, or not.
>>
>> That's not what NO_GETTEXT means, and not what it *should* mean. It
>> means that your output won't be translated, but we might still make
>> use of a locally installed library to provide the gettext() and
>> eval_gettext() functions.
> 
> You are right.

Sorry to disagree: We have, e.g., NO_MMAP, and I can set it to request that some alternative is used, even if I have a working mmap(). The option name "NO_GETTEXT" is in exactly the same spirit.

> In the current approach we take for shell scripts, we cannot have "No i18n
> whatsoever and messages are emit with printf and echo". We always have to
> go through gettext/eval_gettext even though they may be an implementation
> that does not do i18n at all.

Just like we go through _() in C code, even though there may be an implementation that does not do i18n at all, right?

gettext/eval_gettext annotations are the shell equivalent of _() annotations in C code, aren't they? Neither go away just by defining NO_GETTEXT. It is just a quality-of-implementation issue that those annotations have as little overhead as possible if NO_GETTEXT is defined. In C, it is easy, in shell code it may be more involved.

-- Hannes
Previous: Junio C HamanoNext: Junio C Hamano
Message 12 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.