diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-14 09:38:11 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-14 09:38:11 (GMT) |
commit | e88c4704a6e5b1de286572acb8827f466f20c25c (patch) | |
tree | a4f332e4300ca0cd9660f06e2240d39d3d0c0eab /library/msgcat | |
parent | 715f2a416119bf40f0fd4cb42894f329bc69029e (diff) | |
download | tcl-e88c4704a6e5b1de286572acb8827f466f20c25c.zip tcl-e88c4704a6e5b1de286572acb8827f466f20c25c.tar.gz tcl-e88c4704a6e5b1de286572acb8827f466f20c25c.tar.bz2 |
Suggested fix for bug 3604576: msgcat -1.5.0.tm error on windows XP, inclusive bump to version 1.5.1.
Changelog entry still missing.
Diffstat (limited to 'library/msgcat')
-rw-r--r-- | library/msgcat/msgcat.tcl | 33 | ||||
-rw-r--r-- | library/msgcat/pkgIndex.tcl | 2 |
2 files changed, 18 insertions, 17 deletions
diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl index 112507a..fbb9730 100644 --- a/library/msgcat/msgcat.tcl +++ b/library/msgcat/msgcat.tcl @@ -13,7 +13,7 @@ package require Tcl 8.5 # When the version number changes, be sure to update the pkgIndex.tcl file, # and the installation directory in the Makefiles. -package provide msgcat 1.5.0 +package provide msgcat 1.5.1 namespace eval msgcat { namespace export mc mcload mclocale mcmax mcmset mcpreferences mcset \ @@ -550,23 +550,24 @@ proc msgcat::Init {} { # Those are translated to local strings. # Examples: de-CH -> de_ch, sr-Latn-CS -> sr_cs@latin, es-419 -> es # - set key {HKEY_CURRENT_USER\Control Panel\International} - if {([registry values $key "LocaleName"] ne "") - && [regexp {^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}))?(?:-.+)?$}\ - [string tolower [registry get $key "LocaleName"]] match locale\ - script territory]} { - if {"" ne $territory} { - append locale _ $territory - } - set modifierDict [dict create latn latin cyrl cyrillic] - if {[dict exists $modifierDict $script]} { - append locale @ [dict get $modifierDict $script] - } - if {![catch { + if {[catch { + set key {HKEY_CURRENT_USER\Control Panel\International} + if {([registry values $key "LocaleName"] ne "") + && [regexp {^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}))?(?:-.+)?$}\ + [string tolower [registry get $key "LocaleName"]] match locale\ + script territory]} { + if {"" ne $territory} { + append locale _ $territory + } + set modifierDict [dict create latn latin cyrl cyrillic] + if {[dict exists $modifierDict $script]} { + append locale @ [dict get $modifierDict $script] + } mclocale [ConvertLocale $locale] - }]} { - return } + }]} { + mclocale C + return } # then check key locale which contains a numerical language ID diff --git a/library/msgcat/pkgIndex.tcl b/library/msgcat/pkgIndex.tcl index 832bf81..3fdb25a 100644 --- a/library/msgcat/pkgIndex.tcl +++ b/library/msgcat/pkgIndex.tcl @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.5]} {return} -package ifneeded msgcat 1.5.0 [list source [file join $dir msgcat.tcl]] +package ifneeded msgcat 1.5.1 [list source [file join $dir msgcat.tcl]] |