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

[PATCH 1/2] gitk: Import msgcat for translation support

From
Christian Stimming <stimming@tuhh.de>
Date
Jul 27, 2007, 14:53 UTC
Message-ID
<20070727165318.e96b1yxxwsooo884@webmail.tu-harburg.de>

Import tcl's msgcat package to have the [mc...] procedure for translation available.

However, in the current form gitk doesn't load any data a data directory or from anywhere; if it should load any translation catalogs, of course it needs to load them from a designated data directory. For testing, it uses the ./msgs/ subdirectory (marked as FIXME), but eventually a full-blown data directory needs to be added there instead.

Signed-off-by: Christian Stimming <stimming@tuhh.de>
---
Actual translation markup will follow.
  gitk |    7 +++++++
  1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/gitk b/gitk
index 39e452a..c01acfb 100755
--- a/gitk
+++ b/gitk
@@ -7463,6 +7463,13 @@ set fgcolor black
  set diffcolors {red "#00a000" blue}
  set selectbgcolor gray85

+## Internationalization (i18n) through msgcat and gettext. See
+## http://www.gnu.org/software/gettext/manual/html_node/Tcl.html
+package require msgcat
+namespace import ::msgcat::mc
+## FIXME: Need to define a suitable msgs/ directory here.
+::msgcat::mcload [file join . msgs]
+
  catch {source ~/.gitk}

  font create optionfont -family sans-serif -size -12
-- 
1.5.3.rc2.12.gbc280
Next: Christian Stimming
Message 1 of 9 in “gitk: Import msgcat for translation support”
  1. 1/2 gitk: Import msgcat for translation supportChristian Stimming, Jul 27, 2007
  2. 2/2 gitk: Markup many strings for translation.Christian Stimming, Jul 27, 2007
  3. Paul MackerrasJul 28, 2007
  4. Junio C HamanoJul 28, 2007
  5. Paul MackerrasJul 28, 2007
  6. Junio C HamanoJul 28, 2007
  7. gitk still interested in translations?Christian Stimming, Oct 21, 2007
  8. Paul MackerrasOct 23, 2007
  9. Paul MackerrasJul 27, 2007

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.