git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 03/65] i18n: archive: mark parseopt strings for translation

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 28, 2012, 22:47 UTC
Message-ID
<20120528224729.GK14606@burratino>
In-Reply-To
<1338203657-26486-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy wrote:
>  rc times are usually more quiet times, let's slip the series in..
>  minor conflict with revert topic in pu, but should be easy to
>  resolve.
Thanks.  Some semi-automated checks follow. :)

"git log --name-status" reveals that files these patches change don't overlap. Good.

Filtering out changes involving N, _, (, and ) by running "git diff --word-diff-regex='[^N_()]' origin/master", the remaining changes are in

	builtin/for-each-ref.c
	builtin/ls-tree.c
	builtin/notes.c
	builtin/rev-parse.c
	builtin/show-branch.c

These are whitespace adjustments to keep continuation lines lined up given the extra "N_(" characters, except for the for-each-ref.c change which is an unrelated conversion of 8 spaces to a tab (also seems fine).

GETTEXT_POISON is annoyed by
  t0006.1-11 relative dates
	test-date show $t >actual &&
	test_cmp expect actual
  t0040.1 test help
	test_must_fail test-parse-options -h > output 2> output.err &&
	test_cmp expect output
  t0040.11-12 handling of unknown options
	test_must_fail test-parse-options $* >output 2>output.err &&
	test_cmp expect output.err
  t0040.27 form of errors from OPT_CALLBACK
	test_cmp expect.err output.err
  t1300.48 no arguments, but no crash
	grep usage output
  t1502.1 --parseopt help output
	test_expect_code 129 git rev-parse --parseopt -- -h > output < optionspec &&
	test_cmp expect output
  t2006.1,2 checkout-index --gobbledegook, -h
	grep "[Uu]sage" err
  t2107.2 update-index --nonsense dumps usage
	grep "[Uu]sage: git update-index" err
  t3004.3 ls-files with nonsense option
	grep "[Uu]sage: git ls-files" actual
  t3004.4 ls-files -h in corrupt repository
	grep "[Uu]sage: git ls-files " broken/usage
  t3200.3 branch -h in broken repository
	grep "[Uu]sage" broken/usage
  t3200.10 branch -m dumps usage
	grep "[Uu]sage: git branch" err'
  t3501.2,3 cherry-pick/revert --nonsense
	test_must_fail git cherry-pick --nonsense 2>msg &&
	grep '[Uu]sage:' msg
  t4006.4-7 diff --stat, --shorstat
	git diff HEAD --stat >actual &&
	test_cmp expect actual
  t4120.3,5 apply with too large -p
	grep "removing 3 leading" err
  t4012.5-6 apply detects corrupt patch
	 detected=`expr "$detected" : "fatal.*at line \\([0-9]*\\)\$"` &&
  t4133.2 apply diff with consistent filename in headers
	grep "inconsistent new filename" err &&
  t4200.24,25 rerere --no-no-rerere-autoupdate, -h
	grep [Uu]sage err &&
  t4202.33 log --graph with diff and stats
	sed -e 's/ *$//' \
	    -e 's/commit [0-9a-f]*$/commit COMMIT_OBJECT_NAME/' \
	    -e 's/Merge: [ 0-9a-f]*$/Merge: MERGE_PARENTS/' \
	    -e 's/Merge tag.*/Merge HEADS DESCRIPTION/' \
	    -e 's/Merge commit.*/Merge HEADS DESCRIPTION/' \
	    -e 's/, 0 deletions(-)//' \
	    -e 's/, 0 insertions(+)//' \
	    -e 's/ 1 files changed, / 1 file changed, /' \
	    -e 's/, 1 deletions(-)/, 1 deletion(-)/' \
	    -e 's/, 1 insertions(+)/, 1 insertion(+)/'
  t4205.12 NUL separation with --stat
	expecting success: 
		  stat0_part=$(git diff --stat HEAD^ HEAD) &&
		  stat1_part=$(git diff --stat --root HEAD^) &&
		  printf "add bar\n$stat0_part\n\0initial\n$stat1_part\n" >expected &&
		  git log -z --stat --pretty="format:%s" >actual &&
		  test_cmp expected actual
	Binary files expected and actual differ
	not ok - 12 NUL separation with --stat
	$ xxd trash\ directory.t4205-log-pretty-formats/expected
	0000000: 6164 6420 6261 720a 2320 4745 5454 4558  add bar.# GETTEX
	0000010: 5420 504f 4953 4f4e 2023 0a00 696e 6974  T POISON #..init
	0000020: 6961 6c0a 2320 4745 5454 4558 5420 504f  ial.# GETTEXT PO
	0000030: 4953 4f4e 2023 0a                        ISON #.
	$ xxd trash\ directory.t4205-log-pretty-formats/actual 
	0000000: 6164 6420 6261 720a 2320 4745 5454 4558  add bar.# GETTEX
	0000010: 5420 504f 4953 4f4e 2023 0069 6e69 7469  T POISON #.initi
	0000020: 616c 0a23 2047 4554 5445 5854 2050 4f49  al.# GETTEXT POI
	0000030: 534f 4e20 23                             SON #
  t5300.32 index-pack detects the SHA1 collision
	grep "SHA1 COLLISION FOUND" msg
  t5505.2-3,6-9,13,15,46 remote porcelain-ish
	actual=$(git remote show "$1" | sed -ne 's|^    \(.*\) tracked$|\1|p')
	shift &&
	tokens_match "$*" "$actual"
  r6500.2-3 gc --gobbledegook, -h
	grep "[Uu]sage: git gc" err
  t7508.5 status --column
	COLUMNS=50 git status --column="column dense" >output &&
	test_cmp expect output
  t7600.3 merge -h
	grep "[Uu]sage: git merge" broken/usage

