diff options
author | Kevin B Kenny <kennykb@acm.org> | 2003-10-21 00:23:33 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2003-10-21 00:23:33 (GMT) |
commit | 069e6b39be18f68043fb7389188c1e8d2a6afb06 (patch) | |
tree | 2ed74cd43101586ffe55de9721f1354589548214 /library/msgcat/msgcat.tcl | |
parent | 7c7a39a26c9bd772bf26ae6fd1be320d392d10db (diff) | |
download | tcl-069e6b39be18f68043fb7389188c1e8d2a6afb06.zip tcl-069e6b39be18f68043fb7389188c1e8d2a6afb06.tar.gz tcl-069e6b39be18f68043fb7389188c1e8d2a6afb06.tar.bz2 |
TIP #156: Language-Neutral Root Locale for Msgcat
Diffstat (limited to 'library/msgcat/msgcat.tcl')
-rw-r--r-- | library/msgcat/msgcat.tcl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl index 93c7214..08de274 100644 --- a/library/msgcat/msgcat.tcl +++ b/library/msgcat/msgcat.tcl @@ -10,12 +10,12 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: msgcat.tcl,v 1.18 2003/08/06 23:02:05 dgp Exp $ +# RCS: @(#) $Id: msgcat.tcl,v 1.19 2003/10/21 00:23:34 kennykb Exp $ package require Tcl 8.2 # When the version number changes, be sure to update the pkgIndex.tcl file, # and the installation directory in the Makefiles. -package provide msgcat 1.3.1 +package provide msgcat 1.4 namespace eval msgcat { namespace export mc mcload mclocale mcmax mcmset mcpreferences mcset \ @@ -234,6 +234,7 @@ proc msgcat::mclocale {args} { set word [string trimleft "${word}_${part}" _] set Loclist [linsert $Loclist 0 $word] } + lappend Loclist {} } return $Locale } @@ -268,6 +269,9 @@ proc msgcat::mcpreferences {} { proc msgcat::mcload {langdir} { set x 0 foreach p [mcpreferences] { + if { $p eq {} } { + set p ROOT + } set langfile [file join $langdir $p.msg] if {[file exists $langfile]} { incr x |