diff options
author | ericm <ericm@noemail.net> | 2000-06-30 06:38:36 (GMT) |
---|---|---|
committer | ericm <ericm@noemail.net> | 2000-06-30 06:38:36 (GMT) |
commit | 838900d054634385dd5c112d89874df9c5f80aaf (patch) | |
tree | e1487b56f6601752fc461670f73bc6d8ed46576a /library | |
parent | f2377634eeb3fab625da2bb56b6abd10bfa5580e (diff) | |
download | tk-838900d054634385dd5c112d89874df9c5f80aaf.zip tk-838900d054634385dd5c112d89874df9c5f80aaf.tar.gz tk-838900d054634385dd5c112d89874df9c5f80aaf.tar.bz2 |
* library/msgs/de.msg: German message catalog.
* library/msgs/en.msg: English message catalog.
* library/msgs/es.msg: Spanish message catalog.
* library/msgs/fr.msg: French message catalog.
* unix/Makefile.in:
* unix/configure.in:
* library/tk.tcl:
* library/clrpick.tcl:
* library/choosedir.tcl:
* library/console.tcl:
* library/msgbox.tcl:
* library/tkfbox.tcl:
* library/xmfbox.tcl:
* library/bgerror.tcl: Applied patches from Laurent Duperval to
provide localization of Tk dialogs. [RFE: 2671].
FossilOrigin-Name: fba5538c67f2c40b36cf85e267a90136a5a80bbd
Diffstat (limited to 'library')
-rw-r--r-- | library/bgerror.tcl | 26 | ||||
-rw-r--r-- | library/choosedir.tcl | 4 | ||||
-rw-r--r-- | library/clrpick.tcl | 42 | ||||
-rw-r--r-- | library/console.tcl | 42 | ||||
-rw-r--r-- | library/msgbox.tcl | 75 | ||||
-rw-r--r-- | library/msgs/de.msg | 67 | ||||
-rw-r--r-- | library/msgs/en.msg | 67 | ||||
-rw-r--r-- | library/msgs/es.msg | 67 | ||||
-rw-r--r-- | library/msgs/fr.msg | 67 | ||||
-rw-r--r-- | library/tk.tcl | 4 | ||||
-rw-r--r-- | library/tkfbox.tcl | 85 | ||||
-rw-r--r-- | library/xmfbox.tcl | 48 |
12 files changed, 464 insertions, 130 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl index 41c1ef3..cbdc309 100644 --- a/library/bgerror.tcl +++ b/library/bgerror.tcl @@ -9,10 +9,11 @@ # Copyright (c) 1998-2000 by Ajuba Solutions. # All rights reserved. # -# RCS: @(#) $Id: bgerror.tcl,v 1.11 2000/06/19 18:28:56 ericm Exp $ -# $Id: bgerror.tcl,v 1.11 2000/06/19 18:28:56 ericm Exp $ +# RCS: @(#) $Id: bgerror.tcl,v 1.12 2000/06/30 06:38:38 ericm Exp $ +# $Id: bgerror.tcl,v 1.12 2000/06/30 06:38:38 ericm Exp $ -option add *ErrorDialog.function.text "Save To Log" widgetDefault +option add *ErrorDialog.function.text [::msgcat::mc "Save To Log"] \ + widgetDefault option add *ErrorDialog.function.command "::tk::dialog::error::saveToLog" namespace eval ::tk {} @@ -51,11 +52,11 @@ proc ::tk::dialog::error::saveToLog {text} { set allFiles "*" } set types [list \ - [list "Log Files" .log] \ - [list "Text Files" .txt] \ - [list "All Files" $allFiles] \ + [list [::msgcat::mc "Log Files"] .log] \ + [list [::msgcat::mc "Text Files"] .txt] \ + [list [::msgcat::mc "All Files"] $allFiles] \ ] - set filename [tk_getSaveFile -title "Select Log File" \ + set filename [tk_getSaveFile -title [::msgcat::mc "Select Log File"] \ -filetypes $types -defaultextension .log -parent .bgerrorDialog] if {![string length $filename]} { return @@ -92,12 +93,12 @@ proc bgerror err { # Ok the application's tkerror either failed or was not found # we use the default dialog then : if {$tcl_platform(platform) == "macintosh"} { - set ok "Ok" + set ok [::msgcat::mc "Ok"] set messageFont system set textRelief "flat" set textHilight 0 } else { - set ok "OK" + set ok [::msgcat::mc "OK"] set messageFont {Times -18} set textRelief "sunken" set textHilight 1 @@ -124,9 +125,10 @@ proc bgerror err { } set w .bgerrorDialog - set title "Application Error" - set text "Error: $displayedErr" - set buttons [list ok $ok dismiss "Skip Messages" function "Details >>"] + set title [::msgcat::mc "Application Error"] + set text [::msgcat::mc "Error: %1\$s" $err] + set buttons [list ok $ok dismiss [::msgcat::mc "Skip Messages"] \ + function [::msgcat::mc "Details >>"]] # 1. Create the top-level window and divide it into top # and bottom parts. diff --git a/library/choosedir.tcl b/library/choosedir.tcl index bae35af..d9aa79d 100644 --- a/library/choosedir.tcl +++ b/library/choosedir.tcl @@ -5,7 +5,7 @@ # Copyright (c) 1998-2000 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: choosedir.tcl,v 1.8 2000/06/23 00:22:28 ericm Exp $ +# RCS: @(#) $Id: choosedir.tcl,v 1.9 2000/06/30 06:38:38 ericm Exp $ # Make sure the tk::dialog namespace, in which all dialogs should live, exists namespace eval ::tk::dialog {} @@ -135,7 +135,7 @@ proc ::tk::dialog::file::chooseDir::Config {dataName argList} { tclParseConfigSpec ::tk::dialog::file::$dataName $specs "" $argList if {$data(-title) == ""} { - set data(-title) "Choose Directory" + set data(-title) "[::msgcat::mc "Choose Directory"]" } # Stub out the -multiple value for the dialog; it doesn't make sense for diff --git a/library/clrpick.tcl b/library/clrpick.tcl index 0dac803..c173015 100644 --- a/library/clrpick.tcl +++ b/library/clrpick.tcl @@ -3,7 +3,7 @@ # Color selection dialog for platforms that do not support a # standard color selection dialog. # -# RCS: @(#) $Id: clrpick.tcl,v 1.10 2000/04/04 08:09:24 hobbs Exp $ +# RCS: @(#) $Id: clrpick.tcl,v 1.11 2000/06/30 06:38:38 ericm Exp $ # # Copyright (c) 1996 Sun Microsystems, Inc. # @@ -164,7 +164,7 @@ proc tkColorDialog_Config {w argList} { set specs [list \ [list -initialcolor "" "" $defaultColor] \ [list -parent "" "" "."] \ - [list -title "" "" "Color"] \ + [list -title "" "" [::msgcat::mc "Color"]] \ ] # 2: parse the arguments @@ -197,16 +197,21 @@ proc tkColorDialog_BuildDialog {w} { # StripsFrame contains the colorstrips and the individual RGB entries set stripsFrame [frame $topFrame.colorStrip] - foreach c { Red Green Blue } { - set color [string tolower $c] - + set maxWidth [::msgcat::mcmax Red Green Blue] + set maxWidth [expr $maxWidth<6?6:$maxWidth] + set colorList [list \ + red [::msgcat::mc "Red"] \ + green [::msgcat::mc "Green"] \ + blue [::msgcat::mc "Blue"] \ + ] + foreach {color l} $colorList { # each f frame contains an [R|G|B] entry and the equiv. color strip. set f [frame $stripsFrame.$color] # The box frame contains the label and entry widget for an [R|G|B] set box [frame $f.box] - label $box.label -text $c: -width 6 -under 0 -anchor ne + label $box.label -text $l: -width $maxWidth -under 0 -anchor ne entry $box.entry -textvariable [format %s $w]($color,intensity) \ -width 4 pack $box.label -side left -fill y -padx 2 -pady 3 @@ -251,7 +256,8 @@ proc tkColorDialog_BuildDialog {w} { # selected color # set selFrame [frame $topFrame.sel] - set lab [label $selFrame.lab -text "Selection:" -under 0 -anchor sw] + set lab [label $selFrame.lab -text [::msgcat::mc "Selection:"] \ + -under 0 -anchor sw] set ent [entry $selFrame.ent -textvariable [format %s $w](selection) \ -width 16] set f1 [frame $selFrame.f1 -relief sunken -bd 2] @@ -269,10 +275,14 @@ proc tkColorDialog_BuildDialog {w} { # the botFrame frame contains the buttons # set botFrame [frame $w.bot -relief raised -bd 1] - button $botFrame.ok -text OK -width 8 -under 0 \ - -command [list tkColorDialog_OkCmd $w] - button $botFrame.cancel -text Cancel -width 8 -under 0 \ - -command [list tkColorDialog_CancelCmd $w] + set maxWidth [::msgcat::mcmax OK Cancel] + set maxWidth [expr $maxWidth<8?8:$maxWidth] + button $botFrame.ok -text [::msgcat::mc "OK"] \ + -width $maxWidth -under 0 \ + -command [list tkColorDialog_OkCmd $w] + button $botFrame.cancel -text [::msgcat::mc "Cancel"] \ + -width $maxWidth -under 0 \ + -command [list tkColorDialog_CancelCmd $w] set data(okBtn) $botFrame.ok set data(cancelBtn) $botFrame.cancel @@ -309,7 +319,7 @@ proc tkColorDialog_SetRGBValue {w color} { tkColorDialog_RedrawColorBars $w all # Now compute the new x value of each colorbars pointer polygon - foreach color { red green blue } { + foreach color [list red green blue ] { set x [tkColorDialog_RgbToX $w $data($color,intensity)] tkColorDialog_MoveSelector $w $data($color,sel) $color $x 0 } @@ -582,7 +592,7 @@ proc tkColorDialog_ResizeColorBars {w} { set data(BARS_WIDTH) $data(NUM_COLORBARS) } tkColorDialog_InitValues $w - foreach color { red green blue } { + foreach color [list red green blue ] { $data($color,col) configure -width $data(canvasWidth) tkColorDialog_DrawColorScale $w $color 1 } @@ -617,7 +627,7 @@ proc tkColorDialog_HandleSelEntry {w} { proc tkColorDialog_HandleRGBEntry {w} { upvar #0 $w data - foreach c {red green blue} { + foreach c [list red green blue] { if {[catch { set data($c,intensity) [expr {int($data($c,intensity))}] }]} { @@ -632,8 +642,8 @@ proc tkColorDialog_HandleRGBEntry {w} { } } - tkColorDialog_SetRGBValue $w "$data(red,intensity) $data(green,intensity) \ - $data(blue,intensity)" + tkColorDialog_SetRGBValue $w "$data(red,intensity) \ + $data(green,intensity) $data(blue,intensity)" } # mouse cursor enters a color bar diff --git a/library/console.tcl b/library/console.tcl index d6a66ea..db27d34 100644 --- a/library/console.tcl +++ b/library/console.tcl @@ -4,7 +4,7 @@ # can be used by non-unix systems that do not have built-in support # for shells. # -# RCS: @(#) $Id: console.tcl,v 1.8 2000/04/21 04:06:37 hobbs Exp $ +# RCS: @(#) $Id: console.tcl,v 1.9 2000/06/30 06:38:38 ericm Exp $ # # Copyright (c) 1998-1999 Scriptics Corp. # Copyright (c) 1995-1997 Sun Microsystems, Inc. @@ -39,35 +39,37 @@ proc tkConsoleInit {} { .menubar add cascade -label Edit -menu .menubar.edit -underline 0 menu .menubar.file -tearoff 0 - .menubar.file add command -label "Source..." -underline 0 \ - -command tkConsoleSource - .menubar.file add command -label "Hide Console" -underline 0 \ - -command {wm withdraw .} + .menubar.file add command -label [::msgcat::mc "Source..."] \ + -underline 0 -command tkConsoleSource + .menubar.file add command -label [::msgcat::mc "Hide Console"] \ + -underline 0 -command {wm withdraw .} if {[string compare $tcl_platform(platform) "macintosh"]} { - .menubar.file add command -label "Exit" -underline 1 -command exit + .menubar.file add command -label [::msgcat::mc "Exit"] \ + -underline 1 -command exit } else { - .menubar.file add command -label "Quit" -command exit -accel Cmd-Q + .menubar.file add command -label [::msgcat::mc "Quit"] \ + -command exit -accel Cmd-Q } menu .menubar.edit -tearoff 0 - .menubar.edit add command -label "Cut" -underline 2 \ + .menubar.edit add command -label [::msgcat::mc "Cut"] -underline 2 \ -command { event generate .console <<Cut>> } -accel "$mod+X" - .menubar.edit add command -label "Copy" -underline 0 \ + .menubar.edit add command -label [::msgcat::mc "Copy"] -underline 0 \ -command { event generate .console <<Copy>> } -accel "$mod+C" - .menubar.edit add command -label "Paste" -underline 1 \ + .menubar.edit add command -label [::msgcat::mc "Paste"] -underline 1 \ -command { event generate .console <<Paste>> } -accel "$mod+V" if {[string compare $tcl_platform(platform) "windows"]} { - .menubar.edit add command -label "Clear" -underline 2 \ + .menubar.edit add command -label [::msgcat::mc "Clear"] -underline 2 \ -command { event generate .console <<Clear>> } } else { - .menubar.edit add command -label "Delete" -underline 0 \ + .menubar.edit add command -label [::msgcat::mc "Delete"] -underline 0 \ -command { event generate .console <<Clear>> } -accel "Del" - + .menubar add cascade -label Help -menu .menubar.help -underline 0 menu .menubar.help -tearoff 0 - .menubar.help add command -label "About..." -underline 0 \ - -command tkConsoleAbout + .menubar.help add command -label [::msgcat::mc "About..."] \ + -underline 0 -command tkConsoleAbout } . configure -menu .menubar @@ -93,7 +95,7 @@ proc tkConsoleInit {} { focus .console wm protocol . WM_DELETE_WINDOW { wm withdraw . } - wm title . "Console" + wm title . [::msgcat::mc "Console"] flush stdout .console mark set output [.console index "end - 1 char"] tkTextSetCursor .console end @@ -110,8 +112,10 @@ proc tkConsoleInit {} { proc tkConsoleSource {} { set filename [tk_getOpenFile -defaultextension .tcl -parent . \ - -title "Select a file to source" \ - -filetypes {{"Tcl Scripts" .tcl} {"All Files" *}}] + -title [::msgcat::mc "Select a file to source"] \ + -filetypes [list \ + [list [::msgcat::mc "Tcl Scripts"] .tcl] \ + [list [::msgcat::mc "All Files"] *]]] if {[string compare $filename ""]} { set cmd [list source $filename] if {[catch {consoleinterp eval $cmd} result]} { @@ -471,7 +475,7 @@ proc tkConsoleExit {} { proc tkConsoleAbout {} { global tk_patchLevel - tk_messageBox -type ok -message "Tcl for Windows + tk_messageBox -type ok -message "[::msgcat::mc {Tcl for Windows}] Copyright \251 2000 Scriptics Corporation Tcl [info patchlevel] diff --git a/library/msgbox.tcl b/library/msgbox.tcl index 369d4c9..1ed1acc 100644 --- a/library/msgbox.tcl +++ b/library/msgbox.tcl @@ -3,7 +3,7 @@ # Implements messageboxes for platforms that do not have native # messagebox support. # -# RCS: @(#) $Id: msgbox.tcl,v 1.11 2000/04/27 18:28:59 ericm Exp $ +# RCS: @(#) $Id: msgbox.tcl,v 1.12 2000/06/30 06:38:38 ericm Exp $ # # Copyright (c) 1994-1997 Sun Microsystems, Inc. # @@ -170,44 +170,67 @@ proc tkMessageBox {args} { switch -- $data(-type) { abortretryignore { - set buttons { - {abort -width 6 -text Abort -under 0} - {retry -width 6 -text Retry -under 0} - {ignore -width 6 -text Ignore -under 0} - } + set maxWidth [::msgcat::mcmax Abort Retry Ignore] + set maxWidth [expr $maxWidth<6?6:$maxWidth] + set buttons [list \ + [list abort -width $maxWidth -text [::msgcat::mc "Abort"] \ + -under 0]\ + [list retry -width $maxWidth -text [::msgcat::mc "Retry"] \ + -under 0]\ + [list ignore -width $maxWidth -text [::msgcat::mc "Ignore"] \ + -under 0]\ + ] } ok { - set buttons { - {ok -width 6 -text OK -under 0} - } + set buttons [list \ + [list ok -width [::msgcat::mcmax OK] \ + -text [::msgcat::mc {OK}] -under 0] \ + ] if {[string equal $data(-default) ""]} { set data(-default) "ok" } } okcancel { - set buttons { - {ok -width 6 -text OK -under 0} - {cancel -width 6 -text Cancel -under 0} - } + set maxWidth [::msgcat::mcmax OK Cancel] + set maxWidth [expr $maxWidth<6?6:$maxWidth] + set buttons [list \ + [list ok -width $maxWidth \ + -text [::msgcat::mc "OK"] -under 0] \ + [list cancel -width $maxWidth \ + -text [::msgcat::mc "Cancel"] -under 0] \ + ] } retrycancel { - set buttons { - {retry -width 6 -text Retry -under 0} - {cancel -width 6 -text Cancel -under 0} - } + set maxWidth [::msgcat::mcmax Retry Cancel] + set maxWidth [expr $maxWidth<6?6:$maxWidth] + set buttons [list \ + [list retry -width $maxWidth \ + -text [::msgcat::mc "Retry"] -under 0] \ + [list cancel -width $maxWidth \ + -text [::msgcat::mc "Cancel"] -under 0] \ + ] } yesno { - set buttons { - {yes -width 6 -text Yes -under 0} - {no -width 6 -text No -under 0} - } + set maxWidth [::msgcat::mcmax Yes No] + set maxWidth [expr $maxWidth<6?6:$maxWidth] + set buttons [list \ + [list yes -width $maxWidth \ + -text [::msgcat::mc "Yes"] -under 0]\ + [list no -width $maxWidth \ + -text [::msgcat::mc "No"] -under 0]\ + ] } yesnocancel { - set buttons { - {yes -width 6 -text Yes -under 0} - {no -width 6 -text No -under 0} - {cancel -width 6 -text Cancel -under 0} - } + set maxWidth [::msgcat::mcmax Yes No Cancel] + set maxWidth [expr $maxWidth<6?6:$maxWidth] + set buttons [list \ + [list yes -width $maxWidth \ + -text [::msgcat::mc "Yes"] -under 0]\ + [list no -width $maxWidth \ + -text [::msgcat::mc "No"] -under 0]\ + [list cancel -width $maxWidth \ + -text [::msgcat::mc "Cancel"] -under 0]\ + ] } default { error "bad -type value \"$data(-type)\": must be abortretryignore, ok, okcancel, retrycancel, yesno, or yesnocancel" diff --git a/library/msgs/de.msg b/library/msgs/de.msg new file mode 100644 index 0000000..8798da9 --- /dev/null +++ b/library/msgs/de.msg @@ -0,0 +1,67 @@ +::msgcat::mcset de "Abort" "Abbruch" +::msgcat::mcset de "About..." "Ueber..." +::msgcat::mcset de "All Files" "Alle Dateien" +::msgcat::mcset de "Application Error" "Applikationsfehler" +::msgcat::mcset de "Blue" "Blau" +::msgcat::mcset de "Cancel" "Abbruch" +::msgcat::mcset de "Cannot change to the directory \"%1\$s\".\nPermission denied." "Kann nicht in das Verzeichnis \"%1\$s\" wechseln.\nKeine Rechte vorhanden." +::msgcat::mcset de "Choose Directory" "Waehle Verzeichnis" +::msgcat::mcset de "Clear" "Ruecksetzen" +::msgcat::mcset de "Color" "Farbe" +::msgcat::mcset de "Console" "Konsole" +::msgcat::mcset de "Copy" "Kopieren" +::msgcat::mcset de "Cut" "Ausschneiden" +::msgcat::mcset de "Delete" "Loeschen" +::msgcat::mcset de "Details >>" +::msgcat::mcset de "Directory \"%1\$s\" does not exist." "Das Verzeichnis \"%1\$s\" existiert nicht." +::msgcat::mcset de "Directory:" "Verzeichnis:" +::msgcat::mcset de "Error: %1\$s" "Fehler: %1\$s" +::msgcat::mcset de "Exit" +::msgcat::mcset de "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Die Datei \"%1\$s\" ist bereits vorhanden.\nWollen sie diese Datei ueberschreiben ?" +::msgcat::mcset de "File \"%1\$s\" already exists.\n\n" "Die Datei \"%1\$s\" ist bereits vorhanden.\n\n" +::msgcat::mcset de "File \"%1\$s\" does not exist." "Die Datei \"%1\$s\" existiert nicht." +::msgcat::mcset de "File name:" "Dateiname:" +::msgcat::mcset de "File names:" "Nombre de archivos:" +::msgcat::mcset de "Files of type:" "Dateien des Typs:" +::msgcat::mcset de "Files:" "Dateien:" +::msgcat::mcset de "Filter" +::msgcat::mcset de "Filter:" +::msgcat::mcset de "Green" "Gruen" +::msgcat::mcset de "Hi" "Hallo" +::msgcat::mcset de "Hide Console" "Konsole unsichtbar machen" +::msgcat::mcset de "Ignore" "Ignorieren" +::msgcat::mcset de "Invalid file name \"%1\$s\"." "Ungueltiger Dateiname \"%1\$s\"." +::msgcat::mcset de "Log Files" "Protokolldatei" +::msgcat::mcset de "No" "Nein" +::msgcat::mcset de "OK" +::msgcat::mcset de "Ok" +::msgcat::mcset de "Open" "Oeffnen" +::msgcat::mcset de "Open Multiple Files" +::msgcat::mcset de "Paste" "Einfuegen" +::msgcat::mcset de "Quit" "Beenden" +::msgcat::mcset de "Red" "Rot" +::msgcat::mcset de "Replace existing file?" "Existierende Datei ersetzen ?" +::msgcat::mcset de "Retry" "Wiederholen" +::msgcat::mcset de "Save" "Speichern" +::msgcat::mcset de "Save As" "Speichern unter" +::msgcat::mcset de "Save To Log" "In Protokoll speichern" +::msgcat::mcset de "Select Log File" "Protokolldatei auswaehlen" +::msgcat::mcset de "Select a file to source" "Auszufuehrende Datei auswaehlen" +::msgcat::mcset de "Selection:" "Auswahl:" +::msgcat::mcset de "Skip Messages" "Weitere Nachrichten ueberspringen" +::msgcat::mcset de "Source..." "Ausfuehren..." +::msgcat::mcset de "Tcl Scripts" "Tcl Skripte" +::msgcat::mcset de "Tcl for Windows" "Tcl fuer Windows" +::msgcat::mcset de "Text Files" "Textdateien" +::msgcat::mcset de "Yes" "Ja" +::msgcat::mcset de "abort" "abbrechen" +::msgcat::mcset de "blue" "blau" +::msgcat::mcset de "cancel" "abbrechen" +::msgcat::mcset de "extension" "Erweiterung" +::msgcat::mcset de "extensions" "Erweiterungen" +::msgcat::mcset de "green" "gruen" +::msgcat::mcset de "ignore" "ignorieren" +::msgcat::mcset de "ok" +::msgcat::mcset de "red" "rot" +::msgcat::mcset de "retry" "wiederholen" +::msgcat::mcset de "yes" "ja" diff --git a/library/msgs/en.msg b/library/msgs/en.msg new file mode 100644 index 0000000..d49d543 --- /dev/null +++ b/library/msgs/en.msg @@ -0,0 +1,67 @@ +::msgcat::mcset en "Abort" +::msgcat::mcset en "About..." +::msgcat::mcset en "All Files" +::msgcat::mcset en "Application Error" +::msgcat::mcset en "Blue" +::msgcat::mcset en "Cancel" +::msgcat::mcset en "Cannot change to the directory \"%1\$s\".\nPermission denied." +::msgcat::mcset en "Choose Directory" +::msgcat::mcset en "Clear" +::msgcat::mcset en "Color" +::msgcat::mcset en "Console" +::msgcat::mcset en "Copy" +::msgcat::mcset en "Cut" +::msgcat::mcset en "Delete" +::msgcat::mcset en "Details >>" +::msgcat::mcset en "Directory \"%1\$s\" does not exist." +::msgcat::mcset en "Directory:" +::msgcat::mcset en "Error: %1\$s" +::msgcat::mcset en "Exit" +::msgcat::mcset en "File \"%1\$s\" already exists.\nDo you want to overwrite it?" +::msgcat::mcset en "File \"%1\$s\" already exists.\n\n" +::msgcat::mcset en "File \"%1\$s\" does not exist." +::msgcat::mcset en "File name:" +::msgcat::mcset en "File names:" +::msgcat::mcset en "Files of type:" +::msgcat::mcset en "Files:" +::msgcat::mcset en "Filter" +::msgcat::mcset en "Filter:" +::msgcat::mcset en "Green" +::msgcat::mcset en "Hi" +::msgcat::mcset en "Hide Console" +::msgcat::mcset en "Ignore" +::msgcat::mcset en "Invalid file name \"%1\$s\"." +::msgcat::mcset en "Log Files" +::msgcat::mcset en "No" +::msgcat::mcset en "OK" +::msgcat::mcset en "Ok" +::msgcat::mcset en "Open" +::msgcat::mcset en "Open Multiple Files" +::msgcat::mcset en "Paste" +::msgcat::mcset en "Quit" +::msgcat::mcset en "Red" +::msgcat::mcset en "Replace existing file?" +::msgcat::mcset en "Retry" +::msgcat::mcset en "Save" +::msgcat::mcset en "Save As" +::msgcat::mcset en "Save To Log" +::msgcat::mcset en "Select Log File" +::msgcat::mcset en "Select a file to source" +::msgcat::mcset en "Selection:" +::msgcat::mcset en "Skip Messages" +::msgcat::mcset en "Source..." +::msgcat::mcset en "Tcl Scripts" +::msgcat::mcset en "Tcl for Windows" +::msgcat::mcset en "Text Files" +::msgcat::mcset en "Yes" +::msgcat::mcset en "abort" +::msgcat::mcset en "blue" +::msgcat::mcset en "cancel" +::msgcat::mcset en "extension" +::msgcat::mcset en "extensions" +::msgcat::mcset en "green" +::msgcat::mcset en "ignore" +::msgcat::mcset en "ok" +::msgcat::mcset en "red" +::msgcat::mcset en "retry" +::msgcat::mcset en "yes" diff --git a/library/msgs/es.msg b/library/msgs/es.msg new file mode 100644 index 0000000..b61dc5a --- /dev/null +++ b/library/msgs/es.msg @@ -0,0 +1,67 @@ +::msgcat::mcset es "Abort" "Abortar" +::msgcat::mcset es "About..." "Acerca de ..." +::msgcat::mcset es "All Files" "Todos los archivos" +::msgcat::mcset es "Application Error" "Error de la aplicaci\u00f3n" +::msgcat::mcset es "Blue" "Azul" +::msgcat::mcset es "Cancel" "Cancelar" +::msgcat::mcset es "Cannot change to the directory \"%1\$s\".\nPermission denied." "No es posible acceder al directorio \"%1\$s\".\nPermiso denegado." +::msgcat::mcset es "Choose Directory" "Elegir directorio" +::msgcat::mcset es "Clear" "Borrar" +::msgcat::mcset es "Color" +::msgcat::mcset es "Console" "Consola" +::msgcat::mcset es "Copy" "Copiar" +::msgcat::mcset es "Cut" "Cortar" +::msgcat::mcset es "Delete" "Borrar" +::msgcat::mcset es "Details >>" +::msgcat::mcset es "Directory \"%1\$s\" does not exist." "El directorio \"%1\$s\" no existe." +::msgcat::mcset es "Directory:" "Directorio:" +::msgcat::mcset es "Error: %1\$s" +::msgcat::mcset es "Exit" "Salir" +::msgcat::mcset es "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "El archivo \"%1\$s\" ya existe.\nDesea sobreescribirlo?" +::msgcat::mcset es "File \"%1\$s\" already exists.\n\n" "El archivo \"%1\$s\" ya existe.\n\n" +::msgcat::mcset es "File \"%1\$s\" does not exist." "El archivo \"%1\$s\" no existe." +::msgcat::mcset es "File name:" "Nombre de archivo:" +::msgcat::mcset es "File names:" +::msgcat::mcset es "Files of type:" "Archivos de tipo:" +::msgcat::mcset es "Files:" "Archivos:" +::msgcat::mcset es "Filter" "Filtro" +::msgcat::mcset es "Filter:" "Filtro:" +::msgcat::mcset es "Green" "Verde" +::msgcat::mcset es "Hi" "Hola" +::msgcat::mcset es "Hide Console" "Esconder la consola" +::msgcat::mcset es "Ignore" "Ignorar" +::msgcat::mcset es "Invalid file name \"%1\$s\"." "Nombre de archivo inv\u00e1lido \"%1\$s\"." +::msgcat::mcset es "Log Files" "Ficheros de traza" +::msgcat::mcset es "No" +::msgcat::mcset es "OK" +::msgcat::mcset es "Ok" +::msgcat::mcset es "Open" "Abrir" +::msgcat::mcset es "Open Multiple Files" +::msgcat::mcset es "Paste" "Pegar" +::msgcat::mcset es "Quit" "Abandonar" +::msgcat::mcset es "Red" "Rojo" +::msgcat::mcset es "Replace existing file?" "Reemplazar el archivo existente?" +::msgcat::mcset es "Retry" "Reintentar" +::msgcat::mcset es "Save" "Salvar" +::msgcat::mcset es "Save As" "Salvar como" +::msgcat::mcset es "Save To Log" "Salvar al archivo de traza" +::msgcat::mcset es "Select Log File" "Elegir un archivo de traza" +::msgcat::mcset es "Select a file to source" "Seleccionar un archivo a evaluar" +::msgcat::mcset es "Selection:" "Selecci\u00f3n:" +::msgcat::mcset es "Skip Messages" "Omitir los mensajes" +::msgcat::mcset es "Source..." "Evaluar..." +::msgcat::mcset es "Tcl Scripts" "Scripts Tcl" +::msgcat::mcset es "Tcl for Windows" "Tcl para Windows" +::msgcat::mcset es "Text Files" "Archivos de texto" +::msgcat::mcset es "Yes" "Si" +::msgcat::mcset es "abort" "abortar" +::msgcat::mcset es "blue" "azul" +::msgcat::mcset es "cancel" "cancelar" +::msgcat::mcset es "extension" "extensi\u00f3n" +::msgcat::mcset es "extensions" "extensiones" +::msgcat::mcset es "green" "verde" +::msgcat::mcset es "ignore" "ignorar" +::msgcat::mcset es "ok" +::msgcat::mcset es "red" "rojo" +::msgcat::mcset es "retry" "reintentar" +::msgcat::mcset es "yes" "si" diff --git a/library/msgs/fr.msg b/library/msgs/fr.msg new file mode 100644 index 0000000..d0548aa --- /dev/null +++ b/library/msgs/fr.msg @@ -0,0 +1,67 @@ +::msgcat::mcset fr "Abort" "Annuler" +::msgcat::mcset fr "About..." "\u00c0 propos..." +::msgcat::mcset fr "All Files" "Tous les fichiers" +::msgcat::mcset fr "Application Error" "Erreur d'application" +::msgcat::mcset fr "Blue" "Bleu" +::msgcat::mcset fr "Cancel" "Annuler" +::msgcat::mcset fr "Cannot change to the directory \"%1\$s\".\nPermission denied." "Impossible d'acc\u00e9der au r\u00e9pertoire \"%1\$s\".\nPermission refus\u00e9e." +::msgcat::mcset fr "Choose Directory" "Choisir r\u00e9pertoire" +::msgcat::mcset fr "Clear" "Effacer" +::msgcat::mcset fr "Color" "Couleur" +::msgcat::mcset fr "Console" +::msgcat::mcset fr "Copy" "Copier" +::msgcat::mcset fr "Cut" "Couper" +::msgcat::mcset fr "Delete" "Effacer" +::msgcat::mcset fr "Details >>" "D\u00e9tails >>" +::msgcat::mcset fr "Directory \"%1\$s\" does not exist." +::msgcat::mcset fr "Directory:" "R\u00e9pertoire:" +::msgcat::mcset fr "Error: %1\$s" +::msgcat::mcset fr "Exit" +::msgcat::mcset fr "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Le fichier \"%1\$s\" existe d\u00e9j\u00e0.\nVoulez-vous l'\u00e9craser?" +::msgcat::mcset fr "File \"%1\$s\" already exists.\n\n" "Le fichier \"%1\$s\" existe d\u00e9j\u00e0.\n\n" +::msgcat::mcset fr "File \"%1\$s\" does not exist." "Le fichier \"%1\$s\" n'existe pas." +::msgcat::mcset fr "File name:" "Nom de fichier:" +::msgcat::mcset fr "File names:" "Noms de fichiers:" +::msgcat::mcset fr "Files of type:" "Type de fichiers:" +::msgcat::mcset fr "Files:" "Fichiers:" +::msgcat::mcset fr "Filter" "Filtre" +::msgcat::mcset fr "Filter:" "Filtre:" +::msgcat::mcset fr "Green" "Vert" +::msgcat::mcset fr "Hi" "All\u00f4" +::msgcat::mcset fr "Hide Console" "Cacher la Console" +::msgcat::mcset fr "Ignore" "Ignorer" +::msgcat::mcset fr "Invalid file name \"%1\$s\"." "Nom de fichier invalide \"%1\$s\"." +::msgcat::mcset fr "Log Files" "Fichiers de trace" +::msgcat::mcset fr "No" "Non" +::msgcat::mcset fr "OK" +::msgcat::mcset fr "Ok" +::msgcat::mcset fr "Open" "Ouvrir" +::msgcat::mcset fr "Open Multiple Files" "Ouvrir plusieurs fichiers" +::msgcat::mcset fr "Paste" "Coller" +::msgcat::mcset fr "Quit" "Abandonner" +::msgcat::mcset fr "Red" "Rouge" +::msgcat::mcset fr "Replace existing file?" "Remplacer fichier existant?" +::msgcat::mcset fr "Retry" "R\u00e9-essayer" +::msgcat::mcset fr "Save" "Sauvegarder" +::msgcat::mcset fr "Save As" "Sauvegarder sous" +::msgcat::mcset fr "Save To Log" "Sauvegarde au fichier de trace" +::msgcat::mcset fr "Select Log File" "Choisir un fichier de trace" +::msgcat::mcset fr "Select a file to source" "Choisir un fichier \u00e0 \u00e9valuer" +::msgcat::mcset fr "Selection:" "S\u00e9lection:" +::msgcat::mcset fr "Skip Messages" "Omettre les messages" +::msgcat::mcset fr "Source..." "\u00c9valuer..." +::msgcat::mcset fr "Tcl Scripts" "Scripts Tcl" +::msgcat::mcset fr "Tcl for Windows" "Tcl pour Windows" +::msgcat::mcset fr "Text Files" "Fichiers texte" +::msgcat::mcset fr "Yes" "Oui" +::msgcat::mcset fr "abort" "annuler" +::msgcat::mcset fr "blue" "bleu" +::msgcat::mcset fr "cancel" "annuler" +::msgcat::mcset fr "extension" +::msgcat::mcset fr "extensions" +::msgcat::mcset fr "green" "vert" +::msgcat::mcset fr "ignore" "ignorer" +::msgcat::mcset fr "ok" +::msgcat::mcset fr "red" "rouge" +::msgcat::mcset fr "retry" "r\u00e9-essayer" +::msgcat::mcset fr "yes" "oui" diff --git a/library/tk.tcl b/library/tk.tcl index 12ac1ba..32de9e1 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -3,7 +3,7 @@ # Initialization script normally executed in the interpreter for each # Tk-based application. Arranges class bindings for widgets. # -# RCS: @(#) $Id: tk.tcl,v 1.22 2000/05/29 01:43:15 hobbs Exp $ +# RCS: @(#) $Id: tk.tcl,v 1.23 2000/06/30 06:38:38 ericm Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -16,6 +16,8 @@ package require -exact Tk 8.4 package require -exact Tcl 8.4 +package require msgcat +::msgcat::mcload [file join $::tk_library msgs] # Add Tk's directory to the end of the auto-load search path, if it # isn't already on the path: diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index 9987abe..d8d9be1 100644 --- a/library/tkfbox.tcl +++ b/library/tkfbox.tcl @@ -11,7 +11,7 @@ # files by clicking on the file icons or by entering a filename # in the "Filename:" entry. # -# RCS: @(#) $Id: tkfbox.tcl,v 1.20 2000/06/23 00:22:28 ericm Exp $ +# RCS: @(#) $Id: tkfbox.tcl,v 1.21 2000/06/30 06:38:38 ericm Exp $ # # Copyright (c) 1994-1998 Sun Microsystems, Inc. # @@ -921,9 +921,9 @@ proc ::tk::dialog::file::Config {dataName type argList} { if {$data(-title) == ""} { if {[string equal $type "open"]} { - set data(-title) "Open" + set data(-title) "[::msgcat::mc "Open"]" } else { - set data(-title) "Save As" + set data(-title) "[::msgcat::mc "Save As"]" } } @@ -974,7 +974,7 @@ proc ::tk::dialog::file::Create {w class} { # f1: the frame with the directory option menu # set f1 [frame $w.f1] - label $f1.lab -text "Directory:" -under 0 + label $f1.lab -text "[::msgcat::mc "Directory:"]" -under 0 set data(dirMenuBtn) $f1.menu set data(dirMenu) [tk_optionMenu $f1.menu [format %s(selectPath) ::tk::dialog::file::$dataName] ""] set data(upBtn) [button $f1.up] @@ -1002,15 +1002,19 @@ static char updir_bits[] = { # if { [string equal $class TkFDialog] } { if { $data(-multiple) } { - set fNameCaption "File names:" + set fNameCaption "[::msgcat::mc {File names:}]" } else { - set fNameCaption "File name:" + set fNameCaption "[::msgcat::mc {File name:}]" } + set fTypeCaption [::msgcat::mc "Files of type:"] + set fCaptionWidth [::msgcat::mcmax $fNameCaption $fTypeCaption] + set fCaptionWidth [expr {$fCaptionWidth<14?14:$fCaptionWidth}] set fNameUnder 5 set iconListCommand [list ::tk::dialog::file::OkCmd $w] } else { - set fNameCaption "Selection:" + set fNameCaption [::msgcat::mc "Selection:"] set fNameUnder 0 + set fCaptionWidth [string length $fNameCaption] set iconListCommand [list ::tk::dialog::file::chooseDir::DblClick $w] } set data(icons) [tkIconList $w.icons \ @@ -1022,7 +1026,7 @@ static char updir_bits[] = { # f2: the frame with the OK button and the "file name" field # set f2 [frame $w.f2 -bd 0] - label $f2.lab -text $fNameCaption -anchor e -width 14 \ + label $f2.lab -text $fNameCaption -anchor e -width $fCaptionWidth \ -under $fNameUnder -pady 0 set data(ent) [entry $f2.ent] @@ -1043,8 +1047,8 @@ static char updir_bits[] = { # use a button widget to emulate a label widget (by setting its # bindtags) - set data(typeMenuLab) [button $f3.lab -text "Files of type:" \ - -anchor e -width 14 -under 9 \ + set data(typeMenuLab) [button $f3.lab -text $fTypeCaption \ + -anchor e -width $fCaptionWidth -under 9 \ -bd [$f2.lab cget -bd] \ -highlightthickness [$f2.lab cget -highlightthickness] \ -relief [$f2.lab cget -relief] \ @@ -1062,10 +1066,12 @@ static char updir_bits[] = { # the okBtn is created after the typeMenu so that the keyboard traversal # is in the right order - set data(okBtn) [button $f2.ok -text OK -under 0 -width 6 \ - -default active -pady 3] - set data(cancelBtn) [button $f3.cancel -text Cancel -under 0 -width 6\ - -default normal -pady 3] + set maxWidth [::msgcat::mcmax OK Cancel] + set maxWidth [expr {$maxWidth<6?6:$maxWidth}] + set data(okBtn) [button $f2.ok -text "[::msgcat::mc "OK"]" \ + -under 0 -width $maxWidth -default active -pady 3] + set data(cancelBtn) [button $f3.cancel -text "[::msgcat::mc "Cancel"]" \ + -under 0 -width $maxWidth -default normal -pady 3] # pack the widgets in f2 and f3 # @@ -1140,9 +1146,9 @@ proc ::tk::dialog::file::SetSelectMode {w multi} { set dataName __tk_filedialog upvar ::tk::dialog::file::$dataName data if { $multi } { - set fNameCaption "File names:" + set fNameCaption "[::msgcat::mc {File names:}]" } else { - set fNameCaption "File name:" + set fNameCaption "[::msgcat::mc {File name:}]" } set fNameUnder 5 set iconListCommand [list ::tk::dialog::file::OkCmd $w] @@ -1213,7 +1219,7 @@ rSASvJTGhnhcV3EJlo3kh53ltF5nAhQAOw==}] # we normally won't come to here. Anyways, give an error and abort # action. tk_messageBox -type ok -parent $w -message \ - "Cannot change to the directory \"$data(selectPath)\".\nPermission denied."\ + "[::msgcat::mc "Cannot change to the directory \"%1\$s\".\nPermission denied." $data(selectPath)]"\ -icon warning cd $appPWD return @@ -1293,9 +1299,19 @@ rSASvJTGhnhcV3EJlo3kh53ltF5nAhQAOw==}] # Restore the Open/Save Button if this is a File Dialog # if {[string equal $data(type) open]} { - $data(okBtn) config -text "Open" + $data(okBtn) config -text "[::msgcat::mc "Open"]" + set maxWidth [string length [::msgcat::mc "Open"]] + if {$maxWidth>[$data(okBtn) cget -width]} { + $data(okBtn) config -width $maxWidth + $data(cancelBtn) config -width $maxWidth + } } else { - $data(okBtn) config -text "Save" + $data(okBtn) config -text "[::msgcat::mc "Save"]" + set maxWidth [string length [::msgcat::mc "Save"]] + if {$maxWidth>[$data(okBtn) cget -width]} { + $data(okBtn) config -width $maxWidth + $data(cancelBtn) config -width $maxWidth + } } } @@ -1461,9 +1477,9 @@ proc ::tk::dialog::file::EntFocusIn {w} { if { [string equal [winfo class $w] TkFDialog] } { # If this is a File Dialog, make sure the buttons are labeled right. if {[string equal $data(type) open]} { - $data(okBtn) config -text "Open" + $data(okBtn) config -text "[::msgcat::mc "Open"]" } else { - $data(okBtn) config -text "Save" + $data(okBtn) config -text "[::msgcat::mc "Save"]" } } } @@ -1525,7 +1541,7 @@ proc ::tk::dialog::file::VerifyFileName {w filename} { FILE { if {[string equal $data(type) open]} { tk_messageBox -icon warning -type ok -parent $w \ - -message "File \"[file join $path $file]\" does not exist." + -message "[::msgcat::mc "File \"%1\$s\" does not exist." [file join $path $file]]" $data(ent) selection range 0 end $data(ent) icursor end } else { @@ -1540,20 +1556,20 @@ proc ::tk::dialog::file::VerifyFileName {w filename} { } PATH { tk_messageBox -icon warning -type ok -parent $w \ - -message "Directory \"$path\" does not exist." + -message "[::msgcat::mc "Directory \"%1\$s\" does not exist." $path]" $data(ent) selection range 0 end $data(ent) icursor end } CHDIR { tk_messageBox -type ok -parent $w -message \ - "Cannot change to the directory \"$path\".\nPermission denied."\ + "[::msgcat::mc "Cannot change to the directory \"%1\$s\".\nPermission denied." $path]"\ -icon warning $data(ent) selection range 0 end $data(ent) icursor end } ERROR { tk_messageBox -type ok -parent $w -message \ - "Invalid file name \"$path\"."\ + "[::msgcat::mc "Invalid file name \"%1\$s\"." $path]"\ -icon warning $data(ent) selection range 0 end $data(ent) icursor end @@ -1657,14 +1673,14 @@ proc ::tk::dialog::file::ListBrowse {w} { if { [string equal [winfo class $w] TkFDialog] } { if {[string equal $data(type) open]} { - $data(okBtn) config -text "Open" + $data(okBtn) config -text "[::msgcat::mc "Open"]" } else { - $data(okBtn) config -text "Save" + $data(okBtn) config -text "[::msgcat::mc "Save"]" } } } else { if { [string equal [winfo class $w] TkFDialog] } { - $data(okBtn) config -text "Open" + $data(okBtn) config -text "[::msgcat::mc "Open"]" } } } @@ -1687,7 +1703,7 @@ proc ::tk::dialog::file::ListInvoke {w text} { set appPWD [pwd] if {[catch {cd $file}]} { tk_messageBox -type ok -parent $w -message \ - "Cannot change to the directory \"$file\".\nPermission denied."\ + "[::msgcat::mc "Cannot change to the directory \"%1\$s\".\nPermission denied." $file]"\ -icon warning } else { cd $appPWD @@ -1732,12 +1748,11 @@ proc ::tk::dialog::file::Done {w {selectFilePath ""}} { if {[string equal $data(type) save]} { if {[file exists $selectFilePath]} { - set reply [tk_messageBox -icon warning -type yesno\ - -parent $w -message "File\ - \"$selectFilePath\" already exists.\nDo\ - you want to overwrite it?"] - if {[string equal $reply "no"]} { - return + set reply [tk_messageBox -icon warning -type yesno\ + -parent $w -message \ + "[::msgcat::mc "File \"%1\$s\" already exists.\nDo you want to overwrite it?" $selectFilePath]"] + if {[string equal $reply "no"]} { + return } } } diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl index 3ed5000..5a0dfb0 100644 --- a/library/xmfbox.tcl +++ b/library/xmfbox.tcl @@ -4,7 +4,7 @@ # Unix platform. This implementation is used only if the # "tk_strictMotif" flag is set. # -# RCS: @(#) $Id: xmfbox.tcl,v 1.12 2000/06/23 00:22:28 ericm Exp $ +# RCS: @(#) $Id: xmfbox.tcl,v 1.13 2000/06/30 06:38:39 ericm Exp $ # # Copyright (c) 1996 Sun Microsystems, Inc. # Copyright (c) 1998-2000 Scriptics Corporation @@ -235,12 +235,12 @@ proc tkMotifFDialog_Config {dataName type argList} { if {[string equal $data(-title) ""]} { if {[string equal $type "open"]} { if {$data(-multiple) != 0} { - set data(-title) "Open Multiple Files" + set data(-title) "[::msgcat::mc {Open Multiple Files}]" } else { - set data(-title) "Open" + set data(-title) [::msgcat::mc "Open"] } } else { - set data(-title) "Save As" + set data(-title) [::msgcat::mc "Save As"] } } @@ -321,7 +321,7 @@ proc tkMotifFDialog_BuildUI {w} { # The Filter box # - label $f1.lab -text "Filter:" -under 3 -anchor w + label $f1.lab -text [::msgcat::mc "Filter:"] -under 3 -anchor w entry $f1.ent pack $f1.lab -side top -fill x -padx 6 -pady 4 pack $f1.ent -side top -fill x -padx 4 -pady 0 @@ -329,12 +329,14 @@ proc tkMotifFDialog_BuildUI {w} { # The file and directory lists # - set data(dList) [tkMotifFDialog_MakeSList $w $f2a Directory: 0 DList] - set data(fList) [tkMotifFDialog_MakeSList $w $f2b Files: 2 FList] + set data(dList) [tkMotifFDialog_MakeSList $w $f2a \ + [::msgcat::mc "Directory:"] 0 DList] + set data(fList) [tkMotifFDialog_MakeSList $w $f2b \ + [::msgcat::mc "Files:"] 2 FList] # The Selection box # - label $f3.lab -text "Selection:" -under 0 -anchor w + label $f3.lab -text [::msgcat::mc "Selection:"] -under 0 -anchor w entry $f3.ent pack $f3.lab -side top -fill x -padx 6 -pady 0 pack $f3.ent -side top -fill x -padx 4 -pady 4 @@ -342,12 +344,17 @@ proc tkMotifFDialog_BuildUI {w} { # The buttons # - set data(okBtn) [button $bot.ok -text OK -width 6 -under 0 \ - -command [list tkMotifFDialog_OkCmd $w]] - set data(filterBtn) [button $bot.filter -text Filter -width 6 -under 0 \ - -command [list tkMotifFDialog_FilterCmd $w]] - set data(cancelBtn) [button $bot.cancel -text Cancel -width 6 -under 0 \ - -command [list tkMotifFDialog_CancelCmd $w]] + set maxWidth [::msgcat::mcmax OK Filter Cancel] + set maxWidth [expr $maxWidth<6?6:$maxWidth] + set data(okBtn) [button $bot.ok -text [::msgcat::mc "OK"] \ + -width $maxWidth -under 0 \ + -command [list tkMotifFDialog_OkCmd $w]] + set data(filterBtn) [button $bot.filter -text [::msgcat::mc "Filter"] \ + -width $maxWidth -under 0 \ + -command [list tkMotifFDialog_FilterCmd $w]] + set data(cancelBtn) [button $bot.cancel -text [::msgcat::mc "Cancel"] \ + -width $maxWidth -under 0 \ + -command [list tkMotifFDialog_CancelCmd $w]] pack $bot.ok $bot.filter $bot.cancel -padx 10 -pady 10 -expand yes \ -side left @@ -799,21 +806,24 @@ proc tkMotifFDialog_ActivateSEnt {w} { set item [file join $data(selectPath) $item] } elseif {![file exists [file dirname $item]]} { tk_messageBox -icon warning -type ok \ - -message "Directory \"[file dirname $item]\" does not exist." + -message [::msgcat::mc {Directory "%1$s" does not exist.} \ + [file dirname $item]] return } if {![file exists $item]} { if {[string equal $data(type) open]} { tk_messageBox -icon warning -type ok \ - -message "File \"$item\" does not exist." + -message [::msgcat::mc {File "$item" does not exist.} \ + $item] return } } else { if {[string equal $data(type) save]} { - set message [format %s%s \ - "File \"$item\" already exists.\n\n" \ - "Replace existing file?"] + set message [format %s%s \ + [::msgcat::mc {File "%1$s" already exists.\n\n} \ + $selectFilePath ] + [::msgcat::mc {Replace existing file?}]] set answer [tk_messageBox -icon warning -type yesno \ -message $message] if {[string equal $answer "no"]} { |