Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-01-25 03:13:01 +0300
committerJunio C Hamano <gitster@pobox.com>2020-01-30 22:13:03 +0300
commitb0418303b1f335d0753736c314a4fdd7966209ac (patch)
treece909b11ded20ea6835dc95fe29f43e354fbe170 /t/t1400-update-ref.sh
parentbc3f657f71e83fec3fba124d6faeb3df71e5e17a (diff)
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>
Diffstat (limited to 't/t1400-update-ref.sh')
-rwxr-xr-xt/t1400-update-ref.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index a86dd2fbd9..a6224ef65f 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -363,24 +363,24 @@ test_expect_success 'Query "master@{May 25 2005}" (before history)' '
git rev-parse --verify "master@{May 25 2005}" >o 2>e &&
echo "$C" >expect &&
test_cmp expect o &&
- echo "warning: Log for '\''master'\'' only goes back to $ed." >expect &&
- test_cmp expect e
+ echo "warning: log for '\''master'\'' only goes back to $ed" >expect &&
+ test_i18ncmp expect e
'
test_expect_success 'Query master@{2005-05-25} (before history)' '
test_when_finished "rm -f o e" &&
git rev-parse --verify master@{2005-05-25} >o 2>e &&
echo "$C" >expect &&
test_cmp expect o &&
- echo "warning: Log for '\''master'\'' only goes back to $ed." >expect &&
- test_cmp expect e
+ echo "warning: log for '\''master'\'' only goes back to $ed" >expect &&
+ test_i18ncmp expect e
'
test_expect_success 'Query "master@{May 26 2005 23:31:59}" (1 second before history)' '
test_when_finished "rm -f o e" &&
git rev-parse --verify "master@{May 26 2005 23:31:59}" >o 2>e &&
echo "$C" >expect &&
test_cmp expect o &&
- echo "warning: Log for '\''master'\'' only goes back to $ed." >expect &&
- test_cmp expect e
+ echo "warning: log for '\''master'\'' only goes back to $ed" >expect &&
+ test_i18ncmp expect e
'
test_expect_success 'Query "master@{May 26 2005 23:32:00}" (exactly history start)' '
test_when_finished "rm -f o e" &&