i18n: add GETTEXT_POISON to simulate unfriendly translator

Add a new GETTEXT_POISON compile-time parameter to make _(msg) always
return gibberish. So now you can run

	make GETTEXT_POISON=YesPlease

to get a copy of git that functions correctly (one hopes) but produces
output that is in nobody's native language at all.

This is a debugging aid for people who are working on the i18n part of
the system, to make sure that they are not marking plumbing messages
that should never be translated with _().

As new strings get marked for translation, naturally a number of tests
will be broken in this mode. Tests that depend on output from
Porcelain will need to be marked with the new C_LOCALE_OUTPUT test
prerequisite. Newly failing tests that do not depend on output from
Porcelain would be bugs due to messages that should not have been
marked for translation.

Note that the string we're using ("# GETTEXT POISON #") intentionally
starts the pound sign. Some of Git's tests such as
t3404-rebase-interactive.sh rely on interactive editing with a fake
editor, and will needlessly break if the message doesn't start with
something the interactive editor considers a comment.

A future patch will fix fix the underlying cause of that issue by
adding "#" characters to the commit advice automatically.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 files changed
tree: 460853074320cad6c8d019af655d0879df204ca5
  1. block-sha1/
  2. builtin/
  3. compat/
  4. contrib/
  5. Documentation/
  6. git-gui/
  7. git_remote_helpers/
  8. gitk-git/
  9. gitweb/
  10. perl/
  11. ppc/
  12. t/
  13. templates/
  14. vcs-svn/
  15. xdiff/
  16. .gitattributes
  17. .gitignore
  18. .mailmap
  19. abspath.c
  20. aclocal.m4
  21. advice.c
  22. advice.h
  23. alias.c
  24. alloc.c
  25. archive-tar.c
  26. archive-zip.c
  27. archive.c
  28. archive.h
  29. attr.c
  30. attr.h
  31. base85.c
  32. bisect.c
  33. bisect.h
  34. blob.c
  35. blob.h
  36. branch.c
  37. branch.h
  38. builtin.h
  39. bundle.c
  40. bundle.h
  41. cache-tree.c
  42. cache-tree.h
  43. cache.h
  44. check-builtins.sh
  45. check-racy.c
  46. check_bindir
  47. color.c
  48. color.h
  49. combine-diff.c
  50. command-list.txt
  51. commit.c
  52. commit.h
  53. config.c
  54. config.mak.in
  55. configure.ac
  56. connect.c
  57. convert.c
  58. copy.c
  59. COPYING
  60. csum-file.c
  61. csum-file.h
  62. ctype.c
  63. daemon.c
  64. date.c
  65. decorate.c
  66. decorate.h
  67. delta.h
  68. diff-delta.c
  69. diff-lib.c
  70. diff-no-index.c
  71. diff.c
  72. diff.h
  73. diffcore-break.c
  74. diffcore-delta.c
  75. diffcore-order.c
  76. diffcore-pickaxe.c
  77. diffcore-rename.c
  78. diffcore.h
  79. dir.c
  80. dir.h
  81. editor.c
  82. entry.c
  83. environment.c
  84. exec_cmd.c
  85. exec_cmd.h
  86. fast-import.c
  87. fetch-pack.h
  88. fixup-builtins
  89. fsck.c
  90. fsck.h
  91. generate-cmdlist.sh
  92. gettext.h
  93. git-add--interactive.perl
  94. git-am.sh
  95. git-archimport.perl
  96. git-bisect.sh
  97. git-compat-util.h
  98. git-cvsexportcommit.perl
  99. git-cvsimport.perl
  100. git-cvsserver.perl
  101. git-difftool--helper.sh
  102. git-difftool.perl
  103. git-filter-branch.sh
  104. git-instaweb.sh
  105. git-lost-found.sh
  106. git-merge-octopus.sh
  107. git-merge-one-file.sh
  108. git-merge-resolve.sh
  109. git-mergetool--lib.sh
  110. git-mergetool.sh
  111. git-parse-remote.sh
  112. git-pull.sh
  113. git-quiltimport.sh
  114. git-rebase--interactive.sh
  115. git-rebase.sh
  116. git-relink.perl
  117. git-remote-testgit.py
  118. git-repack.sh
  119. git-request-pull.sh
  120. git-send-email.perl
  121. git-sh-setup.sh
  122. git-stash.sh
  123. git-submodule.sh
  124. git-svn.perl
  125. GIT-VERSION-GEN
  126. git-web--browse.sh
  127. git.c
  128. git.spec.in
  129. graph.c
  130. graph.h
  131. grep.c
  132. grep.h
  133. hash.c
  134. hash.h
  135. help.c
  136. help.h
  137. hex.c
  138. http-backend.c
  139. http-fetch.c
  140. http-push.c
  141. http-walker.c
  142. http.c
  143. http.h
  144. ident.c
  145. imap-send.c
  146. INSTALL
  147. levenshtein.c
  148. levenshtein.h
  149. list-objects.c
  150. list-objects.h
  151. ll-merge.c
  152. ll-merge.h
  153. lockfile.c
  154. log-tree.c
  155. log-tree.h
  156. mailmap.c
  157. mailmap.h
  158. Makefile
  159. match-trees.c
  160. merge-file.c
  161. merge-recursive.c
  162. merge-recursive.h
  163. name-hash.c
  164. notes-cache.c
  165. notes-cache.h
  166. notes-merge.c
  167. notes-merge.h
  168. notes.c
  169. notes.h
  170. object.c
  171. object.h
  172. pack-check.c
  173. pack-refs.c
  174. pack-refs.h
  175. pack-revindex.c
  176. pack-revindex.h
  177. pack-write.c
  178. pack.h
  179. pager.c
  180. parse-options.c
  181. parse-options.h
  182. patch-delta.c
  183. patch-ids.c
  184. patch-ids.h
  185. path.c
  186. pkt-line.c
  187. pkt-line.h
  188. preload-index.c
  189. pretty.c
  190. progress.c
  191. progress.h
  192. quote.c
  193. quote.h
  194. reachable.c
  195. reachable.h
  196. read-cache.c
  197. README
  198. reflog-walk.c
  199. reflog-walk.h
  200. refs.c
  201. refs.h
  202. remote-curl.c
  203. remote.c
  204. remote.h
  205. replace_object.c
  206. rerere.c
  207. rerere.h
  208. resolve-undo.c
  209. resolve-undo.h
  210. revision.c
  211. revision.h
  212. run-command.c
  213. run-command.h
  214. send-pack.h
  215. server-info.c
  216. setup.c
  217. sha1-lookup.c
  218. sha1-lookup.h
  219. sha1_file.c
  220. sha1_name.c
  221. shallow.c
  222. shell.c
  223. shortlog.h
  224. show-index.c
  225. sideband.c
  226. sideband.h
  227. sigchain.c
  228. sigchain.h
  229. strbuf.c
  230. strbuf.h
  231. string-list.c
  232. string-list.h
  233. submodule.c
  234. submodule.h
  235. symlinks.c
  236. tag.c
  237. tag.h
  238. tar.h
  239. test-chmtime.c
  240. test-ctype.c
  241. test-date.c
  242. test-delta.c
  243. test-dump-cache-tree.c
  244. test-genrandom.c
  245. test-index-version.c
  246. test-line-buffer.c
  247. test-match-trees.c
  248. test-mktemp.c
  249. test-obj-pool.c
  250. test-parse-options.c
  251. test-path-utils.c
  252. test-run-command.c
  253. test-sha1.c
  254. test-sha1.sh
  255. test-sigchain.c
  256. test-string-pool.c
  257. test-subprocess.c
  258. test-svn-fe.c
  259. test-treap.c
  260. thread-utils.c
  261. thread-utils.h
  262. trace.c
  263. transport-helper.c
  264. transport.c
  265. transport.h
  266. tree-diff.c
  267. tree-walk.c
  268. tree-walk.h
  269. tree.c
  270. tree.h
  271. unimplemented.sh
  272. unpack-trees.c
  273. unpack-trees.h
  274. upload-pack.c
  275. url.c
  276. url.h
  277. usage.c
  278. userdiff.c
  279. userdiff.h
  280. utf8.c
  281. utf8.h
  282. walker.c
  283. walker.h
  284. wrap-for-bin.sh
  285. wrapper.c
  286. write_or_die.c
  287. ws.c
  288. wt-status.c
  289. wt-status.h
  290. xdiff-interface.c
  291. xdiff-interface.h
  292. zlib.c