]> git.ipfire.org Git - thirdparty/git.git/commit - object-name.c
sha1-name: mark get_oid() error messages for translation
authorJeff King <peff@peff.net>
Sat, 25 Jan 2020 00:13:01 +0000 (19:13 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Jan 2020 19:13:03 +0000 (11:13 -0800)
commitb0418303b1f335d0753736c314a4fdd7966209ac
treece909b11ded20ea6835dc95fe29f43e354fbe170
parentbc3f657f71e83fec3fba124d6faeb3df71e5e17a
sha1-name: mark get_oid() error messages for translation

There are several error messages in get_oid() and its children that are
clearly intended for humans, but aren't marked for translation. E.g.:

  $ git show :1:foo
  fatal: Path 'foo' is in the index, but not at stage 1.
  Did you mean ':0:foo'?

Let's mark these for translation. While we're at it, let's switch the
style to be more like our usual error messages: start with a lowercase
letter and omit a period at the end of the line.

This does mean that multi-line messages like the one above don't have
any punctuation between the two sentences. I solved that by adding a
"hint" marker like we'd see from advise(). So the result is:

  $ git show :1:foo
  fatal: path 'foo' is in the index, but not at stage 1
  hint: Did you mean ':0:foo'?

A few tests had to be switched to test_i18ngrep and test_i18ncmp. Since
we were touching them anyway, I also simplified the ones using i18ngrep
a bit for readability.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1-name.c
t/t1400-update-ref.sh
t/t1506-rev-parse-diagnosis.sh