From: Ævar Arnfjörð Bjarmason Date: Fri, 10 Sep 2010 23:40:08 +0000 (+0000) Subject: gettext docs: add "Testing marked strings" section to po/README X-Git-Tag: ko-pu~10^2~42 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d6bf521f9d2f7a5ff22254fdb123eb3000a38f43;p=git.git gettext docs: add "Testing marked strings" section to po/README 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 --- 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.