From: Jiang Xin Date: Wed, 22 Aug 2012 14:56:18 GMT Subject: Re: [PATCH 6/7] Fix tests under GETTEXT_POISON on git-remote Message-ID: In-Reply-To: <7v628bdhol.fsf@alter.siamese.dyndns.org> 2012/8/22 Junio C Hamano : > Which part of the output from "git remote show" does this test > expect to be translated? Specifically, does "tracked" ever get > translated? > > It appears that _(" tracked") is indeed marked for translation in > the source, so how can we expect value in $actual be any useful for > any comparison? > > Confused... Yes, because _("tracked") is marked for translation, check_remote_track() is hard to do right. > check_remote_track () { > actual=$(git remote show "$1" | sed -ne 's|^ \(.*\) tracked$|\1|p') > shift && > - tokens_match "$*" "$actual" > + tokens_i18nmatch "$*" "$actual" > } Output of command "git remote show origin" is: # GETTEXT POISON # # GETTEXT POISON # # GETTEXT POISON # # GETTEXT POISON # # GETTEXT POISON # master# GETTEXT POISON # side # GETTEXT POISON # Maybe we should bypass all testcases which calling check_remote_track(). Changing 'tokens_match' to 'tokens_i18nmatch' won't fix but hide the problem. - test_expect_success 'remote information for the origin' ' + test_expect_success C_LOCALE_OUTPUT 'remote information for the origin' ' - test_expect_succes 'remove remote' ' + test_expect_success C_LOCALE_OUTPUT 'remove remote' ' - test_expect_success 'add another remote' ' + test_expect_success C_LOCALE_OUTPUT 'add another remote' ' -- Jiang Xin