Skip to content

No-op C gettext wrappers

Jonathan Nieder git 1 version New

Get series with b4
b4 am 20110221040012.GB26968@elie

Versions newest first

  1. v2 Latest3 patches 0 repliesNew

Changes in v2 from the cover letter

- renamed NO_GETTEXT_POISON prereq to C_LOCALE_OUTPUT. This should make it possible to reuse that prereq is the test suite ever learns a --lang option. Hopefully this will also make it easier for authors of new tests to tell whether that prereq needs to be set.
- GETTEXT_POISON can be enabled or disabled at runtime
- _() is an inline function to catch misuses like

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3i18n: add no-op _() and N_() wrappersMakefile cache.h gettext.h+28 -00 replies
2/3tests: add GETTEXT_POISON to simulate unfriendly translatorMakefile gettext.h t/test-lib.sh+17 -10 replies
3/3tests: let GETTEXT_POISON be disabled at run timeMakefile gettext.c gettext.h +1 more+23 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] No-op C gettext wrappers

Hi,

Quoted 2 lines · Ævar Arnfjörð Bjarmason

As discussed on-list previously I'm remaking the gettext series in a form that'll be easier to swallow.

Here's a reroll of the skeleton gettext.h wrapper as requested. I'll send some gettextization patches in a separate series, time permitting.

Changes from v1:

- renamed NO_GETTEXT_POISON prereq to C_LOCALE_OUTPUT. This should make it possible to reuse that prereq is the test suite ever learns a --lang option. Hopefully this will also make it easier for authors of new tests to tell whether that prereq needs to be set.
- GETTEXT_POISON can be enabled or disabled at runtime
- _() is an inline function to catch misuses like

const char *some_strings[] = { _("foo"), _("bar"), _("baz") };
- combined some patches, tweaked commit messages

Thoughts welcome, as always.
Jonathan Nieder (1):
tests: let GETTEXT_POISON be disabled at run time

Ævar Arnfjörð Bjarmason (2):
i18n: add no-op _() and N_() wrappers
tests: add GETTEXT_POISON to simulate unfriendly translator

 Makefile      |    9 +++++++++
 cache.h       |    1 +
 gettext.c     |   14 ++++++++++++++
 gettext.h     |   32 ++++++++++++++++++++++++++++++++
 t/test-lib.sh |    9 +++++++++
 5 files changed, 65 insertions(+), 0 deletions(-)
 create mode 100644 gettext.c
 create mode 100644 gettext.h