Tcl Source Code

Artifact [b31f74099e]
Login

Artifact b31f74099e4bad1c7ff126271f64e10ac0a8e52d:

Attachment "msgcat-1.4.4.patch" to ticket [3536888fff] added by oehhar 2012-06-21 19:41:11.
16c16
< package provide msgcat 1.4.4
---
> package provide msgcat 1.4.5
467a468,498
>     }]} {
> 	mclocale C
> 	return
>     }
>     
>     # First check registry value LocalName present from Windows Vista
>     # which contains the local string as RFC5646, composed of:
>     # [a-z]{2,3} : language
>     # -[a-z]{4}  : script (optional, not used)
>     # -[a-z]{2}|[0-9]{3} : territory (optional, numerical region codes not used)
>     # (-.*)* : variant, extension, private use (optional, not used)
>     # Those are translated to local strings.
>     # Examples: de-CH -> de_ch, sr-Latn-CS -> sr_cs, es-419 -> es
>     #
>     if {    0 != [llength [registry values $key "LocaleName"]]
>             && [regexp {^([a-z]{2,3})(?:-[a-z]{4})?(?:-([a-z]{2}))?(?:-.+)?$}\
> 		[string tolower [registry get $key "LocaleName"]] match\
> 		locale territory]
>     } {
> 	if {"" ne $territory} {
> 	    append locale _ $territory
> 	}
> 	if {![catch {
> 	    mclocale [ConvertLocale $locale]
> 	}]} {
> 	    return
> 	}
>     }
> 
>     # then check key locale which contains a numerical language ID
>     if {[catch {