Artifact
06227dc5253b75cc6b05b4ac81bf251012294983:
Attachment "bwidget-init.patch" to
ticket [4365a23bd3]
added by
anonymous
2013-06-13 12:52:30.
(unpublished)
--- original-bwidget-1.9.6/init.tcl 2010-08-04 15:35:54.000000000 +0100
+++ patched-bwidget-1.9.6/init.tcl 2013-06-09 18:37:24.000000000 +0100
@@ -31,17 +31,18 @@
# Try to load lang file corresponding to current msgcat locale
proc Widget::_opt_lang {} {
- set langfile [file join $::BWIDGET::LIBRARY "lang" "en.rc"]
if {0 != [llength [info commands ::msgcat::mcpreferences]]} {
- foreach lang [::msgcat::mcpreferences] {
- set l [file join $::BWIDGET::LIBRARY "lang" "$lang.rc"]
- if {[file readable $l]} {
- set langfile $l
- break
- }
+ set langs [::msgcat::mcpreferences]
+ }
+ lappend langs en
+
+ foreach lang $langs {
+ set l [file join $::BWIDGET::LIBRARY "lang" "$lang.rc"]
+ if {(![catch {file readable $l} result]) && ($result)} {
+ option read $l
+ break
}
}
- option read $langfile
}
Widget::_opt_lang