diff options
| author | oehhar <oehhar@noemail.net> | 2015-06-29 21:26:24 (GMT) |
|---|---|---|
| committer | oehhar <oehhar@noemail.net> | 2015-06-29 21:26:24 (GMT) |
| commit | 237dfdd0138ce066d208a3dc3367b8ead6cffbff (patch) | |
| tree | 6f4648cfbdafceea7207e7854f81c56916be0860 /library | |
| parent | 91eda87674401b5b77decf558d4d6c2cd7a4e260 (diff) | |
| download | tcl-tip-412.zip tcl-tip-412.tar.gz tcl-tip-412.tar.bz2 | |
Added tests for mcforgetpackage, mcpackagelocale and mcpackageconfigtip-412
FossilOrigin-Name: 4c6197ca80269af157c002344de78acc58400160
Diffstat (limited to 'library')
| -rwxr-xr-x | library/msgcat/msgcat.tcl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl index 0991f1c..5ed9f3a 100755 --- a/library/msgcat/msgcat.tcl +++ b/library/msgcat/msgcat.tcl @@ -468,8 +468,9 @@ proc msgcat::mcpackagelocale {subcommand {locale ""}} { get { return [lindex [PackagePreferences $ns] 0] } preferences { return [PackagePreferences $ns] } loaded { return [PackageLocales $ns] } - isset { return [dict exists $PackageConfig loclist $ns] } - set { # set a package locale or add a package locale + present { return [expr {$locale in [PackageLocales $ns]} ]} + isset { return [dict exists $PackageConfig loclist $ns] } + set { # set a package locale or add a package locale # Copy the default locale if no package locale set so far if {![dict exists $PackageConfig loclist $ns]} { @@ -667,7 +668,7 @@ proc msgcat::mcpackageconfig {subcommand option {value ""}} { } default { return -code error "unknown subcommand \"$subcommand\":\ - must be get, isset, unset, or set" + must be get, isset, set, or unset" } } return |
