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

Re: [PATCH 2/2] gitk: Markup many strings for translation.

From
BSBrett Schwarz <brett_schwarz@yahoo.com>
Date
Jul 27, 2007, 20:19 UTC
Message-ID
<959247.27950.qm@web38905.mail.mud.yahoo.com>
Show 13 quoted lines
> 
> ----- Original Message ----
> From: Christian Stimming <stimming@tuhh.de>
> To: Paul Mackerras <paulus@samba.org>
> Cc: git@vger.kernel.org
> Sent: Friday, July 27, 2007 8:03:00 AM
> Subject: [PATCH 2/2] gitk: Markup many strings for translation.
> 
> Similar to the discussion in git-gui, all user-visible strings are  
> passed through the [mc ...] procedure to have them translated by msgcat.
> 
> Signed-off-by: Christian Stimming <stimming@tuhh.de>
> ---
<snip>
Show 16 quoted lines
>   proc getcommitlines {fd view}  {
> @@ -273,7 +273,7 @@ proc chewcommits {view} {
>           #set ms [expr {[clock clicks -milliseconds] - $startmsecs}]
>           #puts "overall $ms ms for $numcommits commits"
>           } else {
> -        show_status "No commits selected"
> +        show_status [mc "No commits selected"]
>           }
>           notbusy layout
>           set phase {}
> @@ -378,7 +378,7 @@ proc getcommit {id} {
>       } else {
>       readcommit $id
>       if {![info exists commitinfo($id)]} {
> -        set commitinfo($id) {"No commit information available"}
> +        set commitinfo($id) {[mc "No commit information available"]}
I think this is probably a typo (on the original), and carrying that forward will probably result in what was not intended.
The original has the {} and "". I don't know if this was intended (it will keep the quotes).
The translated version, will result in a literal string [mc "No commit information available"], and unless it is explicitly eval'ed later, it will not result in the translated string.
So, if the quotes need to stay in the string, then the translation will have to be:
  set commitinfo($id) \"[mc "No commit information available"]\"
Or, if the quotes are not needed:
  set commitinfo($id) [mc "No commit information available"]
Regards,
    --brett
       
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/
Next: Paul Mackerras
Message 1 of 4 in “Re: [PATCH 2/2] gitk: Markup many strings for translation.”
  1. Brett SchwarzJul 27, 2007
  2. Paul MackerrasJul 28, 2007
  3. Christian StimmingJul 28, 2007
  4. gitk.git: Add Makefile with rules for po file creation.Christian Stimming, Jul 28, 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.