Assuming we want to require scripts to set LC_ALL=C before trying to parse error messages and descriptions within usage strings (which seems like a sensible requirement to me), these look like test suite bugs and not bugs in git itself. So for what it's worth,

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Previous: Nguyễn Thái Ngọc DuyNext: Nguyen Thai Ngoc Duy
Message 67 of 87 in “Mark parseopt strings for translation”
  1. 00/65 Mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 6, 2012
  2. 01/65 i18n: parseopt: lookup help and argument translations when showing usageNguyễn Thái Ngọc Duy, May 6, 2012
  3. 02/65 i18n: apply: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 6, 2012
  4. 03/65 i18n: archive: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  5. 04/65 i18n: add: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  6. 05/65 i18n: bisect--helper: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  7. 06/65 i18n: blame: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  8. 07/65 i18n: branch: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  9. 08/65 i18n: cat-file: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  10. 09/65 i18n: check-attr: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  11. 10/65 i18n: checkout-index: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  12. 11/65 i18n: checkout: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  13. 12/65 i18n: cherry: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  14. 13/65 i18n: clean: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  15. 14/65 i18n: clone: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  16. 15/65 i18n: column: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  17. 16/65 i18n: commit: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  18. 17/65 i18n: config: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  19. 18/65 i18n: count-objects: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  20. 19/65 i18n: describe: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  21. 20/65 i18n: fast-export: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  22. 21/65 i18n: fetch: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  23. 22/65 i18n: fmt-merge-msg: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  24. 23/65 i18n: for-each-ref: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  25. 24/65 i18n: format-patch: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  26. 25/65 i18n: fsck: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  27. 26/65 i18n: gc: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  28. 27/65 i18n: grep: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  29. 28/65 i18n: hash-object: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  30. 29/65 i18n: help: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  31. 30/65 i18n: init-db: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  32. 31/65 i18n: log: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  33. 32/65 i18n: ls-files: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  34. 33/65 i18n: ls-tree: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  35. 34/65 i18n: merge-base: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  36. 35/65 i18n: merge-file: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  37. 36/65 i18n: merge: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  38. 37/65 i18n: mktree: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  39. 38/65 i18n: mv: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  40. 39/65 i18n: name-rev: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  41. 40/65 i18n: notes: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  42. 41/65 i18n: pack-objects: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  43. 42/65 i18n: pack-refs: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  44. 43/65 i18n: prune-packed: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  45. 44/65 i18n: prune: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  46. 45/65 i18n: push: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  47. 46/65 i18n: read-tree: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  48. 47/65 i18n: remote: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  49. 48/65 i18n: replace: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  50. 49/65 i18n: status: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  51. 50/65 i18n: rerere: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  52. 51/65 i18n: reset: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  53. 52/65 i18n: rev-parse: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  54. 53/65 i18n: revert, cherry-pick: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  55. 54/65 i18n: rm: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  56. 55/65 i18n: shortlog: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  57. 56/65 i18n: show-branch: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  58. 57/65 i18n: show-ref: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  59. 58/65 i18n: symbolic-ref: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  60. 59/65 i18n: tag: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  61. 60/65 i18n: update-index: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  62. 61/65 i18n: update-ref: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  63. 62/65 i18n: update-server-info: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  64. 63/65 i18n: verify-pack: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  65. 64/65 i18n: verify-tag: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  66. 65/65 i18n: write-tree: mark parseopt strings for translationNguyễn Thái Ngọc Duy, May 28, 2012
  67. Jonathan NiederMay 28, 2012
  68. Nguyen Thai Ngoc DuyMay 29, 2012
  69. Jonathan NiederMay 29, 2012
  70. Junio C HamanoMay 29, 2012
  71. Nguyen Thai Ngoc DuyMay 30, 2012
  72. Jonathan NiederMay 30, 2012
  73. Nguyen Thai Ngoc DuyMay 30, 2012
  74. Nguyen Thai Ngoc DuyMay 30, 2012
  75. Junio C HamanoMay 29, 2012
  76. Jonathan NiederMay 29, 2012
  77. Junio C HamanoMay 29, 2012
  78. Nguyen Thai Ngoc DuyMay 30, 2012
  79. Nguyen Thai Ngoc DuyJun 2, 2012
  80. Jonathan NiederJun 2, 2012
  81. Nguyen Thai Ngoc DuyJun 7, 2012
  82. Jonathan NiederJun 7, 2012
  83. Nguyen Thai Ngoc DuyJun 7, 2012
  84. Jonathan NiederJun 7, 2012
  85. Junio C HamanoJun 7, 2012
  86. Junio C HamanoMay 8, 2012
  87. Nguyen Thai Ngoc DuyMay 18, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.