From: Jonathan Nieder <jrnieder@gmail.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/2] Add C_LOCALE_OUTPUT prereq to test cases that require English text matching
Date: Mon, 25 Jun 2012 06:39:56 -0500 [thread overview]
Message-ID: <20120625113956.GB9270@burratino> (raw)
In-Reply-To: <CACsJy8DpOL+V=sVZt3B-7OQ=POHtu1bovFB-sQ9HwPpmdKmN-A@mail.gmail.com>
Nguyen Thai Ngoc Duy wrote:
> On Sun, Jun 24, 2012 at 11:28 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
>> Nguyễn Thái Ngọc Duy wrote:
>>> - test_expect_${3:-success} "relative date ($2)" "
>>> + test_expect_${3:-success} C_LOCALE_OUTPUT "relative date ($2)" "
>>> test-date show $t >actual &&
>>> test_cmp expect actual
>>> "
>>
>> Could use test_i18ncmp so we catch if test-date crashes, but anyway,
>> yeah, we can't expect to be able to meaningfully test date formatting
>> in another language.
>
> This reminds me of an inkscape crash I encountered long ago because of
> a mistake in Vietnamese translation. Too bad we can't test all locales
> for similar bugs (or we would need to i18n-ize expected results in the
> test suite too)
Sure we can. :) We just need to make sure we are using test_i18ncmp
where appropriate so the tests run and check as much as they can
without relying on details that are left to the translators'
disgression.
But yes, the test harness doesn't know how to do that yet. I'm hoping
that soon-ish there will be an option to run tests in your chosen
language, so the test result can more closely reflect bugs one is
likely to run into in practice (and so developers can more easily test
the edge cases such as Turkic locales where tolower('I') != 'i').
Sorry I haven't had enough time to bring this kind of thing into
reality, and thanks for stepping in with the partial work in that
direction before.
Jonathan
next prev parent reply other threads:[~2012-06-25 11:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-24 12:41 [PATCH 1/2] i18n: leave \n out of translated diffstat Nguyễn Thái Ngọc Duy
2012-06-24 12:41 ` [PATCH 2/2] Add C_LOCALE_OUTPUT prereq to test cases that require English text matching Nguyễn Thái Ngọc Duy
2012-06-24 16:28 ` Jonathan Nieder
2012-06-25 11:32 ` Nguyen Thai Ngoc Duy
2012-06-25 11:39 ` Jonathan Nieder [this message]
2012-06-25 11:45 ` Nguyen Thai Ngoc Duy
2012-06-25 11:53 ` Jonathan Nieder
2012-06-24 16:04 ` [PATCH 1/2] i18n: leave \n out of translated diffstat Jonathan Nieder
2012-06-25 4:24 ` Junio C Hamano
2012-06-25 11:17 ` Nguyen Thai Ngoc Duy
2012-06-25 11:33 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120625113956.GB9270@burratino \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).