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

[PATCH RFC 0/2] Mixing English and a local language

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Aug 25, 2012, 19:26 UTC
Message-ID
<1345922816-20616-1-git-send-email-pclouds@gmail.com>

The l10n effort leads to a situation where a contributor can submit a patch with some auto-generated information in his language, which may not be the team's language. We need to make sure exchange medium like patch is always in a common language that the team understands.

Now this team language may not necessarily be English. However there are technical difficulties involved in switching between two languages. The only way I can think of, on top of gettext, is provide git translations in multiple domains. Say diff machinery uses "git-diff" domain while the rest is in "git". We can drive gettext to use language X for diff machinery, and Y for the rest. For that, we replace gettext() with dgettext().

It's cumbersome. And there has not been any sign that there will be a real user for it. So I assume that the "team language" will always be English. It's simpler and should cover 90% of the user base. If someday people ask for that, supporting it is simply a matter of rewriting C_() and CQ_() macros in the first patch to use dgettext() instead.

Switching between a language and English is easier. We just need an if/else to decide whether to call gettext(). Which is what the first patch does, just for certain parts of diff machinery. Error messages will alway be in native language.

The second patch puts format-patch output in English unconditionally. Again I'm partly lazy and not so sure that there will be needs for format-patch to produce in native language. If someone needs it, we can introduce a new config key that flip no_l10n flag back to 0.

More commands may follow format-patch. I think that 'apply' should also use English for non-tty output, unless users request it to be in local language. IOW local language is treated pretty much like coloring.

Nguyễn Thái Ngọc Duy (2):
  Allow to print diffstat in English regardless current locale
  format-patch: always print diffstat in English
 builtin/apply.c |  2 +-
 builtin/log.c   |  1 +
 diff.c          | 19 ++++++++++++-------
 diff.h          |  3 ++-
 4 files changed, 16 insertions(+), 9 deletions(-)
-- 
1.7.12.rc1.27.g6d3049b.dirty
Next: Nguyễn Thái Ngọc Duy
Message 1 of 28 in “Mixing English and a local language”
  1. 0/2 Mixing English and a local languageNguyễn Thái Ngọc Duy, Aug 25, 2012
  2. 1/2 Allow to print diffstat in English regardless current localeNguyễn Thái Ngọc Duy, Aug 25, 2012
  3. 2/2 format-patch: always print diffstat in EnglishNguyễn Thái Ngọc Duy, Aug 25, 2012
  4. Nguyen Thai Ngoc DuySep 12, 2012
  5. Junio C HamanoSep 12, 2012
  6. Jeff KingSep 13, 2012
  7. Revert diffstat back to EnglishNguyễn Thái Ngọc Duy, Sep 13, 2012
  8. Jeff KingSep 13, 2012
  9. Junio C HamanoSep 13, 2012
  10. Junio C HamanoSep 13, 2012
  11. Jeff KingSep 13, 2012
  12. Junio C HamanoSep 13, 2012
  13. Jeff KingSep 13, 2012
  14. Junio C HamanoSep 13, 2012
  15. Jeff KingSep 13, 2012
  16. Junio C HamanoSep 13, 2012
  17. Jeff KingSep 14, 2012
  18. Nguyen Thai Ngoc DuySep 14, 2012
  19. Junio C HamanoSep 14, 2012
  20. Nguyen Thai Ngoc DuySep 15, 2012
  21. Junio C HamanoSep 13, 2012
  22. Junio C HamanoSep 13, 2012
  23. Jeff KingSep 13, 2012
  24. Jeff KingSep 13, 2012
  25. Michael J GruberSep 14, 2012
  26. Nguyen Thai Ngoc DuySep 14, 2012
  27. Makefile: respect $LINGUAS variable on selecting .mo files to installNguyễn Thái Ngọc Duy, Sep 14, 2012
  28. Michael J GruberSep 14, 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.