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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> ----- Original Message ----
> From: Paul Mackerras <paulus@xxxxxxxxx>
> To: Christian Stimming <stimming@xxxxxxx>
> Cc: git@xxxxxxxxxxxxxxx
> Sent: Friday, July 27, 2007 4:53:28 PM
> Subject: Re: [PATCH 1/2] gitk: Import msgcat for translation support
> 
> Christian Stimming writes:
> 
> > Import tcl's msgcat package to have the [mc...] procedure for  
> > translation available.
> 
> I would prefer
> 
> if {[catch {
>     package require msgcat
>     # rest of your new stuff
> }]} {
>     proc mc {str} {
>     return $str
>     }
> }
> 
> so that everything still works if msgcat isn't available.  In other
> words I don't want to introduce a possible regression by increasing
> gitk's requirements.

Junio already replied to this, and he was correct. However, this made me think
of something (that probably should be in git-gui as well) to make it a little
more robust. We should check that the msg directory is where we think it is,
and either give a warning, or exit the app (I would vote for the former).

So, something like:

set msgdir [file join . msgs]      ;# or whatever this turns out to be
if {[file exists $msgdir]} {
    ::msgcat::mcload $msgdir
} else {
    puts stderr "WTF: can't find message catalog directory"
}

Or you could just use [catch] around the ::msgcat::mcload too.


Regards,
    --brett




       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux