Re: [PATCH 3/3] sha1-name: mark get_oid() error messages for translation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> +			die(_("path '%s' exists, but not '%s'\n"
> +			    "hint: Did you mean '%.*s:%s' aka '%.*s:./%s'?"),
> ...

The above is meant to be localizable, but...

> diff --git a/t/t1506-rev-parse-diagnosis.sh b/t/t1506-rev-parse-diagnosis.sh
> index f49fc770d6..c2b5125c12 100755
> --- a/t/t1506-rev-parse-diagnosis.sh
> +++ b/t/t1506-rev-parse-diagnosis.sh
> @@ -9,8 +9,8 @@ exec </dev/null
>  test_did_you_mean ()
>  {
>  	cat >expected <<-EOF &&
> -	fatal: Path '$2$3' $4, but not ${5:-$SQ$3$SQ}.
> -	Did you mean '$1:$2$3'${2:+ aka $SQ$1:./$3$SQ}?
> +	fatal: path '$2$3' $4, but not ${5:-$SQ$3$SQ}
> +	hint: Did you mean '$1:$2$3'${2:+ aka $SQ$1:./$3$SQ}?
>  	EOF
>  	test_cmp expected error

...this obviously would not allow GIT_TEST_GETTEXT_POISON test to
pass.  And ...

>  test_expect_success 'incorrect file in sha1:path' '
>  	test_must_fail git rev-parse HEAD:nothing.txt 2>error &&
> -	grep "fatal: Path '"'"'nothing.txt'"'"' does not exist in '"'"'HEAD'"'"'" error &&
> +	test_i18ngrep "path .nothing.txt. does not exist in .HEAD." error &&
>  	test_must_fail git rev-parse HEAD:index-only.txt 2>error &&
> -	grep "fatal: Path '"'"'index-only.txt'"'"' exists on disk, but not in '"'"'HEAD'"'"'." error &&
> +	test_i18ngrep "path .index-only.txt. exists on disk, but not in .HEAD." error &&
>  	(cd subdir &&
>  	 test_must_fail git rev-parse HEAD:file2.txt 2>error &&
>  	 test_did_you_mean HEAD subdir/ file2.txt exists )
>  '

... the last step executed in "subdir" does not seem to pass.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux