Re: [PATCH 2/2] gitk: Markup many strings for translation.
- From
- Brett 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/