git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] gitk: Markup many strings for translation.
@ 2007-07-27 20:19 Brett Schwarz
  2007-07-28  2:40 ` Paul Mackerras
  0 siblings, 1 reply; 4+ messages in thread
From: Brett Schwarz @ 2007-07-27 20:19 UTC (permalink / raw)
  To: Christian Stimming, Paul Mackerras; +Cc: git

> 
> ----- 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>

>   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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-28 12:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-27 20:19 [PATCH 2/2] gitk: Markup many strings for translation Brett Schwarz
2007-07-28  2:40 ` Paul Mackerras
2007-07-28 12:40   ` Christian Stimming
2007-07-28 12:52     ` [PATCH] gitk.git: Add Makefile with rules for po file creation Christian Stimming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).