From d6bf521f9d2f7a5ff22254fdb123eb3000a38f43 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 10 Sep 2010 23:40:08 +0000 Subject: [PATCH] gettext docs: add "Testing marked strings" section to po/README MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Add a "Testing marked strings" section to po/README which documents the GETTEXT_POISON=YesPlease debug switch and the NO_GETTEXT_POISON test prerequisite. Signed-off-by: Ævar Arnfjörð Bjarmason --- po/README | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/po/README b/po/README index 66ab35f32..7992f2461 100644 --- a/po/README +++ b/po/README @@ -179,3 +179,31 @@ Perl: printf __("The following error occured: %s\n"), $error; Run `perldoc perl/Git/I18N.pm` for more info. + + +Testing marked strings +---------------------- + +Even if you've correctly marked porcelain strings for translation +something in the test suite might still depend on the US English +version of the strings, e.g. to grep some error message or other +output. + +To smoke out issues like these Git can be compiled with gettext poison +support, at the top-level: + + make GETTEXT_POISON=YesPlease + +That'll give you a git which emits gibberish on every call to +gettext. It's obviously not meant to be installed, but you should run +the test suite with it: + + cd t && prove -j 9 ./t[0-9]*.sh + +If tests break with it you should inspect them manually and see if +what you're translating is sane, i.e. that you're not translating +plumbing output. + +If not you should add a NO_GETTEXT_POISON prerequisite to the test (as +documented in t/README). See existing test files with this +prerequisite for examples. -- 2.30.2