[GRASS-SVN] r44889 -
grass/branches/releasebranch_6_4/visualization/nviz/scripts
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 5 13:22:18 EST 2011
Author: marisn
Date: 2011-01-05 10:22:18 -0800 (Wed, 05 Jan 2011)
New Revision: 44889
Modified:
grass/branches/releasebranch_6_4/visualization/nviz/scripts/ACS_utils.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/attIsosurfPopup.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/attPopup.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/colorPopup.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/config.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/fileBrowser.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/filemapBrowser.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/flythrough.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/mapBrowser.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/multimapBrowser.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/nviz2.2_script
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_animation.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_arrow.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_color.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_cutplane.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_fringe.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_kanimator.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_label.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_legend.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_lights.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_main.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_pos.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_resize.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_rquery.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_scale.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_sdiff.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_site.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_surf.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_tst.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vect.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vol.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vquery.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_file_tools
grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_get_line
grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_play
grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_tools
grass/branches/releasebranch_6_4/visualization/nviz/scripts/site_attr.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/widgets.tcl
grass/branches/releasebranch_6_4/visualization/nviz/scripts/wirecolorPopup.tcl
Log:
Export TCL/Tk NVIZ strings for translation (merge r44354 r44588 and r44622 from develbranch6)
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/ACS_utils.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/ACS_utils.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/ACS_utils.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -309,7 +309,7 @@
}
# Fill controls (OK/CANCEL) section
-proc dialog_fill_controls {win varName focus {ok "OK"} {cancel "Cancel"}} {
+proc dialog_fill_controls [list win varName focus [list ok [G_msg "OK"]] [list cancel [G_msg "Cancel"]]] {
set cntls [dialog_controls $win]
button $cntls.ok -text $ok -command "dialog_setvar $varName 1"
@@ -328,7 +328,7 @@
option add *Warning*icon.bitmap "error" widgetDefault
option add *Warning*icon.msg.wrapLength 4i widgetDefault
##########################################################################################
-proc warning_ask {msg {ok "dismiss"}} {
+proc warning_ask [list msg [list [G_msg "ok"] [G_msg "dismiss"]]] {
global confirmStatus
set top [dialog_create Warning]
@@ -351,7 +351,7 @@
return $confirmStatus
}
-proc confirm_ask {msg {ok "OK"} {cancel "Cancel"}} {
+proc confirm_ask [list msg [list ok [G_msg "OK"]] [list cancel [G_msg "Cancel"]]] {
global confirmStatus
set top [dialog_create Confirm]
@@ -372,7 +372,7 @@
#
# lists "label" and "entries" are passed by name and the procedure access them via upvar
#
-proc modal_edit_list {msg labels entries images commands {ok "OK"} {cancel "Cancel"}} {
+proc modal_edit_list [list msg labels entries images commands [list ok [G_msg "OK"]] [list cancel [G_msg "Cancel"]]] {
global confirmStatus
# Pay attention!
@@ -427,7 +427,7 @@
return $confirmStatus
}
-proc modal_edit_list_old {msg labels entries {type "NO_MAP"} {ok "OK"} {cancel "Cancel"}} {
+proc modal_edit_list_old [list msg labels entries {type "NO_MAP"} [list ok [G_msg "OK"]] [list cancel [G_msg "Cancel"]]] {
global confirmStatus
# Pay attention!
@@ -472,7 +472,7 @@
#
# lists "label" and "entries" are passed by name and the procedure access them via upvar
#
-proc modal_edit_list_plain {msg labels entries {ok "OK"} {cancel "Cancel"}} {
+proc modal_edit_list_plain [list msg labels entries [list ok [G_msg "OK"]] [list cancel [G_msg "Cancel"]]] {
global confirmStatus
# Pay attention!
@@ -566,7 +566,7 @@
# addremove_list_create2 / addremove_list_move2
# use a double list for names and another for id's (not shown)
##################################################################################
-proc addremove_list_create2 {title left_msg right_msg left_entries right_entries left_ids right_ids {ok "OK"} {cancel "Cancel"}} {
+proc addremove_list_create2 [list title left_msg right_msg left_entries right_entries left_ids right_ids [list ok [G_msg "OK"]] [list cancel [G_msg "Cancel"]]] {
global confirmStatus
# Pay attention!
@@ -638,7 +638,7 @@
}
}
-proc addremove_list_create {title left_msg right_msg left_entries right_entries {ok "OK"} {cancel "Cancel"}} {
+proc addremove_list_create [list title left_msg right_msg left_entries right_entries [list ok [G_msg "OK"]] [list cancel [G_msg "Cancel"]]] {
global confirmStatus
# Pay attention!
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/attIsosurfPopup.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/attIsosurfPopup.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/attIsosurfPopup.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -33,8 +33,8 @@
wm positionfrom $w program
wm sizefrom $w program
- wm title $w "Attribute"
- wm iconname $w "Attribute"
+ wm title $w [G_msg "Attribute"]
+ wm iconname $w [G_msg "Attribute"]
wm geometry $w ""
wm maxsize $w 400 400
wm minsize $w 150 100
@@ -77,17 +77,17 @@
frame $w.f4
# popup label
- label $w.f1.name -text "Change attribute: $att"
+ label $w.f1.name -text [format [G_msg "Change attribute: %s"] $att]
pack $w.f1.name -side top -fill both -expand yes -padx 4 -pady 3
pack $w.f1 -side top -fill both -expand yes -padx 4 -pady 3
# left button
- button $w.f2.map -text "New map" -command "$cb1" -bd 1 -width 10
+ button $w.f2.map -text [G_msg "New map"] -command "$cb1" -bd 1 -width 10
# right button
if {"$att" == "mask"} then {
- button $w.f2.const -text "Remove mask" -command "$cb2" -bd 1 -width 10
- checkbutton $w.f2.invert -text "invert mask" -onvalue 1 \
+ button $w.f2.const -text [G_msg "Remove mask"] -command "$cb2" -bd 1 -width 10
+ checkbutton $w.f2.invert -text [G_msg "invert mask"] -onvalue 1 \
-offvalue 0 -variable attIsoPopup_InvertMask
set attIsoPopup_InvertMask [Nvol$curr isosurf get_mask_mode $id]
pack $w.f2.map $w.f2.const -side left -fill both -expand yes
@@ -95,8 +95,8 @@
-pady 2 -before $w.f2.map
} elseif {"$att" == "threshold" } then {
- button $w.f2.const -text "New constant" -command "$cb2" -bd 1 -width 10
- checkbutton $w.f2.use_color -text "use volume as color" -onvalue 1 \
+ button $w.f2.const -text [G_msg "New constant"] -command "$cb2" -bd 1 -width 10
+ checkbutton $w.f2.use_color -text [G_msg "use volume as color"] -onvalue 1 \
-offvalue 0 -variable attIsoPopup_UseColor
set attIsoPopup_UseColor 1
pack $w.f2.const -side left -fill both -expand yes
@@ -104,23 +104,25 @@
-pady 2 -before $w.f2.const
} else {
- button $w.f2.const -text "New constant" -command "$cb2" -bd 1 -width 10
+ button $w.f2.const -text [G_msg "New constant"] -command "$cb2" -bd 1 -width 10
pack $w.f2.map $w.f2.const -side left -fill x -expand yes
}
pack $w.f2 -side top -padx 3 -pady 3 -expand yes -fill both
# set current isosurface status
- label $w.f3.status -text "Curr. value: " -fg black
+ label $w.f3.status -text [G_msg "Curr. value: "] -fg black
set_isosurf_status $id $att
+ # attIsoPopup_Status is used to display statuss and also to keep state
+ # needs to be split in two components - state and user visible messages
label $w.f3.info -textvariable attIsoPopup_Status -fg black -font $nviztxtfont
pack $w.f3.status $w.f3.info -side left -fill x -expand yes -padx 4 -pady 3
pack $w.f3 -side top
# Accep, Cancel buttons
- button $w.f4.accept -text "Accept" -bd 1 \
+ button $w.f4.accept -text [G_msg "Accept"] -bd 1 \
-command "aip_check_invert $id $att ; destroy $w"
- button $w.f4.cancel -text "Cancel" -bd 1 \
+ button $w.f4.cancel -text [G_msg "Cancel"] -bd 1 \
-command "set attIsoPopup_Status \"no_change\" ; destroy $w"
pack $w.f4.accept $w.f4.cancel -side left -fill none -expand yes
pack $w.f4 -side top -padx 3 -pady 4 -expand 1 -fill both
@@ -270,7 +272,7 @@
proc aip_remove_mask {} {
global attIsoPopup_Status attIsoPopup_Type
- set attIsoPopup_Status "remove mask"
+ set attIsoPopup_Status [G_msg "remove mask"]
set attIsoPopup_Type constant
}
@@ -394,18 +396,18 @@
set cp_done 0
toplevel $w
- wm title $w "Constant"
+ wm title $w [G_msg "Constant"]
tkwait visibility $w
focus $w
- label $w.title -bd 2 -text "Enter value:"
+ label $w.title -bd 2 -text [G_msg "Enter value: "]
entry $w.constant -bd 2 -relief sunken
bind $w <Return> "set cp_done 1"
set row3 [frame $w.buttons]
- button $row3.ok -bd 1 -width 5 -text "Accept" -command "set cp_done 1" -default active
- button $row3.cancel -bd 1 -width 5 -text "Cancel" -command "destroy $w"
+ button $row3.ok -bd 1 -width 5 -text [G_msg "Accept"] -command "set cp_done 1" -default active
+ button $row3.cancel -bd 1 -width 5 -text [G_msg "Cancel"] -command "destroy $w"
pack $w.title $w.constant -side top -fill both -expand 1 \
-padx 4 -pady 4
@@ -440,18 +442,18 @@
set cp_done 0
toplevel $w
- wm title $w "Constant"
+ wm title $w [G_msg "Constant"]
tkwait visibility $w
focus -force $w
- label $w.title -text "Use slider to select constant value :" -width 25
+ label $w.title -text [G_msg "Use slider to select constant value :"] -width 25
scale $w.constant -from 0 -to 255 -showvalue yes \
-orient horizontal -activebackground gray80 \
-background gray90
set row3 [frame $w.buttons]
- button $row3.ok -bd 1 -width 5 -text "Accept" -command "set cp_done 1" -default active
- button $row3.cancel -bd 1 -width 5 -text "Cancel" -command "destroy $w"
+ button $row3.ok -bd 1 -width 5 -text [G_msg "Accept"] -command "set cp_done 1" -default active
+ button $row3.cancel -bd 1 -width 5 -text [G_msg "Cancel"] -command "destroy $w"
pack $w.title -side top -fill both -expand 1 \
-padx 4 -pady 4
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/attPopup.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/attPopup.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/attPopup.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -42,8 +42,8 @@
wm positionfrom $w program
wm sizefrom $w program
- wm title $w "Attribute"
- wm iconname $w "Attribute"
+ wm title $w [G_msg "Attribute"]
+ wm iconname $w [G_msg "Attribute"]
wm geometry $w ""
wm maxsize $w 400 400
wm minsize $w 150 100
@@ -85,17 +85,17 @@
frame $w.f4
# popup label
- label $w.f1.name -text "Change attribute: $att"
+ label $w.f1.name -text [format [G_msg "Change attribute: %s"] $att]
pack $w.f1.name -side top -fill both -expand yes -padx 4 -pady 3
# left button
- button $w.f2.map -text "New map" -command "$cb1" -bd 1 -width 10
+ button $w.f2.map -text [G_msg "New map"] -command "$cb1" -bd 1 -width 10
pack $w.f2.map -side left -fill x -expand yes
# right button
if {"$att" == "mask"} then {
- button $w.f2.const -text "Remove mask" -command "$cb2" -bd 1 -width 10
- checkbutton $w.f2.invert -text "invert mask" -onvalue 1 \
+ button $w.f2.const -text [G_msg "Remove mask"] -command "$cb2" -bd 1 -width 10
+ checkbutton $w.f2.invert -text [G_msg "invert mask"] -onvalue 1 \
-offvalue 0 -variable attPopup_InvertMask
set curr [Nget_current surf]
set attPopup_InvertMask [Nsurf$curr get_mask_mode]
@@ -103,34 +103,34 @@
-pady 2 -before $w.f2.map
} elseif {"$att" == "topography" } then {
- button $w.f2.const -text "New constant" -command "$cb2" -bd 1 -width 10
- checkbutton $w.f2.use_color -text "use as color" -onvalue 1 \
+ button $w.f2.const -text [G_msg "New constant"] -command "$cb2" -bd 1 -width 10
+ checkbutton $w.f2.use_color -text [G_msg "use as color"] -onvalue 1 \
-offvalue 0 -variable attPopup_UseColor
set attPopup_UseColor 1
pack $w.f2.use_color -side bottom -expand yes -fill both \
-pady 2 -before $w.f2.map
} elseif {"$att" == "emission" } then {
- label $w.f2.const -text "Constant not supported"
+ label $w.f2.const -text [G_msg "Constant not supported"]
} else {
- button $w.f2.const -text "New constant" -command "$cb2" -bd 1 -width 10
+ button $w.f2.const -text [G_msg "New constant"] -command "$cb2" -bd 1 -width 10
}
pack $w.f2.map $w.f2.const -side left -fill x -expand yes
pack $w.f2 -side top -padx 3 -pady 3 -fill both -expand yes
- label $w.f3.status -text "Curr. value: " -fg black
+ label $w.f3.status -text [G_msg "Curr. value: "] -fg black
set attPopup_Status [get_curr_status $att]
label $w.f3.info -textvariable attPopup_Status -fg black -font $nviztxtfont
pack $w.f3.status $w.f3.info -side left -fill x -expand yes -padx 4 -pady 3
pack $w.f3 -side top
- button $w.f4.accept -text "Accept" -bd 1 -width 5 -default active\
+ button $w.f4.accept -text [G_msg "Accept"] -bd 1 -width 5 -default active\
-command "ap_check_invert $att
if {$Nauto_draw == 1} {Ndraw_all}
destroy $w
"
- button $w.f4.cancel -text "Cancel" -bd 1 -width 5\
+ button $w.f4.cancel -text [G_msg "Cancel"] -bd 1 -width 5\
-command "set attPopup_Status \"no_change\" ; destroy $w"
pack $w.f4.accept $w.f4.cancel -side left -fill none -expand yes
pack $w.f4 -side top -padx 3 -pady 4 -expand 1 -fill both
@@ -263,7 +263,7 @@
set new [create_map_browser .browse_topo_file surf 1]
if { $new == "" } then { return }
- puts "returned from create_map_browser"
+ #puts "returned from create_map_browser"
set attPopup_Type non_constant
set attPopup_Status $new
}
@@ -316,7 +316,7 @@
set curr_color "#000000"
}
- set new_color [mkColorPopup .color_browse "Surface Color" $curr_color 1]
+ set new_color [mkColorPopup .color_browse [G_msg "Surface Color"] $curr_color 1]
# Finally pass the constant on to change the surface
set new_color [expr [tcl_to_rgb $new_color] + 0]
@@ -459,20 +459,20 @@
set return_val ''
toplevel $w
- wm title $w "Constant"
+ wm title $w [G_msg "Constant"]
# tkwait visibility $w
# focus $w
set row2 [frame $w.constentry]
# puts "CONSTANT: $w MODE: $mode"
- label $row2.title -text "Enter value:"
+ label $row2.title -text [G_msg "Enter value:"]
Entry $row2.const -bd 2 -relief sunken
bind $w <Return> "set cp_done 1"
set row3 [frame $w.buttons]
- button $row3.ok -bd 1 -width 5 -text "Accept" -command "set cp_done 1" -default active
- button $row3.cancel -bd 1 -width 5 -text "Cancel" -command "destroy $w"
+ button $row3.ok -bd 1 -width 5 -text [G_msg "Accept"] -command "set cp_done 1" -default active
+ button $row3.cancel -bd 1 -width 5 -text [G_msg "Cancel"] -command "destroy $w"
pack $row2.title $row2.const -side top -fill both -expand 1 \
-padx 4 -pady 4
@@ -509,18 +509,18 @@
set cp_done 0
toplevel $w
- wm title $w "Constant"
+ wm title $w [G_msg "Constant"]
tkwait visibility $w
focus -force $w
- label $w.title -text "Use slider to set value" -width 25
+ label $w.title -text [G_msg "Use slider to set value"] -width 25
scale $w.constant -from 0 -to 255 -showvalue yes \
-orient horizontal -activebackground gray80 \
-background gray90
set row3 [frame $w.buttons]
- button $row3.ok -bd 1 -width 5 -text "Accept" -command "set cp_done 1" -default active
- button $row3.cancel -bd 1 -width 5 -text "Cancel" -command "destroy $w"
+ button $row3.ok -bd 1 -width 5 -text [G_msg "Accept"] -command "set cp_done 1" -default active
+ button $row3.cancel -bd 1 -width 5 -text [G_msg "Cancel"] -command "destroy $w"
pack $w.title -side top -fill both -expand 1 \
-padx 4 -pady 4
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/colorPopup.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/colorPopup.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/colorPopup.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -14,7 +14,7 @@
global CurrColor
-proc mkColorPopup {w {name "Choose color"} {color "#000000"} {mode 0}} {
+proc mkColorPopup [list w [list name [G_msg "Choose color"]] {color "#000000"} {mode 0}] {
global CurrColor
set CurrColor [tk_chooseColor -initialcolor $color -title $name]
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/config.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/config.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/config.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -106,3 +106,6 @@
option add *menubutton.borderwidth 1
option add *button.borderWidth 1
+# All supported point types
+set Nv_(siteshapes) [list {x} {sphere} {diamond} {cube} {box} {gyro} {aster} {histogram} ]
+set Nv_(siteshape_names) [list [G_msg "x"] [G_msg "sphere"] [G_msg "diamond"] [G_msg "cube"] [G_msg "box"] [G_msg "gyro"] [G_msg "aster"] [G_msg "histogram"]]
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/fileBrowser.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/fileBrowser.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/fileBrowser.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -79,7 +79,7 @@
bind $w.filename <Return> "set_selection_from_file_browser_filename $w"
frame $w.main
frame $w.main.directories
- label $w.main.directories.label -text DIRECTORIES
+ label $w.main.directories.label -text [G_msg "DIRECTORIES"]
frame $w.main.directories.f
listbox $w.main.directories.f.list -bd 2 -relief sunken \
-exportselection no -selectbackground LightYellow1 -bg white \
@@ -96,7 +96,7 @@
"file_browser_select_directories %W %y $w"
frame $w.main.files
- label $w.main.files.label -text FILES
+ label $w.main.files.label -text [G_msg "FILES"]
frame $w.main.files.f
listbox $w.main.files.f.list -bd 2 -relief sunken -exportselection no \
-selectbackground LightYellow1 -bg white\
@@ -110,13 +110,13 @@
bind $w.main.files.f.list <ButtonRelease-1> "file_browser_select_file %W %y $w"
- button $w.accept -text Accept -command "catch {fileBrowser_accept_cmd $w}" -bd 1 \
+ button $w.accept -text [G_msg "Accept"] -command "catch {fileBrowser_accept_cmd $w}" -bd 1 \
-width 6 -default active
- button $w.cancel -text Cancel -command "fileBrowser_cancel_cmd $w" -bd 1 \
+ button $w.cancel -text [G_msg "Cancel"] -command "fileBrowser_cancel_cmd $w" -bd 1 \
-width 6
frame $w.cur_directory
- label $w.cur_directory.label -text "Current:"
+ label $w.cur_directory.label -text [G_msg "Current:"]
label $w.cur_directory.entry -relief flat -justify left -anchor w -bg grey90\
-textvariable file_browser($w,cur_dir) -font $nviztxtfont -fg black
@@ -151,7 +151,7 @@
# set_file_browser_directories $w {}
set_file_browser_directories $w $last_dir
if {$no_top == 0} {
- wm title $w "File Browser"
+ wm title $w [G_msg "File Browser"]
wm protocol $w WM_DELETE_WINDOW "destroy $w"
}
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/filemapBrowser.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/filemapBrowser.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/filemapBrowser.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -95,13 +95,13 @@
scrollbar $w.list.l.scroll \
-command "$w.list.l.list yview"
- button $w.list.remove -text "Remove" -bd 1 \
+ button $w.list.remove -text [G_msg "Remove"] -bd 1 \
-command "multimap_remove_cmd $w"
pack $w.list.l.list $w.list.l.scroll -side left -fill y -expand yes
pack $w.list.l $w.list.remove -side top -fill x -expand yes
frame $w.main.mapsets
- label $w.main.mapsets.label -text MAPSETS
+ label $w.main.mapsets.label -text [G_msg "MAPSETS"]
frame $w.main.mapsets.f
listbox $w.main.mapsets.f.list -bd 2 -relief sunken \
-exportselection no \
@@ -115,7 +115,7 @@
"filemap_browser_select_mapset %W %y $w"
frame $w.main.files
- label $w.main.files.label -text FILES
+ label $w.main.files.label -text [G_msg "FILES"]
frame $w.main.files.f
listbox $w.main.files.f.list -bd 2 -relief sunken \
-exportselection no \
@@ -145,32 +145,32 @@
}
if [string compare $type all] {
- label $w.element.menu -text "Map Type:" -relief raised
+ label $w.element.menu -text [G_msg "Map Type:"] -relief raised
} else {
set name ""
- menubutton $w.element.menu -text {Map Type} -menu $w.element.menu.m -relief raised -bd 1
+ menubutton $w.element.menu -text [G_msg "Map Type"] -menu $w.element.menu.m -relief raised -bd 1
menu $w.element.menu.m
$w.element.menu.m add command \
- -label {Raster} -command "set_filemap_browser_element $w Raster"
+ -label [G_msg "Raster"] -command "set_filemap_browser_element $w Raster"
$w.element.menu.m add command \
- -label {Vector} -command "set_filemap_browser_element $w Vector"
+ -label [G_msg "Vector"] -command "set_filemap_browser_element $w Vector"
$w.element.menu.m add command \
- -label {Site} -command "set_filemap_browser_element $w Site"
+ -label [G_msg "Site"] -command "set_filemap_browser_element $w Site"
$w.element.menu.m add command \
- -label {Surf} -command "set_filemap_browser_element $w Surf"
+ -label [G_msg "Surf"] -command "set_filemap_browser_element $w Surf"
$w.element.menu.m add command \
- -label {Regions} -command "set_filemap_browser_element $w windows"
+ -label [G_msg "Regions"] -command "set_filemap_browser_element $w windows"
$w.element.menu.m add command \
- -label {Labels} -command "set_filemap_browser_element $w\
+ -label [G_msg "Labels"] -command "set_filemap_browser_element $w\
paint/labels"
$w.element.menu.m add command \
- -label {Icons} -command "set_filemap_browser_element $w icons"
+ -label [G_msg "Icons"] -command "set_filemap_browser_element $w icons"
}
- button $w.blank -text Blank -command "multimap_blank_cmd $w" -bd 1
- button $w.previous -text Previous -command "multimap_previous_cmd $w" -bd 1
- button $w.done -text Done -command "multimap_done_cmd $w" -bd 1
- button $w.cancel -text Cancel -command "multimap_cancel_cmd $w" -bd 1
+ button $w.blank -text [G_msg "Blank"] -command "multimap_blank_cmd $w" -bd 1
+ button $w.previous -text [G_msg "Previous"] -command "multimap_previous_cmd $w" -bd 1
+ button $w.done -text [G_msg "Done"] -command "multimap_done_cmd $w" -bd 1
+ button $w.cancel -text [G_msg "Cancel"] -command "multimap_cancel_cmd $w" -bd 1
pack $w.filename -side top -expand yes -fill x
pack $w.main -side top
@@ -198,7 +198,7 @@
}
set_filemap_browser_element $w $name
set_filemap_browser_mapset $w {}
- wm title $w "Map Browser"
+ wm title $w [G_msg "Map Browser"]
wm protocol $w WM_DELETE_WINDOW "destroy $w"
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/flythrough.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/flythrough.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/flythrough.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -57,19 +57,19 @@
set fly(CENTER_RADIOBUTTON) $draw_var2
set fly(FLY_RADIOBUTTON) [radiobutton $BASE.$frame.b3 \
- -variable draw_option -value 3 -text "fly"\
+ -variable draw_option -value 3 -text [G_msg "fly"]\
-command "set Nv_(FlyThrough) 1; fly_change_mode 0" ]
set fly(FLY_MENUBUTTON) $BASE.$frame.flymenu
set m $fly(FLY_MENUBUTTON).m
- menubutton $fly(FLY_MENUBUTTON) -menu $m -text "none" -relief flat -indicatoron 1 -bd -5
+ menubutton $fly(FLY_MENUBUTTON) -menu $m -text [G_msg "none"] -relief flat -indicatoron 1 -bd -5
menu $m -tearoff 0
- $m add radiobutton -label "basic" -command "fly_change_mode 0" -variable fly(FLY_MODE) -value "basic"
- $m add radiobutton -label "simple" -command "fly_change_mode 2" -variable fly(FLY_MODE) -value "simple"
- $m add radiobutton -label "orbit" -command "fly_change_mode 1" -variable fly(FLY_MODE) -value "orbit"
+ $m add radiobutton -label [G_msg "basic"] -command "fly_change_mode 0" -variable fly(FLY_MODE) -value "basic"
+ $m add radiobutton -label [G_msg "simple"] -command "fly_change_mode 2" -variable fly(FLY_MODE) -value "simple"
+ $m add radiobutton -label [G_msg "orbit"] -command "fly_change_mode 1" -variable fly(FLY_MODE) -value "orbit"
fly_deselect
@@ -80,10 +80,10 @@
set fly(BUTTONS) [frame $BASE.f -borderwidth 0 -relief flat]
frame $fly(BUTTONS).buttons -border 0 -relief flat
- set fly(COARSE_DRAW_B) [checkbutton $fly(BUTTONS).buttons.coarse -text "Coarse Draw" \
+ set fly(COARSE_DRAW_B) [checkbutton $fly(BUTTONS).buttons.coarse -text [G_msg "Coarse Draw"] \
-onvalue 1 -offvalue 0 -variable coarse_draw]
$fly(COARSE_DRAW_B) select
- set fly(FLY_HELP_PANEL) [button $fly(BUTTONS).buttons.fly_help_panel -text "fly help" -command "fly_create_help_panel"]
+ set fly(FLY_HELP_PANEL) [button $fly(BUTTONS).buttons.fly_help_panel -text [G_msg "fly help"] -command "fly_create_help_panel"]
pack $fly(COARSE_DRAW_B) $fly(FLY_HELP_PANEL) -side top -pady 20 -padx 2
set scales [Nget_fly_scale]
@@ -111,7 +111,7 @@
global XY Nv_ fly
set Nv_(FlyThrough) 1
- inform "Interactively set view position"
+ inform [G_msg "Interactively set view position"]
pack forget $XY $Nv_(HEIGHT_SLIDER) $Nv_(TWIST_SLIDER)
Nset_fly_mode $flag
pack $fly(BUTTONS) -side left -before $Nv_(EXAG_SLIDER) -expand y
@@ -132,13 +132,13 @@
toplevel $W
wm resizable $W false false
- wm title $W "flythrough help"
+ wm title $W [G_msg "flythrough help"]
frame $W.lab
set row 0
set lab $W.lab.fly
- label $lab -text "fly" -relief flat -borderwidth 0 -background grey90
+ label $lab -text [G_msg "fly"] -relief flat -borderwidth 0 -background grey90
grid $lab -row $row -column 1 -columnspan 1 -sticky nse
set lab $W.lab.sep3
@@ -146,7 +146,7 @@
grid $lab -row $row -column 2 -sticky nsew
set lab $W.lab.basic
- label $lab -text "basic" -relief flat -borderwidth 1 -background grey80
+ label $lab -text [G_msg "basic"] -relief flat -borderwidth 1 -background grey80
grid $lab -row $row -column 3 -columnspan 2 -sticky nsew
set lab $W.lab.sep1
@@ -154,7 +154,7 @@
grid $lab -row $row -column 5 -sticky nsew
set lab $W.lab.simple
- label $lab -text "simple" -relief flat -borderwidth 1 -background grey80
+ label $lab -text [G_msg "simple"] -relief flat -borderwidth 1 -background grey80
grid $lab -row $row -column 6 -columnspan 2 -sticky nsew
set lab $W.lab.sep2
@@ -162,7 +162,7 @@
grid $lab -row $row -column 8 -sticky nsew
set lab $W.lab.orbit
- label $lab -text "orbit" -relief flat -borderwidth 1 -background grey80
+ label $lab -text [G_msg "orbit"] -relief flat -borderwidth 1 -background grey80
grid $lab -row $row -column 9 -columnspan 2 -sticky nsew
incr row
@@ -171,7 +171,7 @@
incr row
set lab $W.lab.move
- label $lab -text "move" -relief flat -borderwidth 1 -background grey80
+ label $lab -text [G_msg "move"] -relief flat -borderwidth 1 -background grey80
grid $lab -row $row -column 0 -sticky nsew
fly_label_row $W.lab $row "fwd/bkw" [list $fly(B_CL) $fly(B_L) $fly(B_CL)] [list $fly(B_CR) $fly(M_UD) $fly(B_CR)]
@@ -193,7 +193,7 @@
incr row
set lab $W.lab.turn
- label $lab -text "turn" -relief flat -borderwidth 1 -background grey80
+ label $lab -text [G_msg "turn"] -relief flat -borderwidth 1 -background grey80
grid $lab -row $row -column 0 -sticky nsew
fly_label_row $W.lab $row "heading" [list $fly(B_C) $fly(B_L) $fly(B_C)] [list $fly(M_LR) $fly(M_LR) $fly(M_LR)]
@@ -267,8 +267,8 @@
proc fly_deselect {} {
global fly;
$fly(FLY_RADIOBUTTON) deselect
- $fly(FLY_MENUBUTTON) configure -text "none"
- set fly(FLY_MODE) "basic"
+ $fly(FLY_MENUBUTTON) configure -text [G_msg "none"]
+ set fly(FLY_MODE) [G_msg "basic"]
}
proc fly_select {} {
global fly;
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/mapBrowser.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/mapBrowser.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/mapBrowser.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -138,7 +138,7 @@
global nviztxtfont
toplevel $w
- wm title $w "Map Browser"
+ wm title $w [G_msg "Map Browser"]
tkwait visibility $w
#puts "BROWSER: $w TYPE: $type MODE: $mode"
@@ -147,7 +147,7 @@
bind $w.filename <Return> "set_selection_from_map_browser_filename $w"
frame $w.main
frame $w.main.mapsets
- label $w.main.mapsets.label -text "MAPSETS"
+ label $w.main.mapsets.label -text [G_msg "MAPSETS"]
frame $w.main.mapsets.f
listbox $w.main.mapsets.f.list -bd 2 -relief sunken -bg white \
-exportselection no \
@@ -165,7 +165,7 @@
"map_browser_select_mapset %W %y $w"
frame $w.main.files
- label $w.main.files.label -text FILES
+ label $w.main.files.label -text [G_msg "FILES"]
frame $w.main.files.f
listbox $w.main.files.f.list -bd 2 -relief sunken -bg white \
-exportselection no \
@@ -201,32 +201,32 @@
}
if [string compare $type all] {
- Label $w.element.menu -text "Map type:" -fg black -font $nviztxtfont
+ Label $w.element.menu -text [G_msg "Map type:"] -fg black -font $nviztxtfont
} else {
set name ""
- menubutton $w.element.menu -text {Map Type} -menu $w.element.menu.m -relief raised -bd 1
+ menubutton $w.element.menu -text [G_msg "Map Type"] -menu $w.element.menu.m -relief raised -bd 1
menu $w.element.menu.m
$w.element.menu.m add command \
- -label {Raster} -command "set_map_browser_element $w Raster"
+ -label [G_msg "Raster"] -command "set_map_browser_element $w Raster"
$w.element.menu.m add command \
- -label {Vector} -command "set_map_browser_element $w Vector"
+ -label [G_msg "Vector"] -command "set_map_browser_element $w Vector"
$w.element.menu.m add command \
- -label {Site} -command "set_map_browser_element $w Site"
+ -label [G_msg "Site"] -command "set_map_browser_element $w Site"
$w.element.menu.m add command \
- -label {Surf} -command "set_map_browser_element $w Surf"
+ -label [G_msg "Surf"] -command "set_map_browser_element $w Surf"
$w.element.menu.m add command \
- -label {3d.view} -command "set_map_browser_element $w 3d.view"
+ -label [G_msg "3d.view"] -command "set_map_browser_element $w 3d.view"
$w.element.menu.m add command \
- -label {Regions} -command "set_map_browser_element $w windows"
+ -label [G_msg "Regions"] -command "set_map_browser_element $w windows"
$w.element.menu.m add command \
- -label {Labels} -command "set_map_browser_element $w\
+ -label [G_msg "Labels"] -command "set_map_browser_element $w\
paint/labels"
$w.element.menu.m add command \
- -label {Icons} -command "set_map_browser_element $w icons"
+ -label [G_msg "Icons"] -command "set_map_browser_element $w icons"
}
- button $w.accept -text "Accept" -command "mapBrowser_accept_cmd $w" -bd 1 \
+ button $w.accept -text [G_msg "Accept"] -command "mapBrowser_accept_cmd $w" -bd 1 \
-default active
- button $w.cancel -text "Cancel" -command "mapBrowser_cancel_cmd $w" -bd 1
+ button $w.cancel -text [G_msg "Cancel"] -command "mapBrowser_cancel_cmd $w" -bd 1
bind $w <Return> "mapBrowser_accept_cmd $w"
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/multimapBrowser.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/multimapBrowser.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/multimapBrowser.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -96,13 +96,13 @@
scrollbar $w.list.l.scroll \
-command "$w.list.l.list yview"
- button $w.list.remove -text "Remove" -bd 1 \
+ button $w.list.remove -text [G_msg "Remove"] -bd 1 \
-command "multimap_remove_cmd $w"
pack $w.list.l.list $w.list.l.scroll -side left -fill y -expand yes
pack $w.list.l $w.list.remove -side top -fill x -expand yes
frame $w.main.mapsets
- label $w.main.mapsets.label -text MAPSETS
+ label $w.main.mapsets.label -text [G_msg "MAPSETS"]
frame $w.main.mapsets.f
listbox $w.main.mapsets.f.list -bd 2 -relief sunken \
-exportselection no \
@@ -116,7 +116,7 @@
"multimap_browser_select_mapset %W %y $w"
frame $w.main.files
- label $w.main.files.label -text FILES
+ label $w.main.files.label -text [G_msg "FILES"]
frame $w.main.files.f
listbox $w.main.files.f.list -bd 2 -relief sunken \
-exportselection no \
@@ -146,30 +146,30 @@
}
if [string compare $type all] {
- label $w.element.menu -text "Map Type:" -relief flat
+ label $w.element.menu -text [G_msg "Map Type:"] -relief flat
} else {
set name ""
- menubutton $w.element.menu -text {Map Type} -menu $w.element.menu.m -relief raised -bd 1
+ menubutton $w.element.menu -text [G_msg "Map Type"] -menu $w.element.menu.m -relief raised -bd 1
menu $w.element.menu.m
$w.element.menu.m add command \
- -label {Raster} -command "set_multimap_browser_element $w Raster"
+ -label [G_msg "Raster"] -command "set_multimap_browser_element $w Raster"
$w.element.menu.m add command \
- -label {Vector} -command "set_multimap_browser_element $w Vector"
+ -label [G_msg "Vector"] -command "set_multimap_browser_element $w Vector"
$w.element.menu.m add command \
- -label {Site} -command "set_multimap_browser_element $w Site"
+ -label [G_msg "Site"] -command "set_multimap_browser_element $w Site"
$w.element.menu.m add command \
- -label {Surf} -command "set_multimap_browser_element $w Surf"
+ -label [G_msg "Surf"] -command "set_multimap_browser_element $w Surf"
$w.element.menu.m add command \
- -label {Regions} -command "set_multimap_browser_element $w windows"
+ -label [G_msg "Regions"] -command "set_multimap_browser_element $w windows"
$w.element.menu.m add command \
- -label {Labels} -command "set_multimap_browser_element $w\
+ -label [G_msg "Labels"] -command "set_multimap_browser_element $w\
paint/labels"
$w.element.menu.m add command \
- -label {Icons} -command "set_multimap_browser_element $w icons"
+ -label [G_msg "Icons"] -command "set_multimap_browser_element $w icons"
}
- button $w.done -text Done -command "multimap_done_cmd $w" -bd 1
- button $w.cancel -text Cancel -command "multimap_cancel_cmd $w" -bd 1
+ button $w.done -text [G_msg "Done"] -command "multimap_done_cmd $w" -bd 1
+ button $w.cancel -text [G_msg "Cancel"] -command "multimap_cancel_cmd $w" -bd 1
pack $w.filename -side top -expand yes -fill x
pack $w.main -side top
@@ -197,7 +197,7 @@
}
set_multimap_browser_element $w $name
set_multimap_browser_mapset $w {}
- wm title $w "Map Browser"
+ wm title $w [G_msg "Map Browser"]
wm protocol $w WM_DELETE_WINDOW "destroy $w"
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/nviz2.2_script
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/nviz2.2_script 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/nviz2.2_script 2011-01-05 18:22:18 UTC (rev 44889)
@@ -36,6 +36,19 @@
global DEBUG
set DEBUG 0
+# Overloading internationalization procedures
+# gui.tcl is not used to have separate translation file for NVIZ
+if [catch {package require msgcat}] {
+ proc G_msg {message} {
+ return $message
+ }
+} else {
+ ::msgcat::mcload $env(GISBASE)/etc/nviz2.2/msgs
+ proc G_msg {message} {
+ return [::msgcat::mc $message]
+ }
+}
+
#Initialize ProcessName variable
set env(NV_processname) NVIZ
@@ -45,9 +58,6 @@
lappend auto_path $env(GISBASE)/bwidget
package require -exact BWidget 1.2.1
-# internationalization procedures
-source $env(GISBASE)/etc/gtcltk/gmsg.tcl
-
global Nv_ ScriptState ScriptFile ScriptPlaying NvizLoadState
set ScriptPlaying 0
@@ -197,14 +207,14 @@
$Nv_(PAREA).canvas configure -width 0
$Nv_(PAREA).f1.b1 configure -bitmap @$bit_map_path/right \
-width 12 -height 18 -command "hide_menus"
- help $Nv_(PAREA).f1.b1 balloon "Show Panels"
+ help $Nv_(PAREA).f1.b1 balloon [G_msg "Show Panels"]
#$Nv_(AREA).menu.config.m entryconfigure 1 -label "Show Panels" -command "show_menus"
} else {
set Nv_(hidemenus) 1
$Nv_(PAREA).canvas configure -width [winfo width $Nv_(P_AREA)]
$Nv_(PAREA).f1.b1 configure -bitmap @$bit_map_path/left \
-width 12 -height 18 -command "hide_menus"
- help $Nv_(PAREA).f1.b1 balloon "Hide Panels"
+ help $Nv_(PAREA).f1.b1 balloon [G_msg "Hide Panels"]
#$Nv_(AREA).menu.config.m entryconfigure 1 -label "Hide Panels" -command "hide_menus"
}
update
@@ -246,7 +256,7 @@
# make informational text widget
###########################################################################
- set Nv_(text) "Start"
+ set Nv_(text) [G_msg "Start"]
set Nv_(height) 720
#panel area frame
@@ -267,21 +277,21 @@
if {$cwidth > 0 && $cheight > 0} {
if { [catch {togl $Nv_(TOP).canvas -rgba true -double true -depth true \
-width $cwidth -height $cheight} ] } {
- tk_messageBox -type ok -message { Togl canvas initialization failed. Is Your OpenGL working fine? }
+ tk_messageBox -type ok -message [G_msg "Togl canvas initialization failed. Is Your OpenGL working fine?"]
return 1
}
pack $Nv_(TOP).canvas -side top -expand no
} elseif {$cwidth == "" && $cheight > 0} {
if { [catch {togl $Nv_(TOP).canvas -rgba true -double true -depth true \
-height $cheight} ] } {
- tk_messageBox -type ok -message { Togl canvas initialization failed. Is Your OpenGL working fine? }
+ tk_messageBox -type ok -message [G_msg "Togl canvas initialization failed. Is Your OpenGL working fine?"]
return 1
}
pack $Nv_(TOP).canvas -side top -fill x -expand yes
} elseif {$cheight == "" && $cwidth > 0} {
if { [catch {togl $Nv_(TOP).canvas -rgba true -double true -depth true \
-width $cwidth} ] } {
- tk_messageBox -type ok -message { Togl canvas initialization failed. Is Your OpenGL working fine? }
+ tk_messageBox -type ok -message [G_msg "Togl canvas initialization failed. Is Your OpenGL working fine?"]
return 1
}
pack $Nv_(TOP).canvas -side top -fill y -expand yes
@@ -289,7 +299,7 @@
#nothing set
set constrained 1
if { [catch {togl $Nv_(TOP).canvas -rgba true -double true -depth true} ] } {
- tk_messageBox -type ok -message { Togl canvas initialization failed. Is Your OpenGL working fine? }
+ tk_messageBox -type ok -message [G_msg "Togl canvas initialization failed. Is Your OpenGL working fine?"]
return 1
}
pack $Nv_(TOP).canvas -side top -fill both -expand yes
@@ -327,7 +337,7 @@
bind all <MouseWheel> {$Nv_(PAREA).canvas yview scroll [expr -1 * %D] units}
button $Nv_(PAREA).f1.b1 -bitmap @$bit_map_path/left \
-width 12 -height 18 -command "hide_menus"
- help $Nv_(PAREA).f1.b1 balloon "Hide Panels"
+ help $Nv_(PAREA).f1.b1 balloon [G_msg "Hide Panels"]
frame $Nv_(P_AREA) -relief flat
@@ -349,14 +359,14 @@
pack $Nv_(P_AREA) -side top -fill y -expand yes
# Make label with invisible text to hold "Please wait..." message
- label $Nv_(AREA).menu.wait_pls -text "Please Wait..." -fg red -bg black
+ label $Nv_(AREA).menu.wait_pls -text [G_msg "Please Wait..."] -fg red -bg black
#Bind menu area to canvas and scrollbars
$Nv_(PAREA).canvas create window 0 0 -window $Nv_(P_AREA) -anchor nw
bind $Nv_(P_AREA) <Configure> "set_scrollsize"
- set helpmenu [Nv_mkMenu $Nv_(AREA).menu.help "Help " \
- {"NVIZ Help" "About NVIZ" "NVIZ - Bugs / ToDo"} \
+ set helpmenu [Nv_mkMenu $Nv_(AREA).menu.help [G_msg "Help"] \
+ [list [G_msg "NVIZ Help"] [G_msg "About NVIZ"] [G_msg "NVIZ - Bugs / ToDo"]] \
{0 0 0} \
{"nviz_browse nviz_toc.html" "nviz_browse nviz_desc.html" "nviz_browse bugs_todo.html"} ]
@@ -368,16 +378,16 @@
#set Nv_(AREA).menu [frame $Nv_(AREA).menu.left -relief flat -bd 0]
# file menu
- set filemenu [Nv_mkMenu $Nv_(AREA).menu.file "File " \
- {"Load State ..." "Save State ..." \
- "" \
- "Set Canvas Size ..."
- "" \
- "Load 3d Settings ..." "Save 3d Settings ..." \
- "" \
- "Save image as ..." \
- "" \
- "Reset" "Quit" } \
+ set filemenu [Nv_mkMenu $Nv_(AREA).menu.file [G_msg "File"] \
+ [list [G_msg "Load State"] [G_msg "Save State"] \
+ {} \
+ [G_msg "Set Canvas Size"] \
+ {} \
+ [G_msg "Load 3d Settings"] [G_msg "Save 3d Settings"] \
+ {} \
+ [G_msg "Save image as..."] \
+ {} \
+ [G_msg "Reset"] [G_msg "Quit"] ] \
{0 0 0 0 0 0 0 0 0 0 0 0} \
{ "load_state" "save_state" \
"Separator" \
@@ -410,36 +420,36 @@
# Make a menu entry for scripting
- set scriptingbtn [menubutton $Nv_(AREA).menu.scripting -text "Scripting " \
+ set scriptingbtn [menubutton $Nv_(AREA).menu.scripting -text [G_msg "Scripting"] \
-menu $Nv_(AREA).menu.scripting.m -underline 0 ]
set scriptingmenu [menu $Nv_(AREA).menu.scripting.m]
- $scriptingmenu add checkbutton -label "On" \
+ $scriptingmenu add checkbutton -label [G_msg "On"] \
-onvalue 1 -offvalue 0 -variable ScriptState \
-command "script_handle_on"
$scriptingmenu add separator
- $scriptingmenu add command -label "Create New Scriptfile" \
+ $scriptingmenu add command -label [G_msg "Create New Scriptfile"] \
-underline 0 -command SetScriptFile
- $scriptingmenu add command -label "Open and Play Script" \
+ $scriptingmenu add command -label [G_msg "Open and Play Script"] \
-underline 0 -command {set ScriptPlaying 1 ; exec nviz -f $default_panel_path/script_play &}
- $scriptingmenu add command -label "Close Script" \
+ $scriptingmenu add command -label [G_msg "Close Script"] \
-underline 1 -command Nv_close_scripting
$scriptingmenu add separator
- $scriptingmenu add command -label "Add Script Line" \
+ $scriptingmenu add command -label [G_msg "Add Script Line"] \
-underline 0 -command AddScriptLine
- $scriptingmenu add command -label "Add Script Command" \
+ $scriptingmenu add command -label [G_msg "Add Script Command"] \
-underline 1 -command AddScriptCmd
$scriptingmenu add separator
- $scriptingmenu add command -label "Script Tools" \
+ $scriptingmenu add command -label [G_msg "Script Tools"] \
-underline 1 -command {exec nviz -f $default_panel_path/script_tools -q &}
set configmenu [Nv_mkConfigMenu $Nv_(AREA).menu.config]
@@ -484,9 +494,9 @@
-tearoff 0
$menu add command \
- -command dump_ppm -underline 0 -label "PPM Image"
+ -command dump_ppm -underline 0 -label [G_msg "PPM Image"]
$menu add command \
- -command dump_tif -underline 0 -label "TIFF Image"
+ -command dump_tif -underline 0 -label [G_msg "TIFF Image"]
$menu add command \
-command {set fname [create_file_browser .file_browser 1]
if {$fname != -1} then {
@@ -500,7 +510,7 @@
Nstart_zoom $fname $wid $ht
appNotBusy
}
- } -underline 0 -label "Maximum Resolution PPM"
+ } -underline 0 -label [G_msg "Maximum Resolution PPM"]
}
proc dump_ppm { } {
@@ -677,7 +687,7 @@
############################################################################
# procedure to make CONFIG pulldown menu
###########################################################################
-proc Nv_mkConfigMenu { P { name "Appearance " } } {
+proc Nv_mkConfigMenu { P { name "Appearance" } } {
global Nv_ DEBUG
menubutton $P -text $name -menu $P.m -underline 0
@@ -686,7 +696,7 @@
if {$DEBUG} {puts "Nv_mkConfigMenu 1"}
set j 0
- $P.m add command -label "Hide Panels" -command "hide_menus"
+ $P.m add command -label [G_msg "Hide Panels"] -command "hide_menus"
$P.m add separator
foreach i $Nv_(config) {
@@ -798,18 +808,18 @@
pack .canvas_size.f3 .canvas_size.f1 .canvas_size.f2 -side top \
-fill both -expand yes
- label .canvas_size.f3.l1 -text "Set Size of Display Canvas"
+ label .canvas_size.f3.l1 -text [G_msg "Set Size of Display Canvas"]
pack .canvas_size.f3.l1 -side top -fill both -expand no
- label .canvas_size.f1.l1 -text "Width"
+ label .canvas_size.f1.l1 -text [G_msg "Width"]
entry .canvas_size.f1.e1 -textvariable cwidth -width 6
- label .canvas_size.f1.l2 -text "Height"
+ label .canvas_size.f1.l2 -text [G_msg "Height"]
entry .canvas_size.f1.e2 -textvariable cheight -width 6
pack .canvas_size.f1.l1 .canvas_size.f1.e1 \
.canvas_size.f1.l2 .canvas_size.f1.e2 \
-side left -fill y
- checkbutton .canvas_size.f2.c1 -text "Unconstrained" -variable constrained \
+ checkbutton .canvas_size.f2.c1 -text [G_msg "Unconstrained"] -variable constrained \
-onvalue 1 -offvalue 0 -command {
if {$constrained} {
.canvas_size.f1.e1 configure -state disabled -bg grey
@@ -819,7 +829,7 @@
.canvas_size.f1.e2 configure -state normal -bg white
}
}
- button .canvas_size.f2.b1 -text "Close" \
+ button .canvas_size.f2.b1 -text [G_msg "Close"] \
-command {
if {$constrained} {
pack $Nv_(TOP).canvas -side top -fill both -expand yes
@@ -871,7 +881,7 @@
global Nv_
if {[catch {set file_hook [open $new_file r]} error_code] != 0} then {
- display_error "While opening file: $error_code"
+ display_error [format [G_msg "Error while opening file: %s"] $error_code]
return
}
@@ -923,8 +933,8 @@
global Nv_
# Query user to verify this choice
- if {[tk_dialog .reset_all "Reset" \
- "Really reset Nviz?" {} 1 "Ok" "Cancel"] == 1} then return
+ if {[tk_dialog .reset_all [G_msg "Reset"] \
+ [G_msg "Really reset Nviz?"] {} 1 [G_msg "Ok"] [G_msg "Cancel"]] == 1} then return
# Show that we are busy
appBusy
@@ -1025,7 +1035,7 @@
}
if {[catch {set file_hook [open $new_file w]} error_code] != 0} then {
- display_error "While opening file: $error_code"
+ display_error [format [G_msg "Error while opening file: %s"] $error_code]
return
}
@@ -1053,8 +1063,8 @@
# Routine to display error
###################################################
proc display_error { err_string } {
- tk_dialog .file_error "File Error" "$err_string" \
- error 0 "Dismiss"
+ tk_dialog .file_error [G_msg "File Error"] "$err_string" \
+ error 0 [G_msg "Dismiss"]
}
# Set the cancel function for drawing
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_animation.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_animation.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_animation.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -97,29 +97,29 @@
global nviztxtfont
catch {destroy $BASE}
- set panel [St_create {window name size priority} $BASE "Simple Animation" 2 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Simple Animation"] 2 5]
set animPanelBASE $BASE
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Simple Keyframe Animation Panel"
+ Nv_mkPanelname $BASE [G_msg "Simple Keyframe Animation Panel"]
#animation playback control buttons
set rname $BASE.buttons
frame $rname -relief flat -borderwidth 0
Button $rname.slow_back -bitmap @$bit_map_path/slow_left \
-command "animStepBackward $BASE" -bd 1 \
- -helptext "Step backward frame by frame"
+ -helptext [G_msg "Step backward frame by frame"]
Button $rname.stop -bitmap @$bit_map_path/stop \
-command {set animRunState stop; move_position} -bd 1\
- -helptext "Pause playback"
+ -helptext [G_msg "Pause playback"]
Button $rname.slow_forward -bitmap @$bit_map_path/slow_right \
-command "animStepForward $BASE" -bd 1 \
- -helptext "Step forward frame by frame"
+ -helptext [G_msg "Step forward frame by frame"]
Button $rname.forward -bitmap @$bit_map_path/right \
-command "animRunAnimation $BASE" -bd 1 \
- -helptext "Run animation from beginning"
+ -helptext [G_msg "Run animation from beginning"]
- label $rname.title -text " set max frames:" -font $nviztxtfont -fg black
+ label $rname.title -text [G_msg " set max frames:"] -font $nviztxtfont -fg black
entry $rname.set_tot_frames -width 4 -relief sunken -justify r
$rname.set_tot_frames insert 0 $animNumFrames
bind $rname.set_tot_frames <Key-Return> "animChangeNumFrames $BASE"
@@ -133,7 +133,7 @@
# Create mid section containing keyframe control panel
frame $BASE.keycontrol
set rname $BASE.keycontrol
- label $rname.l -text "Key Frames"
+ label $rname.l -text [G_msg "Key Frames"]
pack $rname.l -fill x -expand yes -anchor n
mkkeyframeSlider $BASE
@@ -142,10 +142,10 @@
# Section for displaying current frame info.
set rname [frame $BASE.keycontrol.info]
- label $rname.cf_label -text "Current frame:" -font $nviztxtfont -fg black
+ label $rname.cf_label -text [G_msg "Current frame:"] -font $nviztxtfont -fg black
label $rname.cur_frame -text "0" -width 4 -fg black -bg white \
-font $nviztxtfont -anchor e
- label $rname.kf_label -text "Selected key frame:" \
+ label $rname.kf_label -text [G_msg "Selected key frame:"] \
-font $nviztxtfont -fg black
label $rname.cur_kframe -text "0" -width 4 -fg black \
-bg white -font $nviztxtfont -anchor e
@@ -156,9 +156,9 @@
# Create bottom section containing command buttons
set rname [frame $BASE.keycontrol.commands]
- Button $rname.add -text "Add frame" -command "animAddKey $BASE" \
+ Button $rname.add -text [G_msg "Add frame"] -command "animAddKey $BASE" \
-bd 1 -width 10
- Button $rname.clear -text "Clear all" -command "animClearAllKeys $BASE" \
+ Button $rname.clear -text [G_msg "Clear all"] -command "animClearAllKeys $BASE" \
-bd 1 -width 10
pack $rname.add -fill x -expand no -side left
pack $rname.clear -fill x -expand no -side right
@@ -167,26 +167,26 @@
set rname $BASE.options
frame $rname -relief groove -bd 2
frame $rname.row1
- label $rname.row1.lab -text "Show: " -fg black
- checkbutton $rname.row1.spath -text "path" -variable animPathState \
+ label $rname.row1.lab -text [G_msg "Show: "] -fg black
+ checkbutton $rname.row1.spath -text [G_msg "path"] -variable animPathState \
-command {Nshow_path $animPathState} -onvalue 1 -offvalue 0
- checkbutton $rname.row1.svect -text "lines" -variable animVectState \
+ checkbutton $rname.row1.svect -text [G_msg "lines"] -variable animVectState \
-command {Nshow_vect $animVectState} -onvalue 1 -offvalue 0
- checkbutton $rname.row1.ssite -text "points" -variable animSiteState \
+ checkbutton $rname.row1.ssite -text [G_msg "points"] -variable animSiteState \
-command {Nshow_site $animSiteState} -onvalue 1 -offvalue 0
- checkbutton $rname.row1.svol -text "volumes" -variable animVolState \
+ checkbutton $rname.row1.svol -text [G_msg "volumes"] -variable animVolState \
-command {Nshow_vol $animVolState} -onvalue 1 -offvalue 0
pack $rname.row1.lab $rname.row1.spath $rname.row1.svect $rname.row1.ssite $rname.row1.svol\
-fill y -side left -padx 2 -pady 2
pack $rname.row1 -side top -anchor w
frame $rname.row2
- label $rname.row2.lab -text "Interpolation: " -fg black
- radiobutton $rname.row2.linear -text "linear" -variable animInterpType \
+ label $rname.row2.lab -text [G_msg "Interpolation: "] -fg black
+ radiobutton $rname.row2.linear -text [G_msg "linear"] -variable animInterpType \
-value linear -command "Nset_interp_mode linear
Nupdate_frames
mkTensionScale linear $rname.row2"
- radiobutton $rname.row2.spline -text "spline" -variable animInterpType \
+ radiobutton $rname.row2.spline -text [G_msg "spline"] -variable animInterpType \
-value spline -command "Nset_interp_mode spline
Nupdate_frames
mkTensionScale spline $rname.row2"
@@ -197,10 +197,10 @@
set rname $BASE.bottom
frame $rname -relief groove
- Button $rname.rands -text "Run and save" -bd 1 \
+ Button $rname.rands -text [G_msg "Run and save"] -bd 1 \
-command "animRunAndSave $BASE" \
- -helptext "Run animation and save frames"
- Button $rname.close -text Close -bd 1 \
+ -helptext [G_msg "Run animation and save frames"]
+ Button $rname.close -text [G_msg "Close"] -bd 1 \
-command "Nv_closePanel $BASE"
pack $rname.rands -side left -fill y
pack $rname.close -side right -fill y
@@ -219,7 +219,7 @@
catch {destroy $BASE.tension}
if {$type == "spline"} {
- set tscale [scale $BASE.tension -label "spline tension" -orient h -showvalue f \
+ set tscale [scale $BASE.tension -label [G_msg "spline tension"] -orient h -showvalue f \
-from 0 -to 1000 -command animChangeTension \
-activebackground gray80 -background gray90 -showvalue 1 -width 14]
@@ -573,8 +573,8 @@
# Check if the keyframe pointer is over the trash can
if {$x > $animEndX} then {
- set ans [tk_dialog .verify "Verify" "Do you really want to delete this keyframe?" \
- {} 1 Ok Dismiss]
+ set ans [tk_dialog .verify [G_msg "Verify"] [G_msg "Do you really want to delete this keyframe?"] \
+ {} 1 [G_msg "Ok"] [G_msg "Dismiss"]]
if {$ans == 1} then {
# Cancel the delete so move top pointer back to original position
@@ -598,9 +598,9 @@
set key_time [lindex [lindex $animKeyList $i] 0]
puts "Deleting key at $key_time"
if {[Ndelete_key $key_time 0 1] == 0} then {
- tk_dialog .ierror "Internal Error" \
- "Internal Error - Failed to delete keyframe in GK key list" \
- {} 0 Dismiss
+ tk_dialog .ierror [G_msg "Internal Error"] \
+ [G_msg "Internal Error - Failed to delete keyframe in GK key list"] \
+ {} 0 [G_msg "Dismiss"]
}
Nupdate_frames
@@ -639,9 +639,9 @@
# Also, move the key in the GK keyframe list
if {[Nmove_key $old_time 0 $new_time] == 0} then {
- tk_dialog .ierror "Internal Error" \
- "Internal Error - Failed to move keyframe in GK key list" \
- {} 0 Dismiss
+ tk_dialog .ierror [G_msg "Internal Error"] \
+ [G_msg "Internal Error - Failed to move keyframe in GK key list"] \
+ {} 0 [G_msg "Dismiss"]
}
set new_time_int [expr round($new_time * 100)]
@@ -750,9 +750,9 @@
if { $extract_where != -1} then {
# Found the new key, do a popup for the replace
- set ans [tk_dialog .replace "Replace Key" \
- "There is already a keyframe at this time, do you wish to replace it?" \
- {} 1 Ok Dismiss]
+ set ans [tk_dialog .replace [G_msg "Replace Key"] \
+ [G_msg "There is already a keyframe at this time, do you wish to replace it?"] \
+ {} 1 [G_msg "Ok"] [G_msg "Dismiss"]]
if {$ans == 1} then { return }
# Otherwise do the replace
@@ -797,8 +797,8 @@
global animKeyList
# First make sure they really want to do this
- if {[tk_dialog .verify "Verify" "Do you really want to delete all keyframes?" \
- {} 1 Ok Dismiss] == 1} then {
+ if {[tk_dialog .verify [G_msg "Verify"] [G_msg "Do you really want to delete all keyframes?"] \
+ {} 1 [G_msg "Ok"] [G_msg "Dismiss"]] == 1} then {
return
} else {
foreach i $animKeyList {
@@ -925,34 +925,34 @@
set animWaitPress false
set IMG 2
toplevel .ras_fname
- wm title .ras_fname "Save Animation Frames"
+ wm title .ras_fname [G_msg "Save Animation Frames"]
set row1 [frame .ras_fname.frame1]
set row2 [frame .ras_fname.frame2]
set row3 [frame .ras_fname.frame3]
set row4 [frame .ras_fname.frame4]
- Label $row1.label -text "Prefix for images: " \
- -helptext "Enter a prefix name for images to be created from animation frames"
+ Label $row1.label -text [G_msg "Prefix for images: "] \
+ -helptext [G_msg "Enter a prefix name for images to be created from animation frames"]
entry $row1.enter -relief sunken
pack $row1.label $row1.enter -side left -fill x -expand 0 -anchor w
pack $row1 -side top -padx 3 -pady 4 -expand 1 -fill both
- Label $row2.formatlabel -text "Output format: "
- radiobutton $row2.img2 -text "PPM" -variable IMG -value 2
- radiobutton $row2.img3 -text "TIFF" -variable IMG -value 3
- radiobutton $row2.img4 -text "MPEG-1" -variable IMG -value 4
+ Label $row2.formatlabel -text [G_msg "Output format: "]
+ radiobutton $row2.img2 -text [G_msg "PPM"] -variable IMG -value 2
+ radiobutton $row2.img3 -text [G_msg "TIFF"] -variable IMG -value 3
+ radiobutton $row2.img4 -text [G_msg "MPEG-1"] -variable IMG -value 4
pack $row2.formatlabel $row2.img2 $row2.img3 $row2.img4 -side left \
-anchor w -fill x -expand 0
pack $row2 -side top -padx 3 -expand 1 -fill both
- Label $row3.rendlabel -text "Rendering mode: "
- radiobutton $row3.norm -text "coarse" -variable animSaveRenderStyle -value 0
- radiobutton $row3.fancy -text "fine" -variable animSaveRenderStyle -value 1
+ Label $row3.rendlabel -text [G_msg "Rendering mode: "]
+ radiobutton $row3.norm -text [G_msg "coarse"] -variable animSaveRenderStyle -value 0
+ radiobutton $row3.fancy -text [G_msg "fine"] -variable animSaveRenderStyle -value 1
pack $row3.rendlabel $row3.norm $row3.fancy -side left -anchor w \
-fill x -expand 0
pack $row3 -side top -padx 3 -pady 4 -expand 1 -fill both
- button $row4.ok -text "OK" -width 4 -bd 1 -command "set animWaitPress true"
+ button $row4.ok -text [G_msg "OK"] -width 4 -bd 1 -command "set animWaitPress true"
pack $row4.ok
pack $row4 -side top -pady 3 -expand 1 -fill both
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_arrow.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_arrow.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_arrow.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -44,21 +44,21 @@
#This doesn't do anything currently
set arw_text_size "not funct."
- set panel [St_create {window name size priority} $BASE "North arrow" 2 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "North arrow"] 2 5]
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "North Arrow Panel"
+ Nv_mkPanelname $BASE [G_msg "North Arrow Panel"]
# This section contains widgets for placing the north arrow
set rbase1 [frame $BASE.arrow]
- Label $rbase1.arrow_lbl -text "Arrow: " -fg black
+ Label $rbase1.arrow_lbl -text [G_msg "Arrow: "] -fg black
LabelEntry $rbase1.arrow_size -relief sunken -entrybg white \
-textvariable n_arrow_size -width 8 -justify right\
- -label "size (in map units) " -fg black -labelfont $nviztxtfont
+ -label [G_msg "size (in map units) "] -fg black -labelfont $nviztxtfont
pack $rbase1.arrow_lbl $rbase1.arrow_size -side left -expand no -fill none
$rbase1.arrow_size bind <Key> {if {$Nauto_draw == 1} {Ndraw_all}}
- Button $rbase1.color -text "Color" \
+ Button $rbase1.color -text [G_msg "Color"] \
-bg $arw_clr -width 8 -bd 1 \
-command "change_arrow_color $rbase1.color arrow" \
-fg "#ffffff"
@@ -69,13 +69,13 @@
# This section contains widgets for north text
set rbase2 [frame $BASE.txt]
- Label $rbase2.txt_lbl -text "North text: " -fg black
- Button $rbase2.font -text "Font" \
+ Label $rbase2.txt_lbl -text [G_msg "North text: "] -fg black
+ Button $rbase2.font -text [G_msg "Font"] \
-width 8 -command "select_arw_font $rbase2.font" -bd 1 \
- -helptext "Select font family, size, and style"
+ -helptext [G_msg "Select font family, size, and style"]
pack $rbase2.txt_lbl $rbase2.font -side left -expand no -fill none
- Button $rbase2.color -text "Color" \
+ Button $rbase2.color -text [G_msg "Color"] \
-bg $arw_text_clr -width 8 -bd 1 \
-command "change_arrow_color $rbase2.color text" \
-fg "#ffffff"
@@ -86,11 +86,11 @@
# close panel section
set rbase3 [frame $BASE.button]
- Button $rbase3.place -text "Place arrow" -bd 1 \
+ Button $rbase3.place -text [G_msg "Place arrow"] -bd 1 \
-command "bind_mouse $Nv_(TOP).canvas; $Nv_(TOP) configure -cursor plus"
pack $rbase3.place -expand yes -side left -expand no -fill none
- button $rbase3.close -text "Close" -command "Nv_closePanel $BASE" \
+ button $rbase3.close -text [G_msg "Close"] -command "Nv_closePanel $BASE" \
-anchor se -bd 1
pack $rbase3.close -side right -fill none -expand no
pack $rbase3 -side top -fill both -expand yes -padx 3 -pady 4
@@ -116,7 +116,7 @@
proc select_arw_font {fbutton} {
global Nv_
- set fon [SelectFont $fbutton.fontset -type dialog -sampletext 1 -title "Select font"]
+ set fon [SelectFont $fbutton.fontset -type dialog -sampletext [G_msg "The quick brown fox jumps over the lazy dog"] -title [G_msg "Select font"] -font Nv_(arw_font)]
if { $fon != "" } {set Nv_(arw_font) $fon}
}
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_color.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_color.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_color.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -35,22 +35,22 @@
# Initialize panel info
if [catch {set Nv_($BASE)}] {
- set panel [St_create {window name size priority} $BASE "Background Color" 1 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Background Color"] 1 5]
} else {
set panel $Nv_($BASE)
}
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Background Color Panel"
+ Nv_mkPanelname $BASE [G_msg "Background Color Panel"]
- button $BASE.background -text Background -bg white -fg grey \
+ button $BASE.background -text [G_msg "Background"] -bg white -fg grey \
-activebackground gray20 -activebackground white\
-command "set_background_color $BASE.background"\
-height 3 -width 12
# place $BASE.background -rely .33 -relx .33 -relheight .20 -relwidth .40
pack $BASE.background -padx 5 -pady 5
frame $BASE.closef
- button $BASE.closef.close -text "Close" -command "Nv_closePanel $BASE" \
+ button $BASE.closef.close -text [G_msg "Close"] -command "Nv_closePanel $BASE" \
-anchor se -bd 1
pack $BASE.closef.close -side right -padx 3
pack $BASE.closef -side bottom -fill x
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_cutplane.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_cutplane.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_cutplane.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -45,9 +45,9 @@
global nviztxtfont
# Initialize panel info
- set panel [St_create {window name size priority} $BASE "Cutting Planes" 1 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Cutting Planes"] 1 5]
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Cutting Planes Panel"
+ Nv_mkPanelname $BASE [G_msg "Cutting Planes Panel"]
set Nv_(CutPlaneBase) $BASE
set update_routine xyupdate
@@ -57,20 +57,20 @@
# Create the active plane pulldown
frame $BASE.current
- label $BASE.current.lbl -text "Active cutting plane: "
- label $BASE.current.cpl -text "None" -relief raised -bd 1 \
+ label $BASE.current.lbl -text [G_msg "Active cutting plane: "]
+ label $BASE.current.cpl -text [G_msg "None"] -relief raised -bd 1 \
-width 8 -fg black -font $nviztxtfont
pack $BASE.current.lbl $BASE.current.cpl -side left -fill none
menu $BASE.cut_plane_menu
set rname $BASE.cut_plane_menu
- $rname add command -label "None" -command "cutplaneSetPlane $BASE -1"
- $rname add command -label "Plane 0" -command "cutplaneSetPlane $BASE 0"
- $rname add command -label "Plane 1" -command "cutplaneSetPlane $BASE 1"
- $rname add command -label "Plane 2" -command "cutplaneSetPlane $BASE 2"
- $rname add command -label "Plane 3" -command "cutplaneSetPlane $BASE 3"
- $rname add command -label "Plane 4" -command "cutplaneSetPlane $BASE 4"
- $rname add command -label "Plane 5" -command "cutplaneSetPlane $BASE 5"
+ $rname add command -label [G_msg "None"] -command "cutplaneSetPlane $BASE -1"
+ $rname add command -label [G_msg "Plane 0"] -command "cutplaneSetPlane $BASE 0"
+ $rname add command -label [G_msg "Plane 1"] -command "cutplaneSetPlane $BASE 1"
+ $rname add command -label [G_msg "Plane 2"] -command "cutplaneSetPlane $BASE 2"
+ $rname add command -label [G_msg "Plane 3"] -command "cutplaneSetPlane $BASE 3"
+ $rname add command -label [G_msg "Plane 4"] -command "cutplaneSetPlane $BASE 4"
+ $rname add command -label [G_msg "Plane 5"] -command "cutplaneSetPlane $BASE 5"
if {$Nv_(CutPlanesMade) == 0} then {
for {set i 0} {$i < 6} {incr i} {
@@ -84,18 +84,18 @@
# Create radio buttons for cut plane shading
menubutton $BASE.current.shading -menu $BASE.current.shading.m \
- -relief raised -indicatoron 1 -bd 1 -width 10 -text "set shading"
+ -relief raised -indicatoron 1 -bd 1 -width 10 -text [G_msg "set shading"]
set shademenu [menu $BASE.current.shading.m -tearoff 0]
- $shademenu add radiobutton -label "top color" \
+ $shademenu add radiobutton -label [G_msg "top color"] \
-command "Nset_fence_color ABOVE" -variable Nv_(CutPlaneFence) -value "TOP"
- $shademenu add radiobutton -label "bottom color" \
+ $shademenu add radiobutton -label [G_msg "bottom color"] \
-command "Nset_fence_color BELOW" -variable Nv_(CutPlaneFence) -value "BELOW"
- $shademenu add radiobutton -label "blend" \
+ $shademenu add radiobutton -label [G_msg "blend"] \
-command "Nset_fence_color BLEND" -variable Nv_(CutPlaneFence) -value "BLEND"
- $shademenu add radiobutton -label "shaded" \
+ $shademenu add radiobutton -label [G_msg "shaded"] \
-command "Nset_fence_color GREY" -variable Nv_(CutPlaneFence) -value "GREY"
- $shademenu add radiobutton -label "clear" \
+ $shademenu add radiobutton -label [G_msg "clear"] \
-command "Nset_fence_color OFF" -variable Nv_(CutPlaneFence) -value "OFF"
pack $BASE.current.shading -side right -anchor e
@@ -111,8 +111,8 @@
# Create X,Y, and Z entry widgets along with
# Reset, all off and close buttons
frame $BASE.coords
- label $BASE.coords.x_lbl -text "X:"
- label $BASE.coords.y_lbl -text "Y:"
+ label $BASE.coords.x_lbl -text [G_msg "X:"]
+ label $BASE.coords.y_lbl -text [G_msg "Y:"]
entry $BASE.coords.x_ent -width 7 -relief sunken -bg white
entry $BASE.coords.y_ent -width 7 -relief sunken -bg white
bind $BASE.coords.x_ent <Return> "cutplaneSetTransFromEntry $BASE x"
@@ -136,7 +136,7 @@
scale $BASE.zcoord.scl -orient vertical -to [expr int([lindex $range 0])] \
-from [expr int([lindex $range 1])] -showvalue false -width 13 \
-activebackground gray80 -background gray90 -command $update_routine
- label $BASE.zcoord.lbl -text "Z coord"
+ label $BASE.zcoord.lbl -text [G_msg "Z coord"]
entry $BASE.zcoord.val -width 5 -relief sunken -bg white
pack $BASE.zcoord.scl $BASE.zcoord.lbl $BASE.zcoord.val
bind $BASE.zcoord.val <KeyPress-Return> "cutplaneSetTransFromEntry $BASE z"
@@ -148,7 +148,7 @@
frame $BASE.rotate
scale $BASE.rotate.scl -orient vertical -from 360 -to 0 -showvalue false -width 13\
-activebackground gray80 -background gray90 -command $update_routine
- label $BASE.rotate.lbl -text "Rotate"
+ label $BASE.rotate.lbl -text [G_msg "Rotate"]
entry $BASE.rotate.val -width 5 -relief sunken -bg white
pack $BASE.rotate.scl $BASE.rotate.lbl $BASE.rotate.val
bind $BASE.rotate.val <KeyPress-Return> "cutplaneUpdateRotation2 $BASE"
@@ -160,7 +160,7 @@
frame $BASE.tilt
scale $BASE.tilt.scl -orient vertical -from 360 -to 0 -showvalue false -width 13\
-activebackground gray80 -background gray90 -command $update_routine
- label $BASE.tilt.lbl -text "Tilt"
+ label $BASE.tilt.lbl -text [G_msg "Tilt"]
entry $BASE.tilt.val -width 5 -relief sunken -bg white
pack $BASE.tilt.scl $BASE.tilt.lbl $BASE.tilt.val
bind $BASE.tilt.val <KeyPress-Return> "cutplaneUpdateTilt2 $BASE"
@@ -179,11 +179,11 @@
# panel control buttons at bottom
frame $BASE.bottom
- button $BASE.bottom.reset -text "Reset" -width 7 -bd 1 \
+ button $BASE.bottom.reset -text [G_msg "Reset"] -width 7 -bd 1 \
-command "cutplaneReset $BASE"
- button $BASE.bottom.all_off -text "All Off" -width 7 -bd 1 \
+ button $BASE.bottom.all_off -text [G_msg "All Off"] -width 7 -bd 1 \
-command "cutplaneAllOff; cutplaneSetPlane $BASE -1"
- button $BASE.bottom.close -text "Close" -width 7 -bd 1 \
+ button $BASE.bottom.close -text [G_msg "Close"] -width 7 -bd 1 \
-command "Nv_closePanel $BASE"
pack $BASE.bottom.reset $BASE.bottom.all_off $BASE.bottom.close \
-side left -fill none -expand 1
@@ -287,9 +287,9 @@
$BASE.cut_plane_menu unpost
if {$plane == -1} then {
- $BASE.current.cpl configure -text "None"
+ $BASE.current.cpl configure -text [G_msg "None"]
} else {
- $BASE.current.cpl configure -text "Plane $plane"
+ $BASE.current.cpl configure -text [format [G_msg "Plane %s"] $plane]
}
for {set i 0} {$i < [Nnum_cutplane_obj]} {incr i} {
if {$plane == $i} then {
@@ -302,7 +302,7 @@
set Nv_(CurrCutPlane) $plane
set curr [Nget_current_cutplane]
- if {$curr != "None"} then {
+ if {$curr != "None"} then {
$curr draw
}
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_fringe.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_fringe.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_fringe.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -40,24 +40,24 @@
global fringe_nw fringe_ne fringe_sw fringe_se
global fringe_color fringe_elev
- set panel [St_create {window name size priority} $BASE "Fringe" 2 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Fringe"] 2 5]
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Fringe Panel"
+ Nv_mkPanelname $BASE [G_msg "Fringe Panel"]
set rbase1 [frame $BASE.edges]
- Label $rbase1.lbl -text "Edges with fringe: " -fg black
+ Label $rbase1.lbl -text [G_msg "Edges with fringe: "] -fg black
checkbutton $rbase1.nwc -width 0 \
-variable fringe_nw -onvalue 1 -offvalue 0 \
- -text "N&W"
+ -text [G_msg "N&W"]
checkbutton $rbase1.nec -width 0 \
-variable fringe_ne -onvalue 1 -offvalue 0 \
- -text "N&E"
+ -text [G_msg "N&E"]
checkbutton $rbase1.swc -width 0 \
-variable fringe_sw -onvalue 1 -offvalue 0 \
- -text "S&W"
+ -text [G_msg "S&W"]
checkbutton $rbase1.sec -width 0 \
-variable fringe_se -onvalue 1 -offvalue 0 \
- -text "S&E"
+ -text [G_msg "S&E"]
pack $rbase1.lbl $rbase1.nwc $rbase1.nec $rbase1.swc \
$rbase1.sec -side left -expand yes -fill none -anchor w
pack $rbase1 -side top -expand yes -fill both -padx 3 -pady 4
@@ -65,8 +65,8 @@
set rbase2 [frame $BASE.color_elev]
LabelEntry $rbase2.entry -width 8 -relief sunken \
-entrybg white -textvariable fringe_elev \
- -label "Elevation of fringe bottom: "
- Button $rbase2.color -text "Color" \
+ -label [G_msg "Elevation of fringe bottom: "]
+ Button $rbase2.color -text [G_msg "Color"] \
-bg "#aaaaaa" -width 8 -bd 1 \
-command "change_fringe_color $rbase2.color" \
-fg "#000000"
@@ -77,9 +77,9 @@
pack $rbase2 -side top -expand yes -fill both -padx 3 -pady 4
set rbase3 [frame $BASE.button]
- Button $rbase3.draw -text "Draw Fringe" -command "draw_fringe" -bd 1
+ Button $rbase3.draw -text [G_msg "Draw Fringe"] -command "draw_fringe" -bd 1
# close panel section
- button $rbase3.close -text "Close" -command "Nv_closePanel $BASE" \
+ button $rbase3.close -text [G_msg "Close"] -command "Nv_closePanel $BASE" \
-anchor se -bd 1
pack $rbase3.draw -side left -expand yes -fill none -anchor w
pack $rbase3.close -side right -fill none -expand yes -anchor e
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_kanimator.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_kanimator.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_kanimator.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -76,8 +76,8 @@
global bit_map_path
frame $BASE -relief groove -borderwidth 2
- set panel [St_create {window name size priority} $BASE "Keyframe Animation" 2 5]
- Nv_mkPanelname $BASE "Keyframe Animation Panel"
+ set panel [St_create {window name size priority} $BASE [G_msg "Keyframe Animation"] 2 5]
+ Nv_mkPanelname $BASE [G_msg "Keyframe Animation Panel"]
# Create the top section containing play control, framerate, and Add and Delete buttons
frame $BASE.playcontrol -relief groove -borderwidth 2
@@ -93,7 +93,7 @@
-command "keyanimOneForward $BASE"
button $rname.forward -height 20 -width 20 -bitmap @$bit_map_path/right \
-command "keyanimPlayForward $BASE"
- button $rname.label -text "Framerate :" -command "keyanimChangeFramerate $BASE"
+ button $rname.label -text [G_msg "Framerate :"] -command "keyanimChangeFramerate $BASE"
label $rname.val -textvariable keyanimFrameRate
pack $rname.back $rname.slow_back $rname.stop $rname.slow_forward \
$rname.forward -side left -padx 4 -pady 2 -fill y -expand no
@@ -102,13 +102,13 @@
frame $BASE.commands -relief groove -borderwidth 2
set rname $BASE.commands
- label $rname.label -text "File: "
- button $rname.save -text "Save" -command "keyanimSaveAnim $BASE"
- button $rname.load -text "Load" -command "keyanimLoadAnim $BASE"
+ label $rname.label -text [G_msg "File: "]
+ button $rname.save -text [G_msg "Save"] -command "keyanimSaveAnim $BASE"
+ button $rname.load -text [G_msg "Load"] -command "keyanimLoadAnim $BASE"
- label $rname.label2 -text "Animation: "
- button $rname.rands -text "Run and Save" -command "keyanimRunAndSave $BASE"
- button $rname.close -text "Close" -command "Nv_closePanel $BASE"
+ label $rname.label2 -text [G_msg "Animation: "]
+ button $rname.rands -text [G_msg "Run and Save"] -command "keyanimRunAndSave $BASE"
+ button $rname.close -text [G_msg "Close"] -command "Nv_closePanel $BASE"
pack $rname.label2 $rname.rands $rname.label $rname.save $rname.load \
-side left -padx 2 -pady 2 -padx 2 -fill y -expand no
@@ -127,9 +127,9 @@
# Create bottom section containing current keytime
frame $BASE.keytime -relief groove -borderwidth 2
set rname $BASE.keytime
- button $rname.add -text "Add" -command "keyanimAddKey $BASE"
- button $rname.delete -text "Delete" -command "keyanimDeleteKeys $BASE"
- button $rname.change -text "New Key Time:" -command "keyanimChangeKeytime $BASE"
+ button $rname.add -text [G_msg "Add"] -command "keyanimAddKey $BASE"
+ button $rname.delete -text [G_msg "Delete"] -command "keyanimDeleteKeys $BASE"
+ button $rname.change -text [G_msg "New Key Time:"] -command "keyanimChangeKeytime $BASE"
label $rname.current -textvariable keyanimCurrentKeyTime
pack $rname.add $rname.delete -side left -padx 2 -pady 2 -fill y -expand no
pack $rname.current $rname.change -side right -padx 2 -fill y -expand no
@@ -140,32 +140,32 @@
frame $BASE.other_commands -relief groove -borderwidth 2
set rname $BASE.other_commands
menubutton $rname.menu1 -menu $rname.menu1.m1 \
- -indicatoron 1 -text "Show Feature" -relief raised
+ -indicatoron 1 -text [G_msg "Show Feature"] -relief raised
menu $rname.menu1.m1
- $rname.menu1.m1 add checkbutton -label "Path" -variable keyanimPathState \
+ $rname.menu1.m1 add checkbutton -label [G_msg "Path"] -variable keyanimPathState \
-command {Nshow_path $keyanimPathState} -onvalue on -offvalue off
- $rname.menu1.m1 add checkbutton -label "Vect Lines/Polygons" -variable keyanimVectState \
+ $rname.menu1.m1 add checkbutton -label [G_msg "Vect Lines/Polygons"] -variable keyanimVectState \
-command {Nshow_vect $keyanimVectState} -onvalue on -offvalue off
- $rname.menu1.m1 add checkbutton -label "Vect Points" -variable keyanimSiteState \
+ $rname.menu1.m1 add checkbutton -label [G_msg "Vect Points"] -variable keyanimSiteState \
-command {Nshow_site $keyanimSiteState} -onvalue on -offvalue off
- $rname.menu1.m1 add checkbutton -label "Volume" -variable keyanimVolState \
+ $rname.menu1.m1 add checkbutton -label [G_msg "Volume"] -variable keyanimVolState \
-command {Nshow_vol $keyanimVolState} -onvalue on -offvalue off
- $rname.menu1.m1 add checkbutton -label "Labels/Legend" \
+ $rname.menu1.m1 add checkbutton -label [G_msg "Labels/Legend"] \
-variable keyanimLabState \
-command {Nshow_lab $keyanimLabState} -onvalue on -offvalue off
menubutton $rname.menu2 -menu $rname.menu2.m1 \
- -indicatoron 1 -text "Interp." -relief raised
+ -indicatoron 1 -text [G_msg "Interp."] -relief raised
menu $rname.menu2.m1
- $rname.menu2.m1 add radiobutton -label "linear" \
+ $rname.menu2.m1 add radiobutton -label [G_msg "linear"] \
-variable keyanimInterpType -value linear \
-command "Nset_interp_mode linear ; Nupdate_frames ; $rname.tension configure -state disabled -background gray80"
- $rname.menu2.m1 add radiobutton -label "spline" \
+ $rname.menu2.m1 add radiobutton -label [G_msg "spline"] \
-variable keyanimInterpType -value spline \
-command "Nset_interp_mode spline ; Nupdate_frames ; $rname.tension configure -state normal -background gray90"
- scale $rname.tension -label "tension" -orient h \
+ scale $rname.tension -label [G_msg "tension"] -orient h \
-showvalue f -from 0 -to 1000 -command keyanimChangeTension \
-activebackground gray80 -background gray90
@@ -227,7 +227,7 @@
frame $rname
label $rname.label -relief raised -text [lindex $element 0] -width 10
- checkbutton $rname.active -text "On" -variable $channel_iname
+ checkbutton $rname.active -text [G_msg "On"] -variable $channel_iname
global $channel_iname
set $channel_iname 1
@@ -444,13 +444,13 @@
append name [keyanimGenTag]
toplevel $name
- label $name.label -text "New Key Time"
+ label $name.label -text [G_msg "New Key Time"]
pack $name.label
frame $name.lgroup -relief groove
- label $name.lgroup.mlabel -text "Minute:" -relief raised
- label $name.lgroup.slabel -text "Second:" -relief raised
- label $name.lgroup.flabel -text "Frame:" -relief raised
+ label $name.lgroup.mlabel -text [G_msg "Minute:"] -relief raised
+ label $name.lgroup.slabel -text [G_msg "Second:"] -relief raised
+ label $name.lgroup.flabel -text [G_msg "Frame:"] -relief raised
pack $name.lgroup.mlabel $name.lgroup.slabel \
$name.lgroup.flabel -fill both -padx 2 -pady 2
pack $name.lgroup -side left -fill both
@@ -463,7 +463,7 @@
$name.egroup.fentry -fill both -padx 2 -pady 2
pack $name.egroup -side right -fill both
- button $name.ok -text "Ok" -command "set button 1"
+ button $name.ok -text [G_msg "Ok"] -command "set button 1"
pack $name.ok -side bottom -fill both -before $name.label
# Grab the focus
@@ -493,17 +493,16 @@
if { [string length $frames] == 0 } then { set frames 0 }
if { ($minutes < 0) || ($seconds < 0) || ($frames < 0) } then {
- tk_dialog .kt_error "KeyTime Error" "Error - All values must be at least zero." \
- {} 0 Dismiss
+ tk_dialog .kt_error [G_msg "KeyTime Error"] [G_msg "Error - All values must be at least zero."] \
+ {} 0 [G_msg "Dismiss"
destroy $name
focus $oldFocus
return
}
if { $frames >= $keyanimFrameRate } then {
- tk_dialog .kt_error "KeyTime Error" \
- "Error - Frame number must be less than frame rate." \
- {} 0 Dismiss
+ tk_dialog .kt_error [G_msg "KeyTime Error"] [G_msg "Error - Frame number must be less than frame rate."] \
+ {} 0 [G_msg "Dismiss"]
destroy $name
focus $oldFocus
return
@@ -538,11 +537,11 @@
append name [keyanimGenTag]
toplevel $name
- label $name.label -text "New Frame Rate"
+ label $name.label -text [G_msg "New Frame Rate"]
pack $name.label
frame $name.lgroup -relief groove
- label $name.lgroup.flabel -text "Framerate:" -relief raised
+ label $name.lgroup.flabel -text [G_msg "Framerate:"] -relief raised
pack $name.lgroup.flabel -fill both -padx 2 -pady 2
pack $name.lgroup -side left -fill both
@@ -551,7 +550,7 @@
pack $name.egroup.fentry -fill both -padx 2 -pady 2
pack $name.egroup -side right -fill both
- button $name.ok -text "Ok" -command "set button 1"
+ button $name.ok -text [G_msg "Ok"] -command "set button 1"
pack $name.ok -side bottom -fill both -before $name.label
# Grab the focus
@@ -574,8 +573,8 @@
}
if {$framerate < 1} then {
- tk_dialog .fr_error "Frame Rate Error" "Error - Frame rate must be at least 1." \
- {} 0 Dismiss
+ tk_dialog .fr_error [G_msg "Frame Rate Error"] [G_msg "Error - Frame rate must be at least 1."] \
+ {} 0 [G_msg "Dismiss"]
destroy $name
focus $oldFocus
return
@@ -674,9 +673,9 @@
}
}
if {$tag_name == ""} then {
- tk_dialog .ierror "Internal Error" \
- "Internal Error - Can't find channel $cname for keyframe $i" \
- {} 0 Dismiss
+ tk_dialog .ierror [G_msg "Internal Error"] \
+ [format [G_msg "Internal Error - Can't find channel %s for keyframe %s"] $cname $i] \
+ {} 0 [G_msg "Dismiss"]
return
}
@@ -854,9 +853,9 @@
}
# Popup a dialog to verify the delete
- set ans [tk_dialog .delete_keys "Delete Keys" \
- "Delete the selected keys?" \
- {} 1 Ok Dismiss]
+ set ans [tk_dialog .delete_keys [G_msg "Delete Keys"] \
+ [G_msg "Delete the selected keys?"] \
+ {} 1 [G_msg "Ok"] [G_msg "Dismiss"]]
if {$ans == 1} then { return }
# Delete each key in turn
@@ -869,9 +868,9 @@
# Deleted the specified key internally
set internal_time [lindex [lindex $keyanimKeyList $where] 0]
if {[Ndelete_key $internal_time 0 1] == 0} then {
- tk_dialog .ierror "Internal Error" \
- "Internal Error - Failed to delete keyframe in GK key list" \
- {} 0 Dismiss
+ tk_dialog .ierror [G_msg "Internal Error"] \
+ [G_msg "Internal Error - Failed to delete keyframe in GK key list"] \
+ {} 0 [G_msg "Dismiss"]
}
Nupdate_frames
@@ -1003,9 +1002,9 @@
# Move the key internally
if {[Nmove_key $old_time 0 $new_time] == 0} then {
- tk_dialog .ierror "Internal Error" \
- "Internal Error - Failed to move keyframe in GK key list" \
- {} 0 Dismiss
+ tk_dialog .ierror [G_msg "Internal Error"] \
+ [G_msg "Internal Error - Failed to move keyframe in GK key list"] \
+ {} 0 [G_msg "Dismiss"]
}
# After everything's said and done, redraw the keyframes
@@ -1122,9 +1121,9 @@
if { $extract_where != -1} then {
# Found the new key, do a popup for the replace
- set ans [tk_dialog .replace "Replace Key" \
- "There is already a keyframe at this time, replace it?" \
- {} 1 Ok Dismiss]
+ set ans [tk_dialog .replace [G_msg "Replace Key"] \
+ [G_msg "There is already a keyframe at this time, replace it?"] \
+ {} 1 [G_msg "Ok"] [G_msg "Dismiss"]]
if {$ans == 1} then { return }
# Otherwise do the replace
@@ -1219,7 +1218,7 @@
append BASE .keycontrol
# Create canvas to hold channels for keyframes
- label $BASE.title -text "Keyframe Attributes"
+ label $BASE.title -text [G_msg "Keyframe Attributes"]
canvas $BASE.key_channels -width 10c -height 2c -yscrollcommand "$BASE.scrolly set" \
-xscrollcommand "$BASE.scrollx set" -confine true -xscrollincrement 1 \
-yscrollincrement 1
@@ -1247,7 +1246,7 @@
frame $BASE.key_times.hold_times -width 10c -height 10c
label $BASE.key_times.hold_times.spacer1 -width 10 -text ""
checkbutton $BASE.key_times.hold_times.spacer2 \
- -text "On" -state disabled -relief flat -bd 0 -padx 3
+ -text [G_msg "On"] -state disabled -relief flat -bd 0 -padx 3
$BASE.key_times.hold_times.spacer2 configure \
-disabledforeground [lindex [$BASE.key_times.hold_times.spacer2 \
configure -background] 4]
@@ -1697,26 +1696,26 @@
frame .ras_fname.frame3
frame .ras_fname.frame4
frame .ras_fname.frame5
- label .ras_fname.title -text "Enter a base name:"
+ label .ras_fname.title -text [G_msg "Enter a base name:"]
entry .ras_fname.enter -relief sunken
- label .ras_fname.label -text "Render:"
- radiobutton .ras_fname.norm -text "Wireframe" \
+ label .ras_fname.label -text [G_msg "Render:"]
+ radiobutton .ras_fname.norm -text [G_msg "Wireframe"] \
-variable keyanimSaveRenderStyle -value 0
- radiobutton .ras_fname.fancy -text "Full Rendering" \
+ radiobutton .ras_fname.fancy -text [G_msg "Full Rendering"] \
-variable keyanimSaveRenderStyle -value 1
- button .ras_fname.ok -text "Ok" -command "set keyanimWaitPress true"
+ button .ras_fname.ok -text [G_msg "Ok"] -command "set keyanimWaitPress true"
- label .ras_fname.label1 -text "Image:"
+ label .ras_fname.label1 -text [G_msg "Image:"]
# Start at value 2. 1 used to be SGI .rgb support
- radiobutton .ras_fname.img2 -text "PPM" -variable IMG -value 2
- radiobutton .ras_fname.img3 -text "TIFF" -variable IMG -value 3
- radiobutton .ras_fname.img4 -text "MPEG-1" -variable IMG -value 4
+ radiobutton .ras_fname.img2 -text [G_msg "PPM"] -variable IMG -value 2
+ radiobutton .ras_fname.img3 -text [G_msg "TIFF"] -variable IMG -value 3
+ radiobutton .ras_fname.img4 -text [G_msg "MPEG-1"] -variable IMG -value 4
- label .ras_fname.label2 -text "Start Frame:"
+ label .ras_fname.label2 -text [G_msg "Start Frame:"]
entry .ras_fname.enter2 -relief sunken -width 6
- checkbutton .ras_fname.check1 -text "Off-Screen" \
+ checkbutton .ras_fname.check1 -text [G_msg "Off-Screen"] \
-variable "keyanimOff"
#Pack Menu
@@ -1870,7 +1869,7 @@
if {[llength $keyanimKeyList] == 0} then {
tk_dialog .na_error "No Anim Error" \
"There are no keys in the current animation to save" \
- {} 0 Dismiss
+ {} 0 [G_msg "Dismiss"]
return
}
@@ -1906,9 +1905,9 @@
global keyanimKeyList keyanimFrameRate keyanimSaved keyanimUniqueTag
if {($keyanimSaved == 0) && ([llength $keyanimKeyList] != 0)} then {
- set status [tk_dialog .ka_check "Verify" \
- "Warning - Current animation has not been saved, continue?" \
- {} 1 Ok Cancel]
+ set status [tk_dialog .ka_check [G_msg "Verify"] \
+ [G_msg "Warning - Current animation has not been saved, continue?"] \
+ {} 1 [G_msg "Ok"] [G_msg "Cancel"]]
if {$status == 1} return
}
@@ -1921,9 +1920,9 @@
set file_handle ""
if {[catch "open $file_name r" file_handle] != 0} then {
- tk_dialog .ka_error "File Error" \
- "Error - Could not open file $file_name for reading" \
- {} 0 Dismiss
+ tk_dialog .ka_error [G_msg "File Error"] \
+ [format [G_msg "Error - Could not open file %s for reading"] $file_name] \
+ {} 0 [G_msg "Dismiss"]
return
}
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_label.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_label.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_label.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -57,20 +57,20 @@
proc mklabelPanel { BASE } {
global Nv_
- set panel [St_create {window name size priority} $BASE "Labels" 2 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Labels"] 2 5]
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Labels Panel"
+ Nv_mkPanelname $BASE [G_msg "Labels Panel"]
# This section contains widgets for setting font type, size and color
set rbase1 [frame $BASE.font_type]
- Button $rbase1.font -text "Font" \
+ Button $rbase1.font -text [G_msg "Font"] \
-width 8 -command "select_font $rbase1.font" -bd 1 \
- -helptext "Select font family, size, and style"
- Button $rbase1.color -text "Color" \
+ -helptext [G_msg "Select font family, size, and style"]
+ Button $rbase1.color -text [G_msg "Color"] \
-bg $Nv_(labelFontColor) -width 8 -fg "white" -bd 1 \
-command "change_label_color $rbase1.color" \
- -helptext "Choose font color"
+ -helptext [G_msg "Choose font color"]
pack $rbase1.font -side left
pack $rbase1.color -side right
pack $rbase1 -side top -expand yes -fill x -padx 3 -pady 4
@@ -80,20 +80,20 @@
set rbase2 [frame $BASE.text]
- Label $rbase2.label -text "Label text: "
+ Label $rbase2.label -text [G_msg "Label text: "]
entry $rbase2.text -relief sunken -width 38 -textvariable Nv_(label_text)
pack $rbase2.label $rbase2.text -side left -expand no -fill none -anchor w
pack $rbase2 -side top -expand 1 -fill both -padx 3 -pady 4
set rbase3 [frame $BASE.buttons]
- Button $rbase3.place -text "Place label" -command "place_label" \
- -width 8 -bd 1 -helptext "Click with mouse to place label"
- Button $rbase3.erase -text "Erase last" -command "label_delete_list label 1" \
- -width 8 -bd 1 -helptext "Erase most recent label placed"
- Button $rbase3.erase_all -text "Erase all" -command "label_delete_list label 0" \
- -width 8 -bd 1 -helptext "Erase all labels"
- button $rbase3.close -text "Close" -command "Nv_closePanel $BASE" \
+ Button $rbase3.place -text [G_msg "Place label"] -command "place_label" \
+ -width 8 -bd 1 -helptext [G_msg "Click with mouse to place label"]
+ Button $rbase3.erase -text [G_msg "Erase last"] -command "label_delete_list label 1" \
+ -width 8 -bd 1 -helptext [G_msg "Erase most recent label placed"]
+ Button $rbase3.erase_all -text [G_msg "Erase all"] -command "label_delete_list label 0" \
+ -width 8 -bd 1 -helptext [G_msg "Erase all labels"]
+ button $rbase3.close -text [G_msg "Close"] -command "Nv_closePanel $BASE" \
-anchor se -bd 1
pack $rbase3.place -side left -expand no -fill none
pack $rbase3.erase -side left -expand no -fill none -padx 3
@@ -174,7 +174,7 @@
proc select_font {fbutton} {
global Nv_
- set fon [SelectFont $fbutton.fontset -type dialog -sampletext 1 -title "Select font"]
+ set fon [SelectFont $fbutton.fontset -type dialog -sampletext [G_msg "The quick brown fox jumps over the lazy dog"] -title [G_msg "Select font"] -font Nv_(font)]
if { $fon != "" } {set Nv_(font) $fon}
}
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_legend.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_legend.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_legend.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -60,38 +60,38 @@
proc mklegendPanel { BASE } {
global Nv_
- set panel [St_create {window name size priority} $BASE "Legend" 2 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Legend"] 2 5]
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Legends Panel"
+ Nv_mkPanelname $BASE [G_msg "Legends Panel"]
##########################################################################
# This section contains widgets for specifying a legend
set rbase1 [frame $BASE.options]
- checkbutton $rbase1.invert -text "reverse legend" -anchor w \
+ checkbutton $rbase1.invert -text [G_msg "reverse legend"] -anchor w \
-variable Nv_(leg_invert) -onvalue 1 -offvalue 0
- checkbutton $rbase1.values -text "show values" \
+ checkbutton $rbase1.values -text [G_msg "show values"] \
-anchor w -variable Nv_(catval) -onvalue 1 -offvalue 0
- checkbutton $rbase1.labels -text "show labels" \
+ checkbutton $rbase1.labels -text [G_msg "show labels"] \
-anchor w -variable Nv_(catlabel) -onvalue 1 -offvalue 0
- Button $rbase1.font -text "Font" \
+ Button $rbase1.font -text [G_msg "Font"] \
-command "select_font $rbase1.font" -bd 1 \
- -helptext "Select font family, size, and style for legend text"
+ -helptext [G_msg "Select font family, size, and style for legend text"]
pack $rbase1.invert $rbase1.values $rbase1.labels $rbase1.font\
-fill none -side left -expand yes -anchor w
pack $rbase1 -side top -expand yes -fill both -padx 3 -pady 4
# Use-range portion of panel
set rbase2 [frame $BASE.range]
- checkbutton $rbase2.useranges -text "set value range " -anchor w \
+ checkbutton $rbase2.useranges -text [G_msg "set value range "] -anchor w \
-variable Nv_(leg_userange) -onvalue 1 -offvalue 0
LabelEntry $rbase2.entry_low -relief sunken -width 8 \
-textvariable Nv_(leg_lorange) \
- -entrybg white -label "min "
+ -entrybg white -label [G_msg "min "]
LabelEntry $rbase2.entry_hi -relief sunken -width 8 \
-textvariable Nv_(leg_hirange) \
- -entrybg white -label " max "
+ -entrybg white -label [G_msg " max "]
pack $rbase2.useranges $rbase2.entry_low $rbase2.entry_hi \
-side left -fill x -expand yes -anchor w
@@ -104,7 +104,7 @@
set rbase3 [frame $BASE.cats]
# Discrete categories and use-list portion
- checkbutton $rbase3.disc_cat -text "discrete categories" \
+ checkbutton $rbase3.disc_cat -text [G_msg "discrete categories"] \
-anchor w -width 18 -variable Nv_(leg_discat) \
-onvalue 1 -offvalue 0
@@ -128,14 +128,14 @@
# Legend button, invert checkbutton and category checkbuttons
set rbase4 [frame $BASE.buttons]
- Button $rbase4.place -text "Place legend" \
+ Button $rbase4.place -text [G_msg "Place legend"] \
-command "place_legend" -width 10 -bd 1 \
- -helptext "Use mouse to place legend; left button defines first corner, \
- right button defines opposite corner."
- Button $rbase4.erase -text "Erase legend" \
+ -helptext [G_msg "Use mouse to place legend; left button defines first corner, \
+ right button defines opposite corner."]
+ Button $rbase4.erase -text [G_msg "Erase legend"] \
-command "delete_list legend 0" -width 10 -bd 1 \
- -helptext "Erase all legends"
- button $rbase4.close -text "Close" -command "Nv_closePanel $BASE" \
+ -helptext [G_msg "Erase all legends"]
+ button $rbase4.close -text [G_msg "Close"] -command "Nv_closePanel $BASE" \
-anchor se -bd 1
pack $rbase4.place -fill none -side left -expand no
pack $rbase4.erase -fill none -side left -expand no -padx 3
@@ -163,12 +163,12 @@
set pname $BASE
toplevel $pname -relief raised -bd 3
list_type1 $pname.list 3c 3c
- $pname.list.t configure -text "Category Values"
+ $pname.list.t configure -text [G_msg "Category Values"]
entry $pname.level -relief sunken -width 10
bind $pname.level <Return> "make_cat_list_add $BASE"
- button $pname.addb -text "Add" -command "make_cat_list_add $BASE"
- button $pname.delb -text "Delete" -command "make_cat_list_delete $BASE"
- button $pname.done -text "Done" -command "set Nv_(cat_list_select) 1"
+ button $pname.addb -text [G_msg "Add"] -command "make_cat_list_add $BASE"
+ button $pname.delb -text [G_msg "Delete"] -command "make_cat_list_delete $BASE"
+ button $pname.done -text [G_msg "Done"] -command "set Nv_(cat_list_select) 1"
pack $pname.list $pname.level $pname.addb $pname.delb $pname.done\
-fill x -padx 2 -pady 2
@@ -180,7 +180,7 @@
}
if {[llength $Nv_(cat_list)]==0} {
- $MENU add command -label None -state disabled
+ $MENU add command -label [G_msg "None"] -state disabled
}
destroy $BASE
@@ -217,7 +217,7 @@
proc select_font {fbutton} {
global Nv_
- set fon [SelectFont $fbutton.fontset -type dialog -sampletext 1 -title "Select font"]
+ set fon [SelectFont $fbutton.fontset -type dialog -sampletext [G_msg "The quick brown fox jumps over the lazy dog"] -title [G_msg "Select font"] -font Nv_(font)]
if { $fon != "" } {set Nv_(font) $fon}
}
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_lights.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_lights.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_lights.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -22,12 +22,12 @@
catch {destroy $BASE}
# Initialize panel info
if [catch {set Nv_($BASE)}] {
- set panel [St_create {window name size priority} $BASE "Lighting" 2 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Lighting"] 2 5]
} else {
set panel $Nv_($BASE)
}
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Lighting Panel"
+ Nv_mkPanelname $BASE [G_msg "Lighting Panel"]
frame $BASE.top
frame $BASE.bottom
@@ -40,7 +40,7 @@
# Set up a binding so we do ShowModel correctly
bind $BASE <Map> {if {$Nv_(FollowView) == 0} { do_light_draw } }
- Label $BASE.top.left.label -text " Light source position" -fg black
+ Label $BASE.top.left.label -text [G_msg " Light source position"] -fg black
pack $BASE.top.left.label -side top -fill none -expand 0 -anchor w
# create lighting height slider
@@ -55,19 +55,19 @@
pack $BASE.top.left.1 -side top -pady 2
# create checkbuttons
- checkbutton $BASE.top.left.follow -text "Follow surface viewpoint" \
+ checkbutton $BASE.top.left.follow -text [G_msg "Follow surface viewpoint"] \
-variable Nv_(FollowView) -command follow -onvalue 1 -offvalue 0
- checkbutton $BASE.top.left.show -text "Show lighting model" \
+ checkbutton $BASE.top.left.show -text [G_msg "Show lighting model"] \
-variable Nv_(ShowModel)
pack $BASE.top.left.follow $BASE.top.left.show \
-side top -fill none -expand 0 -anchor w -pady 2
#create lighting color, ambient, and brightness sliders
- Label $BASE.top.right.1.lbl -text "Light color" -fg black
+ Label $BASE.top.right.1.lbl -text [G_msg "Light color"] -fg black
Nv_mkScale $BASE.top.right.1.red h Red 0 100 100 set_red 2
Nv_mkScale $BASE.top.right.1.green h Green 0 100 100 set_green 2
Nv_mkScale $BASE.top.right.1.blue h Blue 0 100 100 set_blue 2
- Label $BASE.top.right.2.lbl -text "Light intensity" -fg black
+ Label $BASE.top.right.2.lbl -text [G_msg "Light intensity"] -fg black
Nv_mkScale $BASE.top.right.2.bright h Brightness 0 100 80 set_brt 2
Nv_mkScale $BASE.top.right.2.ambient h Ambient 0 100 20 set_amb 2
pack $BASE.top.right.1.lbl $BASE.top.right.1.red \
@@ -78,9 +78,9 @@
$BASE.top.right.2.ambient -side top -expand 1 -pady 2
pack $BASE.top.right.2 -side top -expand 1 -pady 4
- button $BASE.bottom.reset -text "Reset" -command "Nviz_lights_reset" -bd 1
+ button $BASE.bottom.reset -text [G_msg "Reset"] -command "Nviz_lights_reset" -bd 1
pack $BASE.bottom.reset -side left
- button $BASE.bottom.close -text "Close" -command "Nv_closePanel $BASE" -bd 1
+ button $BASE.bottom.close -text [G_msg "Close"] -command "Nv_closePanel $BASE" -bd 1
pack $BASE.bottom.close -side right
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_main.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_main.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_main.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -83,7 +83,7 @@
# Initialize panel info
if [catch {set Nv_($BASE)}] {
- set panel [St_create {window name size priority} $BASE "Main" 1 10]
+ set panel [St_create {window name size priority} $BASE [G_msg "Main"] 1 10]
} else {
set panel $Nv_($BASE)
}
@@ -101,67 +101,67 @@
pack [frame $BASE.redrawf.f11 -relief flat -bd 0] -side top -fill x -expand 1
#Execute buttons
- set drawbtn [button $BASE.redrawf.f2.exec -text DRAW -bd 1 -fg "darkgreen"]
+ set drawbtn [button $BASE.redrawf.f2.exec -text [G_msg "DRAW"] -bd 1 -fg "darkgreen"]
bind $drawbtn <1> "Nset_cancel 0"
bind $drawbtn <B1-ButtonRelease> {Ndraw_all}
- help $drawbtn balloon "Draw selected features"
+ help $drawbtn balloon [G_msg "Draw selected features"]
- set clearbtn [button $BASE.redrawf.f2.clear -text Clear -bd 1 -command {do_clear}]
- help $clearbtn balloon "Clear NVIZ display"
+ set clearbtn [button $BASE.redrawf.f2.clear -text [G_msg "Clear"] -bd 1 -command {do_clear}]
+ help $clearbtn balloon [G_msg "Clear NVIZ display"]
- set cancelbtn [button $BASE.redrawf.f2.cancel -text Cancel -bd 1 -command {Nset_cancel 1}]
- help $cancelbtn balloon "Cancel current draw"
+ set cancelbtn [button $BASE.redrawf.f2.cancel -text [G_msg "Cancel"] -bd 1 -command {Nset_cancel 1}]
+ help $cancelbtn balloon [G_msg "Cancel current draw"]
pack $drawbtn $clearbtn $cancelbtn \
-side left -expand 1 -fill x
# Auto check boxes
- set labl1 [label $BASE.redrawf.f1.label1 -text "Automatically render display:" -anchor w]
+ set labl1 [label $BASE.redrawf.f1.label1 -text [G_msg "Automatically render display:"] -anchor w]
set auto_d [checkbutton $BASE.redrawf.f1.autodraw \
-onvalue 1 -offvalue 0 -variable Nauto_draw \
-justify left -anchor center -padx 5]
- help $BASE.redrawf.f1.autodraw balloon "Automatically render display after changing parameters"
+ help $BASE.redrawf.f1.autodraw balloon [G_msg "Automatically render display after changing parameters"]
$auto_d select
pack $labl1 $auto_d -side left -expand 0 -fill x -pady 3
#checkbuttons for features to draw
- set labl2 [label $BASE.redrawf.f11.label1 -text "Show features:" -anchor w]
+ set labl2 [label $BASE.redrawf.f11.label1 -text [G_msg "Show features:"] -anchor w]
menubutton $BASE.redrawf.f11.m1 -menu $BASE.redrawf.f11.m1.m \
- -text "Main features..." -underline 0 -justify left \
+ -text [G_msg "Main features..."] -underline 0 -justify left \
-indicator on -anchor center -relief raised -bd 1
#help $BASE.redrawf.f11.m1 balloon "Select main draw features"
menubutton $BASE.redrawf.f11.m2 -menu $BASE.redrawf.f11.m2.m \
- -text "Decorations..." -underline 0 -justify left \
+ -text [G_msg "Decorations..."] -underline 0 -justify left \
-indicator on -anchor center -relief raised -bd 1
#help $BASE.redrawf.f11.m2 balloon "Select misc. draw features"
menu $BASE.redrawf.f11.m1.m
- $BASE.redrawf.f11.m1.m add checkbutton -label "Surface" \
+ $BASE.redrawf.f11.m1.m add checkbutton -label [G_msg "Surface"] \
-onvalue 1 -offvalue 0 -variable surface
- $BASE.redrawf.f11.m1.m add checkbutton -label "Vectors" \
+ $BASE.redrawf.f11.m1.m add checkbutton -label [G_msg "Vectors"] \
-onvalue 1 -offvalue 0 -variable vector
- $BASE.redrawf.f11.m1.m add checkbutton -label "Sites" \
+ $BASE.redrawf.f11.m1.m add checkbutton -label [G_msg "Sites"] \
-onvalue 1 -offvalue 0 -variable sites
- $BASE.redrawf.f11.m1.m add checkbutton -label "Volumes" \
+ $BASE.redrawf.f11.m1.m add checkbutton -label [G_msg "Volumes"] \
-onvalue 1 -offvalue 0 -variable volume
menu $BASE.redrawf.f11.m2.m
- $BASE.redrawf.f11.m2.m add checkbutton -label "Legend" \
+ $BASE.redrawf.f11.m2.m add checkbutton -label [G_msg "Legend"] \
-onvalue 1 -offvalue 0 -variable legend
- $BASE.redrawf.f11.m2.m add checkbutton -label "Labels" \
+ $BASE.redrawf.f11.m2.m add checkbutton -label [G_msg "Labels"] \
-onvalue 1 -offvalue 0 -variable labels
- $BASE.redrawf.f11.m2.m add checkbutton -label "North Arrow" \
+ $BASE.redrawf.f11.m2.m add checkbutton -label [G_msg "North Arrow"] \
-onvalue 1 -offvalue 0 -variable n_arrow
- $BASE.redrawf.f11.m2.m add checkbutton -label "Scale Bar" \
+ $BASE.redrawf.f11.m2.m add checkbutton -label [G_msg "Scale Bar"] \
-onvalue 1 -offvalue 0 -variable scalebar
- $BASE.redrawf.f11.m2.m add checkbutton -label "Fringe" \
+ $BASE.redrawf.f11.m2.m add checkbutton -label [G_msg "Fringe"] \
-onvalue 1 -offvalue 0 -variable fringe
pack $labl2 $BASE.redrawf.f11.m1 $BASE.redrawf.f11.m2 -side left \
@@ -172,19 +172,19 @@
pack [frame $BASE.midf -relief flat -bd 0] -side left -expand 1 -padx 5
# set view method radiobuttons
- set draw_lab [label $BASE.midt.lablev1 -text "View method:" -anchor w]
+ set draw_lab [label $BASE.midt.lablev1 -text [G_msg "View method:"] -anchor w]
- set draw_var1 [radiobutton $BASE.midt.b1 -text "eye" \
+ set draw_var1 [radiobutton $BASE.midt.b1 -text [G_msg "eye"] \
-variable draw_option -value 0 -width 8 \
-command "change_display 1" ]
- set draw_var2 [radiobutton $BASE.midt.b2 -text "center" \
+ set draw_var2 [radiobutton $BASE.midt.b2 -text [G_msg "center"] \
-variable draw_option -value 1 -width 8 \
-command "change_display 0" ]
$draw_var1 select
- help $BASE.midt.b1 balloon "Change view by moving eye position"
- help $BASE.midt.b2 balloon "Change view by moving scene center position"
+ help $BASE.midt.b1 balloon [G_msg "Change view by moving eye position"]
+ help $BASE.midt.b2 balloon [G_msg "Change view by moving scene center position"]
if {$Nv_(FlyThrough)} {
@@ -193,7 +193,7 @@
# original code
pack $draw_lab $draw_var1 $draw_var2 -side left -expand 0
}
- help $BASE.midt.b3 balloon "Change view using mouse to control fly-through"
+ help $BASE.midt.b3 balloon [G_msg "Change view using mouse to control fly-through"]
# make position "widget"
set XY [Nv_mkXYScale $BASE.midf.pos puck XY_POS 125 125 105 105 update_eye_position]
@@ -202,28 +202,28 @@
set H [mk_hgt_slider $BASE.midf]
set E [mk_exag_slider $BASE.midf]
- help $E.scale balloon "Set vertical exaggeration"
- help $E.entry balloon "Set vertical exaggeration"
- help $H.scale balloon "Set eye height"
- help $H.entry balloon "Set eye height"
+ help $E.scale balloon [G_msg "Set vertical exaggeration"]
+ help $E.entry balloon [G_msg "Set vertical exaggeration"]
+ help $H.scale balloon [G_msg "Set eye height"]
+ help $H.entry balloon [G_msg "Set eye height"]
# make lookat buttons
frame $BASE.midf.lookat -relief flat -borderwidth 0
- Label $BASE.midf.lookat.l -text "Look"
- Button $BASE.midf.lookat.here -text "here" -bd 1 \
- -helptext "Center view at point marked with mouse click" \
+ Label $BASE.midf.lookat.l -text [G_msg "Look"]
+ Button $BASE.midf.lookat.here -text [G_msg "here"] -bd 1 \
+ -helptext [G_msg "Center view at point marked with mouse click"] \
-command {bind $Nv_(TOP).canvas <Button> {look_here %W %x %y
if {$Nauto_draw == 1} {Ndraw_all}
}}
- Button $BASE.midf.lookat.center -text "center" -bd 1 \
- -helptext "Center view at center of displayed surface" \
+ Button $BASE.midf.lookat.center -text [G_msg "center"] -bd 1 \
+ -helptext [G_msg "Center view at center of displayed surface"] \
-command { look_center
if {$Nauto_draw == 1} {Ndraw_all}
}
- Button $BASE.midf.lookat.top -text "top" -bd 1 \
- -helptext "View directly from above" \
+ Button $BASE.midf.lookat.top -text [G_msg "top"] -bd 1 \
+ -helptext [G_msg "View directly from above"] \
-command {
# Nv_itemDrag $Nv_(main_BASE).midf.pos $Nv_(XY_POS) 62.5 62.5
# note: below value is somewhat strange, but with 0.5 0.5 the map rotates:
@@ -246,13 +246,13 @@
set P [Nv_mkScale $BASE.bframe.cframe.pers h perspective 120 3 40 Nchange_persp 0]
set T [Nv_mkScale $BASE.bframe.cframe.tw h twist -180 180 0 Nchange_twist 0]
- help $BASE.bframe.cframe.pers balloon "Set field of view size (degrees)"
- help $BASE.bframe.cframe.tw balloon "Set twist angle (degrees)"
+ help $BASE.bframe.cframe.pers balloon [G_msg "Set field of view size (degrees)"]
+ help $BASE.bframe.cframe.tw balloon [G_msg "Set twist angle (degrees)"]
# reset button goes here so it can reference P
- Button $BASE.midf.lookat.reset -text "reset" \
+ Button $BASE.midf.lookat.reset -text [G_msg "reset"] \
-bd 1 -command "do_reset $XY $H $E $P $T" \
- -helptext "Reset view to default"
+ -helptext [G_msg "Reset view to default"]
pack $BASE.midf.lookat.l $BASE.midf.lookat.here \
$BASE.midf.lookat.center $BASE.midf.lookat.top \
@@ -514,12 +514,12 @@
if {$flag == 1} {
#draw eye position
- inform "Set eye position"
+ inform [G_msg "Set eye position"]
set XY [Nv_mkXYScale $NAME puck XY_POS 125 125 105 105 update_eye_position]
} elseif {$flag == 0} {
#draw center position
- inform "Set center of view position"
+ inform [G_msg "Set center of view position"]
set XY [Nv_mkXYScale $NAME cross XY_POS 125 125 109 109 update_center_position]
}
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_pos.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_pos.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_pos.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -25,13 +25,13 @@
# Initialize panel info
if [catch {set Nv_($BASE)}] {
- set panel [St_create {window name size priority} $BASE "Position" 1 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Position"] 1 5]
} else {
set panel $Nv_($BASE)
}
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Position Panel"
+ Nv_mkPanelname $BASE [G_msg "Position Panel"]
#################################
# Positioning menus
@@ -42,34 +42,34 @@
set col4 [frame $BASE.top1.col4]
set c1r1 [label $col1.1 -text " "]
- set c1r2 [label $col1.2 -text "From (eye):"]
- set c1r3 [label $col1.3 -text "To (surface):"]
+ set c1r2 [label $col1.2 -text [G_msg "From (eye):"]]
+ set c1r3 [label $col1.3 -text [G_msg "To (surface):"]]
set c1r4 [label $col1.4 -text " "]
set c1r5 [label $col1.5 -text " "]
- set c1r6 [label $col1.6 -text "Range/bearing:"]
+ set c1r6 [label $col1.6 -text [G_msg "Range/bearing:"]]
pack $c1r1 $c1r2 $c1r3 $c1r4 $c1r5 $c1r6 -side top -anchor e
- set c2r1 [label $col2.1 -text "East" -fg black -font $nviztxtfont]
+ set c2r1 [label $col2.1 -text [G_msg "East"] -fg black -font $nviztxtfont]
set c2r2 [entry $col2.2 -width 10 -textvariable Nv_(east1) -bg white]
set c2r3 [entry $col2.3 -width 10 -textvariable Nv_(east2) -bg white]
set c2r4 [label $col2.4 -text " "]
- set c2r5 [label $col2.5 -text "Range" -fg black -font $nviztxtfont]
+ set c2r5 [label $col2.5 -text [G_msg "Range"] -fg black -font $nviztxtfont]
set c2r6 [entry $col2.6 -width 10 -textvariable Nv_(range) -bg white]
pack $c2r1 $c2r2 $c2r3 $c2r4 $c2r5 $c2r6 -side top
- set c3r1 [label $col3.1 -text "North" -fg black -font $nviztxtfont]
+ set c3r1 [label $col3.1 -text [G_msg "North"] -fg black -font $nviztxtfont]
set c3r2 [entry $col3.2 -width 10 -textvariable Nv_(north1) -bg white]
set c3r3 [entry $col3.3 -width 10 -textvariable Nv_(north2) -bg white]
set c3r4 [label $col3.4 -text " "]
- set c3r5 [label $col3.5 -text "Bearing" -fg black -font $nviztxtfont]
+ set c3r5 [label $col3.5 -text [G_msg "Bearing"] -fg black -font $nviztxtfont]
set c3r6 [entry $col3.6 -width 10 -textvariable Nv_(bearing) -bg white]
pack $c3r1 $c3r2 $c3r3 $c3r4 $c3r5 $c3r6 -side top
- set c4r1 [label $col4.1 -text "Height" -fg black -font $nviztxtfont]
+ set c4r1 [label $col4.1 -text [G_msg "Height"] -fg black -font $nviztxtfont]
set c4r2 [entry $col4.2 -width 8 -textvariable Nv_(ht1) -bg white]
set c4r3 [entry $col4.3 -width 8 -textvariable Nv_(ht2) -bg white]
set c4r4 [label $col4.4 -text " "]
- set c4r5 [label $col4.5 -text "Elev" -fg black -font $nviztxtfont]
+ set c4r5 [label $col4.5 -text [G_msg "Elev"] -fg black -font $nviztxtfont]
set c4r6 [entry $col4.6 -width 8 -textvariable Nv_(elev) -bg white]
pack $c4r1 $c4r2 $c4r3 $c4r4 $c4r5 $c4r6 -side top
@@ -80,9 +80,9 @@
# Mode setting radiobuttons
set tmp3 [frame $BASE.top3]
- radiobutton $tmp3.r1 -text "Eye to surface" -variable "bearing_calc" -value "1" -command "catch {show_bearing}"
- radiobutton $tmp3.r2 -text "Surface to eye" -variable "bearing_calc" -value "2" -command "catch {show_bearing}"
- button $tmp3.b1 -text "Calculate" -command "catch {calc_position $bearing_calc};catch {show_bearing}" -bd 1
+ radiobutton $tmp3.r1 -text [G_msg "Eye to surface"] -variable "bearing_calc" -value "1" -command "catch {show_bearing}"
+ radiobutton $tmp3.r2 -text [G_msg "Surface to eye"] -variable "bearing_calc" -value "2" -command "catch {show_bearing}"
+ button $tmp3.b1 -text [G_msg "Calculate"] -command "catch {calc_position $bearing_calc};catch {show_bearing}" -bd 1
pack $tmp3.r1 $tmp3.r2 $tmp3.b1 -side left -padx 3 -expand 1 -fill x
pack $tmp3 -side top -fill x -expand 1 -pady 4
@@ -92,7 +92,7 @@
# Buttons menu
set tmp4 [frame $BASE.top4]
- button $tmp4.b1 -text "Refresh" -bd 1 \
+ button $tmp4.b1 -text [G_msg "Refresh"] -bd 1 \
-command {set from_loc [Nget_real_position 1]
set to_loc [Nget_real_position 2]
set Nv_(east1) [format_number [lindex $from_loc 0]]
@@ -106,7 +106,7 @@
show_bearing
}
- button $tmp4.b2 -text "Apply" -bd 1 \
+ button $tmp4.b2 -text [G_msg "Apply"] -bd 1 \
-command {
#Set To coords
Nset_focus_real $Nv_(east2) $Nv_(north2) $Nv_(ht2)
@@ -122,7 +122,7 @@
Ndraw_all
}
- button $tmp4.b3 -text "Close" -command "Nv_closePanel $BASE" -bd 1
+ button $tmp4.b3 -text [G_msg "Close"] -command "Nv_closePanel $BASE" -bd 1
pack $tmp4.b1 $tmp4.b2 -side left
pack $tmp4.b3 -side right
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_resize.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_resize.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_resize.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -24,23 +24,23 @@
# Initialize panel info
if [catch {set Nv_($BASE)}] {
set panel [St_create {window name size priority} \
- $BASE "Resize Draw Area" 1 5]
+ $BASE [G_msg "Resize Draw Area"] 1 5]
} else {
set panel $Nv_($BASE)
}
frame $BASE -relief groove -borderwidth 2
- Nv_mkPanelname $BASE "Resize Panel"
+ Nv_mkPanelname $BASE [G_msg "Resize Panel"]
frame $BASE.top
frame $BASE.bottom -bd 2 -relief groove
frame $BASE.top2
- label $BASE.top.label -text "Resize: "
+ label $BASE.top.label -text [G_msg "Resize: "]
pack $BASE.top.label -side left -fill y -pady 4
- label $BASE.top.lwidth -text width
- label $BASE.top.lheight -text height
+ label $BASE.top.lwidth -text [G_msg "width"]
+ label $BASE.top.lheight -text [G_msg "height"]
entry $BASE.top.width -width 6 -borderwidth 2 -relief sunken
entry $BASE.top.height -width 6 -borderwidth 2 -relief sunken
@@ -49,13 +49,13 @@
pack $BASE.top.lwidth $BASE.top.width $BASE.top.lheight $BASE.top.height -side left
- button $BASE.bottom.resize -text Resize -command "resize_togl $BASE.top"
+ button $BASE.bottom.resize -text [G_msg "Resize"] -command "resize_togl $BASE.top"
pack $BASE.bottom.resize -side left
- button $BASE.bottom.refresh -text Refresh -command "resize_panel_refresh $BASE.top"
+ button $BASE.bottom.refresh -text [G_msg "Refresh"] -command "resize_panel_refresh $BASE.top"
pack $BASE.bottom.refresh -side left
- button $BASE.bottom.close -text Close -command "Nv_closePanel $BASE"
+ button $BASE.bottom.close -text [G_msg "Close"] -command "Nv_closePanel $BASE"
pack $BASE.bottom.close -side right
pack $BASE.top $BASE.top2 $BASE.bottom \
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_rquery.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_rquery.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_rquery.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -38,7 +38,7 @@
set Nv_(what_surfdist) 1
set Nv_(what_exagsurfdist) 1
set Nv_(what_pipe) 0
-set Nv_(what_pipe_text) "Send results to: (no file selected)"
+set Nv_(what_pipe_text) [G_msg "Send results to: (no file selected)"]
proc mkqueryPanel { BASE } {
@@ -49,23 +49,23 @@
# Initialize panel info
if [catch {set Nv_($BASE)}] {
- set panel [St_create {window name size priority} $BASE "Raster Query" 1 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Raster Query"] 1 5]
} else {
set panel $Nv_($BASE)
}
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Raster Query Panel"
+ Nv_mkPanelname $BASE [G_msg "Raster Query Panel"]
# Create frame, buttons, and attributes menu
frame $BASE.bf -relief flat -borderwidth 0
- checkbutton $BASE.bf.what -text "query on/off" \
+ checkbutton $BASE.bf.what -text [G_msg "query on/off"] \
-command whats_here -variable WhatsHere(on)
- Button $BASE.bf.separate -text Reset -command do_separate \
- -bd 1 -width 6 -helptext "Reset most recent query"
- Button $BASE.bf.clear -text Clear -command clear_text \
- -bd 1 -width 6 -helptext "Clear all queries"
- menubutton $BASE.bf.atts -text Attributes \
+ Button $BASE.bf.separate -text [G_msg "Reset"] -command do_separate \
+ -bd 1 -width 6 -helptext [G_msg "Reset most recent query"]
+ Button $BASE.bf.clear -text [G_msg "Clear"] -command clear_text \
+ -bd 1 -width 6 -helptext [G_msg "Clear all queries"]
+ menubutton $BASE.bf.atts -text [G_msg "Attributes"] \
-menu $BASE.bf.atts.m -relief raised \
-indicatoron 1 -bd 1
menu $BASE.bf.atts.m
@@ -75,11 +75,7 @@
# Add menu entries for menu
set theMenu $BASE.bf.atts.m
- foreach i {{"Map name" "mapname" 0} {"Easting" "easting" 0} {"Northing" "northing" 0} \
- {"Elevation" "elevation" 1} {"Category of color map" "colorcat" 0} \
- {"XY dist from prev" "xydiff" 0} \
- {"XYZ dist from prev" "xyzdiff" 2} {"Dist along surface" "surfdist" 0} \
- {"Dist along exag surface" "exagsurfdist" 5}} {
+ foreach i [list [list [G_msg "Map name"] "mapname" 0] [list [G_msg "Easting"] "easting" 0] [list [G_msg "Northing"] "northing" 0] [list [G_msg "Elevation"] "elevation" 1] [list [G_msg "Category of color map"] "colorcat" 0] [list [G_msg "XY dist from prev"] "xydiff" 0] [list [G_msg "XYZ dist from prev"] "xyzdiff" 2] [list [G_msg "Dist along surface"] "surfdist" 0] [list [G_msg "Dist along exag surface"] "exagsurfdist" 5]] {
$theMenu add checkbutton -label [lindex $i 0] -underline [lindex $i 2] \
-offvalue 0 -onvalue 1 -variable Nv_(what_[lindex $i 1])
@@ -89,12 +85,12 @@
# frrame for close button and saving output to a file
frame $BASE.cf
- Button $BASE.cf.close -text Close -command "Nv_closePanel $BASE" \
+ Button $BASE.cf.close -text [G_msg "Close"] -command "Nv_closePanel $BASE" \
-bd 1 -width 6
Button $BASE.cf.output -textvariable Nv_(what_pipe_text) \
-command "whats_pipe_bind $BASE" -bd 1 \
- -helptext "Select file to receive all future query results"
+ -helptext [G_msg "Select file to receive all future query results"]
pack $BASE.cf.close $BASE.cf.output -side right -expand 0 -fill none
pack $BASE.cf.output -side left
@@ -127,7 +123,7 @@
if {$new_file == -1} then return
set Nv_(what_pipe) $new_file
- set Nv_(what_pipe_text) "Send results to: $new_file"
+ set Nv_(what_pipe_text) [format [G_msg "Send results to: %s"] $new_file]
}
proc whats_here {} {
@@ -153,8 +149,8 @@
set list [Nget_point_on_surf $x $y]
if {[llength $list] < 4} {
- $text insert end "Point not on surface\n"
- append tot_out "Point not on surface\n"
+ $text insert end [G_msg "Point not on surface\n"]
+ append tot_out [G_msg "Point not on surface\n"]
$text yview -pickplace end
return
}
@@ -165,21 +161,21 @@
set id [lindex $list 3]
if {$Nv_(what_easting)} then {
- set str [format "Easting: %15.4f\n" $x]
+ set str [format [G_msg "Easting: %15.4f\n"] $x]
$text insert end "$str"
append tot_out "$str"
$text yview -pickplace end
}
if {$Nv_(what_northing)} then {
- set str [format "Northing: %15.4f\n" $y]
+ set str [format [G_msg "Northing: %15.4f\n"] $y]
$text insert end "$str"
append tot_out "$str"
$text yview -pickplace end
}
if {$Nv_(what_elevation)} then {
- set str [format "Elevation: %15.4f\n" $z]
+ set str [format [G_msg "Elevation: %15.4f\n"] $z]
$text insert end "$str"
append tot_out "$str"
$text yview -pickplace end
@@ -187,8 +183,8 @@
if {$Nv_(what_mapname)} then {
set str [Nget_map_name [string range $id 5 end] surf]
- $text insert end "Surf map: $str"
- append tot_out "Surf map: $str"
+ $text insert end [format [G_msg "Surf map: %s"] $str]
+ append tot_out [format [G_msg "Surf map: %s"] $str]
set str [Nget_cat_at_xy $id topo $x $y]
$text insert end "\t$str\n"
append tot_out "\t$str\n"
@@ -203,10 +199,10 @@
if {[lindex $map_name 0] == "map"} then {
set str [lindex $map_name 1]
} else {
- set str "constant"
+ set str [G_msg "constant"]
}
- $text insert end "Color map: $str"
- append tot_out "Color map: $str"
+ $text insert end [format [G_msg "Color map: %s"] $str]
+ append tot_out [format [G_msg "Color map: %s"] $str]
set str [Nget_cat_at_xy $id color $x $y]
$text insert end "\t$str\n"
append tot_out "\t$str\n"
@@ -225,7 +221,7 @@
if {$Nv_(what_xydiff)} then {
set val [expr sqrt(($px-$x)*($px-$x)+($py-$y)*($py-$y))]
- set str [format "XY distance from previous: \t%15.4f\n" $val]
+ set str [format [G_msg "XY distance from previous: \t%15.4f\n"] $val]
$text insert end "$str"
append tot_out "$str"
$text yview -pickplace end
@@ -233,7 +229,7 @@
if {$Nv_(what_xyzdiff)} then {
set val [expr sqrt(($px-$x)*($px-$x)+($py-$y)*($py-$y)+($pz-$z)*($pz-$z))]
- set str [format "XYZ distance from previous: \t%15.4f\n" $val]
+ set str [format [G_msg "XYZ distance from previous: \t%15.4f\n"] $val]
$text insert end "$str"
append tot_out "$str"
$text yview -pickplace end
@@ -242,7 +238,7 @@
if {$WhatsHere(pid) == $id} {
if {$Nv_(what_surfdist)} then {
set dist [Nget_dist_along_surf $id $x $y $px $py 0]
- set str [format "Distance along surface: \t%15.4f\n" $dist]
+ set str [format [G_msg "Distance along surface: \t%15.4f\n"] $dist]
$text insert end "$str"
append tot_out "$str"
$text yview -pickplace end
@@ -253,7 +249,7 @@
if {$Nv_(what_exagsurfdist)} then {
set dist [Nget_dist_along_surf $id $x $y $px $py 1]
- set str [format "Distance along exag. surface:%15.4f\n" $dist]
+ set str [format [G_msg "Distance along exag. surface:%15.4f\n"] $dist]
$text insert end "$str"
append tot_out "$str"
$text yview -pickplace end
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_scale.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_scale.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_scale.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -42,22 +42,22 @@
set bar_text_clr "#DDDDDD"
set bar_text_size "non funct."
- set panel [St_create {window name size priority} $BASE "Scale bar" 2 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Scale bar"] 2 5]
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Scale Bar Panel"
+ Nv_mkPanelname $BASE [G_msg "Scale Bar Panel"]
# This section contains widgets for placing the scale bar
set rbase1 [frame $BASE.scale]
- Label $rbase1.scalebar_lbl -text "Scale bar: " -fg black
+ Label $rbase1.scalebar_lbl -text [G_msg "Scale bar: "] -fg black
LabelEntry $rbase1.scalebar_size -relief sunken -entrybg white \
-textvariable scalebar_size -width 8 \
- -label "length (in map units) " -fg black -font $nviztxtfont
+ -label [G_msg "length (in map units) "] -fg black -font $nviztxtfont
pack $rbase1.scalebar_lbl $rbase1.scalebar_size -side left -expand no -fill none
$rbase1.scalebar_size bind <Key> {if {$Nauto_draw == 1} {Ndraw_all}}
- Button $rbase1.color -text "Color" \
+ Button $rbase1.color -text [G_msg "Color"] \
-bg $bar_clr -width 8 -bd 1 \
-command "change_scale_color $rbase1.color scale" \
-fg "#ffffff"
@@ -68,15 +68,15 @@
# This section contains widgets for scale text
set rbase2 [frame $BASE.txt]
- Label $rbase2.txt_lbl -text "Scale text: " -fg black
+ Label $rbase2.txt_lbl -text [G_msg "Scale text: "] -fg black
LabelEntry $rbase2.txt_size -relief sunken -entrybg grey \
-textvariable bar_text_size -width 8 -justify right\
- -label "size " -fg black -labelfont $nviztxtfont
+ -label [G_msg "size "] -fg black -labelfont $nviztxtfont
pack $rbase2.txt_lbl $rbase2.txt_size -side left -expand no -fill none
$rbase2.txt_size bind <Key> {if {$Nauto_draw == 1} {Ndraw_all}}
- Button $rbase2.color -text "Color" \
+ Button $rbase2.color -text [G_msg "Color"] \
-bg $bar_text_clr -width 8 -bd 1 \
-command "change_scale_color $rbase2.color text" \
-fg "#ffffff"
@@ -87,11 +87,11 @@
# close panel section
set rbase3 [frame $BASE.button]
- Button $rbase3.place -text "Place scale" -bd 1 \
+ Button $rbase3.place -text [G_msg "Place scale"] -bd 1 \
-command "sb_bind_mouse $Nv_(TOP).canvas; $Nv_(TOP) configure -cursor plus"
pack $rbase3.place -expand yes -side left -expand no -fill none
- button $rbase3.close -text "Close" -command "Nv_closePanel $BASE" \
+ button $rbase3.close -text [G_msg "Close"] -command "Nv_closePanel $BASE" \
-anchor se -bd 1
pack $rbase3.close -side right -fill none -expand no
pack $rbase3 -side top -fill both -expand yes -padx 3 -pady 4
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_sdiff.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_sdiff.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_sdiff.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -36,13 +36,13 @@
# Initialize panel info
if [catch {set Nv_($BASE)}] {
set panel [St_create {window name size priority} \
- $BASE "Scaled Difference" 1 5]
+ $BASE [G_msg "Scaled Difference"] 1 5]
} else {
set panel $Nv_($BASE)
}
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Scaled Difference Panel"
+ Nv_mkPanelname $BASE [G_msg "Scaled Difference Panel"]
frame $BASE.top
frame $BASE.bottom
@@ -51,22 +51,22 @@
set maplist [Nget_map_list surf]
- Label $BASE.top.label -text "Reference surface:"
+ Label $BASE.top.label -text [G_msg "Reference surface:"]
Nv_mksdiffSurfacelist $BASE.top.list
pack $BASE.top.label $BASE.top.list -side left -fill y -pady 4
- Label $BASE.top1.lbl -text "Set difference between reference surface and others"
+ Label $BASE.top1.lbl -text [G_msg "Set difference between reference surface and others"]
pack $BASE.top1.lbl -side left -pady 4
Nv_mkScale $BASE.top2.sdscale h "z-exag" 0 2500 100 set_sdexag 2
pack $BASE.top2.sdscale -side bottom
- Button $BASE.bottom.none -text "Clear" \
+ Button $BASE.bottom.none -text [G_msg "Clear"] \
-command "unset_sdsurf" -bd 1 -width 5 \
- -helptext "unselect reference surface"
+ -helptext [G_msg "unselect reference surface"]
pack $BASE.bottom.none -side left
- button $BASE.bottom.close -text "Close" \
+ button $BASE.bottom.close -text [G_msg "Close"] \
-command "Nv_closePanel $BASE" -bd 1 -width 5
pack $BASE.bottom.close -side right
@@ -121,7 +121,7 @@
set name [Nget_current sdiff]
if {$name == 0} {
- set name "None selected "
+ set name [G_msg "None selected"]
} else {
set n [lsearch $list $name]
set list [lreplace $list $n $n]
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_site.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_site.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_site.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -41,22 +41,22 @@
# Initialize panel info
if [catch {set Nv_($BASE)}] {
- set panel [St_create {window name size priority} $BASE "Vector Points" 1 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Vector Points"] 1 5]
} else {
set panel $Nv_($BASE)
}
########## create panel heading
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Vector Points Panel"
+ Nv_mkPanelname $BASE [G_msg "Vector Points Panel"]
########## create top frame
set top [frame $BASE.top]
- Label $top.current -text "Current:" -anchor w
+ Label $top.current -text [G_msg "Current:"] -anchor w
mkMapList $top.list site
- button $top.new -text New -anchor center -command "add_map site" -bd 1
- button $top.delete -text Delete -anchor center -command "delete_map site" -bd 1
+ button $top.new -text [G_msg "New"] -anchor center -command "add_map site" -bd 1
+ button $top.delete -text [G_msg "Delete"] -anchor center -command "delete_map site" -bd 1
pack $top.current $top.list -side left
pack $top.delete $top.new -side right -expand 0
@@ -65,6 +65,7 @@
# initialize variables and map list
set curr [Nget_current site]
set Nv_(siteshape) sphere
+ set Nv_(siteshapelv) ""
change_marker
if {0 != $curr} {
@@ -110,11 +111,11 @@
########## create bottom frame
set bottom [frame $BASE.bottom]
- button $bottom.close -text Close \
+ button $bottom.close -text [G_msg "Close"] \
-command "Nv_closePanel $BASE" -anchor s -bd 1
pack $bottom.close -side right
- button $bottom.draw_current -text "DRAW CURRENT" -fg darkgreen -anchor s \
+ button $bottom.draw_current -text [G_msg "DRAW CURRENT"] -fg darkgreen -anchor s \
-command {Nsite_draw_one [Nget_current site]} -bd 1
pack $bottom.draw_current -side left
@@ -129,7 +130,7 @@
set row4 [frame $mid1.row4]
set row5 [frame $mid1.row5]
- set szlabel [label $row1.szlabel -text "icon size" \
+ set szlabel [label $row1.szlabel -text [G_msg "icon size"] \
-font $nviztxtfont -fg black]
@@ -145,23 +146,24 @@
$ptsize setvalue @$startindex
- set ptcolor [button $row1.color -text Color \
+ set ptcolor [button $row1.color -text [G_msg "Color"] \
-command "change_color site $row1.color"]
bind $ptcolor <Expose> "$row1.color configure -bg \[get_curr_sv_color site\]"
- set markerlbl [label $row1.markerlbl -text " icon type " -fg black -font $nviztxtfont]
+ set markerlbl [label $row1.markerlbl -text [G_msg "icon type"] -fg black -font $nviztxtfont]
set markertype [ComboBox $row1.marker -width 8 \
-textvariable Nv_(siteshape) -modifycmd change_marker \
- -values {"x" "sphere" "diamond" "cube" "box" "gyro" "aster" "histogram"}]
+ -values $Nv_(siteshapes) -labels $Nv_(siteshape_names) -labelsvariable Nv_(siteshapelv)]
+
pack $szlabel $ptsize $markerlbl $markertype -side left
pack $ptcolor -side left -padx 10
- set rb1 [radiobutton $row2.disp3d -text "3D points" \
+ set rb1 [radiobutton $row2.disp3d -text [G_msg "3D points"] \
-anchor nw -variable Nv_(sitedisplay) -value 3d \
-command change_site_mode]
- set rb2 [radiobutton $row3.dispsurf -text "display on surface(s):" \
+ set rb2 [radiobutton $row3.dispsurf -text [G_msg "display on surface(s):"] \
-anchor nw -variable Nv_(sitedisplay) -value surfdisp \
-command change_site_mode]
@@ -177,7 +179,7 @@
set site_attr(FIELD_ATTR_PANEL) 0
- checkbutton $row4.themechk -text "thematic mapping for vector points" \
+ checkbutton $row4.themechk -text [G_msg "thematic mapping for vector points"] \
-variable site_attr(FIELD_ATTR_PANEL) -command "if {$curr!=0} {site_attr_gui $row5 $bottom $curr}" \
-offvalue 0 -onvalue 1
pack $row4.themechk -side left -anchor nw
@@ -363,10 +365,3 @@
if {$Nauto_draw == 1} {Ndraw_all}
}
}
-
-
-
-
-
-
-
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_surf.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_surf.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_surf.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -48,14 +48,14 @@
# Initialize panel info
if [catch {set Nv_($BASE)}] {
- set panel [St_create {window name size priority} $BASE "Raster Surfaces" 2 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Raster Surfaces"] 2 5]
} else {
set panel $Nv_($BASE)
}
# surface panel frame
frame $BASE -relief flat -bd 0
- Nv_mkPanelname $BASE "Surface Panel"
+ Nv_mkPanelname $BASE [G_msg "Surface Panel"]
# resolution panel frame
frame $BASE.bottom -relief flat -bd 0
@@ -65,10 +65,10 @@
###### make widgets that control which is current surface (menu, new delete)###
set tmp [frame $BASE.top.top]
- Label $tmp.current -text "Current:" -anchor w
+ Label $tmp.current -text [G_msg "Current:"] -anchor w
mkMapList $tmp.list surf set_display_from_curr
- button $tmp.new -text New -anchor center -bd 1 -command new_surf
- button $tmp.delete -text Delete -anchor center -bd 1 -command delete_surf
+ button $tmp.new -text [G_msg "New"] -anchor center -bd 1 -command new_surf
+ button $tmp.delete -text [G_msg "Delete"] -anchor center -bd 1 -command delete_surf
pack $tmp.current $tmp.list -side left
pack $tmp.delete $tmp.new -side right -expand 0
@@ -76,7 +76,7 @@
####### make buttons that control attributes for current surface ########
set tmp [frame $BASE.top.bottom -bd 0 -relief flat]
set tmp2 [frame $BASE.top.bottom2 -bd 0 -relief flat]
- menubutton $tmp.menu1 -menu $tmp.menu1.m -text "Surface attributes..." -relief raised \
+ menubutton $tmp.menu1 -menu $tmp.menu1.m -text [G_msg "Surface attributes..."] -relief raised \
-indicatoron 1 -bd 1
menu $tmp.menu1.m
@@ -85,18 +85,18 @@
-command "mkAttPopup .pop $i 1"
}
- button $tmp.wireclr -text "Wire Color" \
+ button $tmp.wireclr -text [G_msg "Wire Color"] \
-command "change_wirecolor $tmp.wireclr" \
-bg [get_curr_wire_color] -bd 1
- button $tmp.position -text "Position" -bd 1 -command "mkPositionPanel .pos_surf"
+ button $tmp.position -text [G_msg "Position"] -bd 1 -command "mkPositionPanel .pos_surf"
pack $tmp.menu1 $tmp.wireclr $tmp.position -side left -fill x -expand 1 -ipadx 3
- Label $tmp2.l1 -text "Mask zeros:" -relief flat
- checkbutton $tmp2.nozeros1 -text "by elevation" \
+ Label $tmp2.l1 -text [G_msg "Mask zeros:"] -relief flat
+ checkbutton $tmp2.nozeros1 -text [G_msg "by elevation"] \
-variable Nv_(TopNoZeros) -command no_zeros
- checkbutton $tmp2.nozeros2 -text "by color" \
+ checkbutton $tmp2.nozeros2 -text [G_msg "by color"] \
-variable Nv_(ColNoZeros) -command no_zeros
pack $tmp2.l1 $tmp2.nozeros1 $tmp2.nozeros2 \
@@ -106,41 +106,41 @@
set tmp [frame $BASE.bottom.t1]
menubutton $tmp.style -menu $tmp.style.m -relief raised \
- -text "Draw mode..." -underline 0 -indicatoron 1 \
+ -text [G_msg "Draw mode..."] -underline 0 -indicatoron 1 \
-justify center -bd 1
menu $tmp.style.m
- $tmp.style.m add radiobutton -label Coarse -value wire \
+ $tmp.style.m add radiobutton -label [G_msg "Coarse"] -value wire \
-variable Nv_(SurfStyle) -command set_drawmode
- $tmp.style.m add radiobutton -label Fine -value poly \
+ $tmp.style.m add radiobutton -label [G_msg "Fine"] -value poly \
-variable Nv_(SurfStyle) -command set_drawmode
- $tmp.style.m add radiobutton -label Both -value wire_poly \
+ $tmp.style.m add radiobutton -label [G_msg "Both"] -value wire_poly \
-variable Nv_(SurfStyle) -command set_drawmode
menubutton $tmp.gstyle -menu $tmp.gstyle.m -relief raised \
- -text "Coarse style..." -underline 0 -indicatoron 1 \
+ -text [G_msg "Coarse style..."] -underline 0 -indicatoron 1 \
-justify center -bd 1
menu $tmp.gstyle.m
- $tmp.gstyle.m add radiobutton -label Wire -value grid_wire \
+ $tmp.gstyle.m add radiobutton -label [G_msg "Wire"] -value grid_wire \
-variable Nv_(GridStyle) -command set_drawmode
- $tmp.gstyle.m add radiobutton -label "Surface" -value grid_surf \
+ $tmp.gstyle.m add radiobutton -label [G_msg "Surface"] -value grid_surf \
-variable Nv_(GridStyle) -command set_drawmode
- menubutton $tmp.shading -text "Shading..." -menu $tmp.shading.m \
+ menubutton $tmp.shading -text [G_msg "Shading..."] -menu $tmp.shading.m \
-relief raised -underline 0 -indicatoron 1 \
-justify center -bd 1
menu $tmp.shading.m
- $tmp.shading.m add radiobutton -label Flat -value flat \
+ $tmp.shading.m add radiobutton -label [G_msg "Flat"] -value flat \
-variable Nv_(ShadeStyle) -command set_drawmode
- $tmp.shading.m add radiobutton -label Gouraud -value gouraud \
+ $tmp.shading.m add radiobutton -label [G_msg "Gouraud"] -value gouraud \
-variable Nv_(ShadeStyle) -command set_drawmode
pack $tmp.style $tmp.gstyle $tmp.shading -side left -fill x -expand 1 -pady 3
########### make controls for setting resolution ##################
set tmp [frame $BASE.bottom.t2]
- set reslabel [Label $tmp.subsampling -text "Resolution:" -justify left -anchor w]
+ set reslabel [Label $tmp.subsampling -text [G_msg "Resolution:"] -justify left -anchor w]
- set sblabel1 [label $tmp.sblabel1 -text coarse -font $nviztxtfont \
+ set sblabel1 [label $tmp.sblabel1 -text [G_msg "coarse"] -font $nviztxtfont \
-fg black -anchor e -justify right]
set sbwire [SpinBox $tmp.gridarrows2 -range {1 100 1}\
-textvariable wireres \
@@ -150,7 +150,7 @@
-entrybg white]
set sblabel2 [label $tmp.sblabel2 -font $nviztxtfont \
- -fg black -anchor e -justify right -text "fine" ]
+ -fg black -anchor e -justify right -text [G_msg "fine"] ]
set sbpoly [SpinBox $tmp.gridarrows1 -range {1 100 1}\
-textvariable polyres \
-modifycmd {update_spinres "poly" $polyres} \
@@ -163,10 +163,10 @@
########### make radiobuttons that control scope of changes made ##################
set tmp [frame $BASE.bottom.t3]
- set rblabel1 [Label $tmp.rblabel1 -anchor w -text "Set resolution for:"]
- set rbcurrent [radiobutton $tmp.current -text "current surface"\
+ set rblabel1 [Label $tmp.rblabel1 -anchor w -text [G_msg "Set resolution for:"]]
+ set rbcurrent [radiobutton $tmp.current -text [G_msg "current surface"]\
-anchor w -value 1 -variable Nv_(CurrOnly)]
- set rball [radiobutton $tmp.all -text "all surfaces" -justify right \
+ set rball [radiobutton $tmp.all -text [G_msg "all surfaces"] -justify right \
-anchor e -value 0 -variable Nv_(CurrOnly) -command set_drawmode]
pack $rblabel1 $rbcurrent $rball -side left -fill x -ipadx 2
@@ -181,8 +181,8 @@
pack $BASE.bottom.t3 -side top -fill both -pady 5 -expand 1
########## make button to close panel ########################################
- button $BASE.close -text Close -bd 1 -command "Nv_closePanel $BASE"
- button $BASE.draw_current -text "DRAW CURRENT" -bd 1 -fg darkgreen \
+ button $BASE.close -text [G_msg "Close"] -bd 1 -command "Nv_closePanel $BASE"
+ button $BASE.draw_current -text [G_msg "DRAW CURRENT"] -bd 1 -fg darkgreen \
-command {Nsurf_draw_one [Nget_current surf]}
pack $BASE.close -side right -fill y
pack $BASE.draw_current -side left -fill y -padx 3
@@ -667,8 +667,8 @@
# Create toplevel widget to hold everything
toplevel $w -class Dialog
- wm title $w "Position Surface"
- wm iconname $w "Attribute"
+ wm title $w [G_msg "Position Surface"]
+ wm iconname $w [G_msg "Attribute"]
# Get current surface attributes
set curr_surf [Nget_current surf]
@@ -698,9 +698,9 @@
# Create X, Y, and Z entry widgets along with Reset and Close buttons
frame $w.coords
- label $w.coords.z_lbl -text "Z:"
- label $w.coords.x_lbl -text "X:"
- label $w.coords.y_lbl -text "Y:"
+ label $w.coords.z_lbl -text [G_msg "Z:"]
+ label $w.coords.x_lbl -text [G_msg "X:"]
+ label $w.coords.y_lbl -text [G_msg "Y:"]
entry $w.coords.z_ent -width 5 -relief sunken -bg white
entry $w.coords.x_ent -width 5 -relief sunken -bg white
entry $w.coords.y_ent -width 5 -relief sunken -bg white
@@ -722,8 +722,8 @@
pack $w.coords -side top -in $w.bottom -fill both
frame $w.commands
- button $w.commands.reset -text "Reset" -command "$w.zslide set 0; Nv_itemDrag $w.pos $Nv_(SURF_POS) 63 63; Nv_xyCallback $update_routine 126 126 63 63"
- button $w.commands.close -text "Close" -command "destroy $w"
+ button $w.commands.reset -text [G_msg "Reset"] -command "$w.zslide set 0; Nv_itemDrag $w.pos $Nv_(SURF_POS) 63 63; Nv_xyCallback $update_routine 126 126 63 63"
+ button $w.commands.close -text [G_msg "Close"] -command "destroy $w"
pack $w.commands.reset $w.commands.close \
-side left -fill both -padx 3 -pady 3 -expand yes
pack $w.commands -in $w.bottom -fill both
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_tst.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_tst.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_tst.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -18,7 +18,7 @@
catch {destroy $BASE}
# Initialize panel info
if [catch {set Nv_($BASE)}] {
- set panel [St_create {window name size priority} $BASE "Test" 1 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Test"] 1 5]
} else {
set panel $Nv_($BASE)
}
@@ -28,7 +28,7 @@
# source test_procs.tcl
frame $BASE -relief groove -borderwidth 2
- Nv_mkPanelname $BASE "Test Panel"
+ Nv_mkPanelname $BASE [G_msg "Test Panel"]
#button $BASE.test1 -text Test1 -bg black -fg white\
#-activebackground gray20 -activeforeground white\
@@ -50,7 +50,7 @@
frame $BASE.closef
- button $BASE.closef.close -text Close -command "Nv_closePanel $BASE" \
+ button $BASE.closef.close -text [G_msg "Close"] -command "Nv_closePanel $BASE" \
-anchor se
pack $BASE.closef.close -side right
pack $BASE.closef -side bottom -fill x
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vect.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vect.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vect.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -52,22 +52,22 @@
# Initialize panel info
if [catch {set Nv_($BASE)}] {
- set panel [St_create {window name size priority} $BASE "Vector Lines/3D Polygons" 2 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Vector Lines/3D Polygons"] 2 5]
} else {
set panel $Nv_($BASE)
}
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Vector Lines Panel"
+ Nv_mkPanelname $BASE [G_msg "Vector Lines Panel"]
#create top frame
###### make widgets that control which is current surface (menu, new delete)###
set tmp [frame $BASE.top]
- Label $tmp.current -text "Current:" -anchor w
+ Label $tmp.current -text [G_msg "Current:"] -anchor w
mkMapList $tmp.list vect
- button $tmp.new -text New -anchor center -command "add_map vect" -bd 1
- button $tmp.delete -text Delete -anchor center -command "delete_map vect" -bd 1
+ button $tmp.new -text [G_msg "New"] -anchor center -command "add_map vect" -bd 1
+ button $tmp.delete -text [G_msg "Delete"] -anchor center -command "delete_map vect" -bd 1
pack $tmp.current $tmp.list -side left
pack $tmp.list -side left
@@ -77,9 +77,9 @@
# create bottom frame
set tmp [frame $BASE.f]
- button $tmp.close -text Close -command "Nv_closePanel $BASE" -anchor s -bd 1
+ button $tmp.close -text [G_msg "Close"] -command "Nv_closePanel $BASE" -anchor s -bd 1
pack $tmp.close -side right
- button $tmp.draw_current -text "DRAW CURRENT" -bd 1 -fg darkgreen \
+ button $tmp.draw_current -text [G_msg "DRAW CURRENT"] -bd 1 -fg darkgreen \
-command {Nvect_draw_one [Nget_current vect]}
pack $tmp.draw_current -side left
pack $tmp -side bottom -fill x -expand 1 -padx 3
@@ -92,7 +92,7 @@
set row4 [frame $tmp.row4]
set tmp1a [frame $row1.b]
- set wlabel [label $row1.wlabel -text "line width" \
+ set wlabel [label $row1.wlabel -text [G_msg "line width"] \
-font $nviztxtfont -fg black]
set vlinewidth [SpinBox $row1.linewidth -range {1 50 1}\
@@ -103,18 +103,18 @@
-entrybg white]
# checkbutton $tmp.load -relief flat -text "Load to memory"
- set vcolor [button $row1.color -text Color -bd 1\
+ set vcolor [button $row1.color -text [G_msg "Color"] -bd 1\
-command "change_color vect $row1.color"]
bind $row1.color <Expose> "$row1.color configure -bg \[get_curr_sv_color vect\]"
- set rb1 [radiobutton $row2.label2 -text "display flat" \
+ set rb1 [radiobutton $row2.label2 -text [G_msg "display flat"] \
-variable flat_state -value 1 -command "check_list $row3.list"]
- set rb2 [radiobutton $row2.label1 -text "display on surface(s):" \
+ set rb2 [radiobutton $row2.label1 -text [G_msg "display on surface(s):"] \
-variable flat_state -value 0 \
-command "check_list $row3.list"]
- set htscale [Nv_mkScale $row4.scale h "vector height\nabove surface" 0 10000 $height set_ht 1]
+ set htscale [Nv_mkScale $row4.scale h [G_msg "vector height\nabove surface"] 0 10000 $height set_ht 1]
pack $wlabel $vlinewidth -side left
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vol.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vol.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vol.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -18,8 +18,8 @@
##########################################################################
namespace eval NV_panel_vol {
- variable res # polygon resolution
- variable viztype # isosurfaces or slices
+ variable res ;# polygon resolution
+ variable viztype ;# isosurfaces or slices
}
# initial visualization type
@@ -37,18 +37,18 @@
# Initialize panel info
if [catch {set Nv_($BASE)}] {
- set panel [St_create {window name size priority} $BASE "Volumes" 2 5]
+ set panel [St_create {window name size priority} $BASE [G_msg "Volumes"] 2 5]
} else {
set panel $Nv_($BASE)
}
frame $BASE -relief flat -borderwidth 0
- Nv_mkPanelname $BASE "Volume Panel"
+ Nv_mkPanelname $BASE [G_msg "Volume Panel"]
###### make widgets that control which is current volume #############
set tmp [frame $BASE.volcontrol]
- label $tmp.current -text "Current:" -anchor w
+ label $tmp.current -text [G_msg "Current:"] -anchor w
mkMapList $tmp.list vol
button $tmp.new -text New -anchor center -bd 1 -command new_vol
button $tmp.delete -text Delete -anchor center -bd 1 -command delete_vol
@@ -60,32 +60,32 @@
set tmp [frame $BASE.vistype]
#label $tmp.title -text "Visualization type: " -relief flat
- menubutton $tmp.list -menu $tmp.list.m -text "Visualization type..." -relief raised \
+ menubutton $tmp.list -menu $tmp.list.m -text [G_msg "Visualization type..."] -relief raised \
-indicator 1 -bd 1
set pname [menu $tmp.list.m]
- $pname add radiobutton -label "isosurfaces" \
+ $pname add radiobutton -label [G_msg "isosurfaces"] \
-command "shuffle_vistype $BASE isosurf" \
- -variable viztype -value "isosurf"
- $pname add radiobutton -label "slices" \
+ -variable viztype -value isosurf
+ $pname add radiobutton -label [G_msg "slices"] \
-command "shuffle_vistype $BASE slice" \
-variable viztype -value "slice"
- menubutton $tmp.shading -text "Shading..." -menu $tmp.shading.m \
+ menubutton $tmp.shading -text [G_msg "Shading..."] -menu $tmp.shading.m \
-relief raised -underline 0 -indicatoron 1 -bd 1
menu $tmp.shading.m
- $tmp.shading.m add radiobutton -label Flat -value flat \
+ $tmp.shading.m add radiobutton -label [G_msg "Flat"] -value flat \
-variable Nv_(ShadeStyle) -command {all_set_drawmode $viztype $Nv_(ShadeStyle)}
- $tmp.shading.m add radiobutton -label Gouraud -value gouraud \
+ $tmp.shading.m add radiobutton -label [G_msg "Gouraud"] -value gouraud \
-variable Nv_(ShadeStyle) -command {all_set_drawmode $viztype $Nv_(ShadeStyle)}
# position button
- button $tmp.position -text "Position" -command "mkVolPositionPanel .pos_vol" -bd 1
+ button $tmp.position -text [G_msg "Position"] -command "mkVolPositionPanel .pos_vol" -bd 1
pack $tmp.list $tmp.shading $tmp.position -side left -expand 1 -fill both
######## control for volume polygon resolution ###############
set tmp [frame $BASE.res]
- set reslabel [label $tmp.reslabel -text "Polygon resolution: "]
+ set reslabel [label $tmp.reslabel -text [G_msg "Polygon resolution: "]]
set sbres [SpinBox $tmp.sbres -range {1 100 1}\
-textvariable res \
-modifycmd {all_set_res $viztype $res} \
@@ -112,7 +112,7 @@
########## make button to close panel ################################
set tmp [frame $BASE.f]
button $tmp.close -text Close -command "Nv_closePanel $BASE" -bd 1
- button $tmp.draw_current -text "DRAW CURRENT" -bd 1 -fg darkgreen
+ button $tmp.draw_current -text [G_msg "DRAW CURRENT"] -bd 1 -fg darkgreen
bind $tmp.draw_current <1> "Nset_cancel 1"
bind $tmp.draw_current <B1-ButtonRelease> "Nvol_draw_one [Nget_current vol]"
@@ -438,27 +438,27 @@
# slice axes
set tmp [frame $pname.t2.t -borderwidth 0 -relief flat]
- radiobutton $tmp.xaxis -text "X-axis" -state disabled -anchor nw -value 0 \
+ radiobutton $tmp.xaxis -text [G_msg "X-axis"] -state disabled -anchor nw -value 0 \
-variable Nv_(SliceAxis) -command "slice_set_pos $pname"
- radiobutton $tmp.yaxis -text "Y-axis" -state disabled -anchor nw -value 1 \
+ radiobutton $tmp.yaxis -text [G_msg "Y-axis"] -state disabled -anchor nw -value 1 \
-variable Nv_(SliceAxis) -command "slice_set_pos $pname"
- radiobutton $tmp.zaxis -text "Z-axis" -state disabled -anchor nw -value 2 \
+ radiobutton $tmp.zaxis -text [G_msg "Z-axis"] -state disabled -anchor nw -value 2 \
-variable Nv_(SliceAxis) -command "slice_set_pos $pname"
pack $tmp.xaxis $tmp.yaxis $tmp.zaxis -expand 1 -side left
- button $tmp.transp -text "Transparency" -command "slice_set_transp" \
+ button $tmp.transp -text [G_msg "Transparency"] -command "slice_set_transp" \
-state disabled -bd 1
pack $tmp.transp -fill both -side right
# slice position
if {$Nv_(SliceAxis) == 2 } {
- set xtitle "azimuth"
- set ytitle "length"
- set ztitle "height"
+ set xtitle [G_msg "azimuth"]
+ set ytitle [G_msg "length"]
+ set ztitle [G_msg "height"]
} else {
- set xtitle "tilt"
- set ytitle "height"
- set ztitle "length"
+ set xtitle [G_msg "tilt"]
+ set ytitle [G_msg "height"]
+ set ztitle [G_msg "length"]
}
set tmp [frame $pname.t2.b1 -borderwidth 0 -relief flat]
@@ -489,15 +489,15 @@
set top [frame $tmp.top]
set bottom [frame $tmp.bottom]
- Button $top.add -text "Add" -command "slice_add $pname" -bd 1 \
- -helptext "Add new slice"
- Button $top.delete -text "Delete" -command "slice_del $pname" -bd 1\
- -helptext "Delete selected slice"
+ Button $top.add -text [G_msg "Add"] -command "slice_add $pname" -bd 1 \
+ -helptext [G_msg "Add new slice"]
+ Button $top.delete -text [G_msg "Delete"] -command "slice_del $pname" -bd 1\
+ -helptext [G_msg "Delete selected slice"]
- Button $bottom.up -text "Move Up" -command "slice_up $pname" -bd 1\
- -helptext "Move slice up in list"
- Button $bottom.down -text "Move Down" -command "slice_down $pname" -bd 1\
- -helptext "Move slice down in list"
+ Button $bottom.up -text [G_msg "Move Up"] -command "slice_up $pname" -bd 1\
+ -helptext [G_msg "Move slice up in list"]
+ Button $bottom.down -text [G_msg "Move Down"] -command "slice_down $pname" -bd 1\
+ -helptext [G_msg "Move slice down in list"]
pack $top.add $top.delete -side top -expand 1 -fill x
pack $bottom.down $bottom.up -side bottom -expand 1 -fill x
@@ -730,13 +730,13 @@
# update slice scale titles
proc set_scale_title { dir } {
if {$dir == 2 } {
- set xtitle "azimuth"
- set ytitle "length"
- set ztitle "height"
+ set xtitle [G_msg "azimuth"]
+ set ytitle [G_msg "length"]
+ set ztitle [G_msg "height"]
} else {
- set xtitle "tilt"
- set ytitle "height"
- set ztitle "length"
+ set xtitle [G_msg "tilt"]
+ set ytitle [G_msg "height"]
+ set ztitle [G_msg "length"]
}
set scaletitle [list $xtitle $ytitle $ztitle]
return $scaletitle
@@ -827,7 +827,7 @@
set tmp [frame $pname.t2 -relief flat -borderwidth 0]
# isosurface attributes
- menubutton $tmp.menu1 -menu $tmp.menu1.m -text "Isosurface attributes..." -relief raised \
+ menubutton $tmp.menu1 -menu $tmp.menu1.m -text [G_msg "Isosurface attributes..."] -relief raised \
-indicatoron 1 -bd 1 -state disabled
pack $tmp.menu1 -side left -fill y -padx 3 -pady 3
menu $tmp.menu1.m
@@ -836,7 +836,7 @@
}
# inout flag
- checkbutton $tmp.inout -text "toggle normal direction" -state disabled \
+ checkbutton $tmp.inout -text [G_msg "toggle normal direction"] -state disabled \
-variable Nv_(InoutFlag) -command "isosurf_set_flags $pname" \
-font $nviztxtfont
@@ -857,15 +857,15 @@
set top [frame $tmp.top]
set bottom [frame $tmp.bottom]
- Button $top.add -text "Add" -command "isosurf_add $pname" -bd 1 \
- -helptext "Add new isosurface"
- Button $top.delete -text "Delete" -command "isosurf_del $pname" -bd 1\
- -helptext "Delete selected isosurface"
+ Button $top.add -text [G_msg "Add"] -command "isosurf_add $pname" -bd 1 \
+ -helptext [G_msg "Add new isosurface"]
+ Button $top.delete -text [G_msg "Delete"] -command "isosurf_del $pname" -bd 1\
+ -helptext [G_msg "Delete selected isosurface"]
- Button $bottom.up -text "Move Up" -command "isosurf_up $pname" -bd 1\
- -helptext "Move isosurface up in list"
- Button $bottom.down -text "Move Down" -command "isosurf_down $pname" -bd 1\
- -helptext "Move isosurface own in list"
+ Button $bottom.up -text [G_msg "Move Up"] -command "isosurf_up $pname" -bd 1\
+ -helptext [G_msg "Move isosurface up in list"]
+ Button $bottom.down -text [G_msg "Move Down"] -command "isosurf_down $pname" -bd 1\
+ -helptext [G_msg "Move isosurface own in list"]
pack $top.add $top.delete -side top -expand 1 -fill x
pack $bottom.down $bottom.up -side bottom -expand 1 -fill x
@@ -1111,8 +1111,8 @@
# Create toplevel widget to hold everything
toplevel $w -class Dialog
- wm title $w "Position Volume"
- wm iconname $w "Attribute"
+ wm title $w [G_msg "Position Volume"]
+ wm iconname $w [G_msg "Attribute"]
# Get current surface attributes
set curr_vol [Nget_current vol]
@@ -1142,9 +1142,9 @@
# Create X, Y, and Z entry widgets along with Reset and Close buttons
frame $w.coords
- label $w.coords.z_lbl -text "Z:"
- label $w.coords.x_lbl -text "X:"
- label $w.coords.y_lbl -text "Y:"
+ label $w.coords.z_lbl -text [G_msg "Z:"]
+ label $w.coords.x_lbl -text [G_msg "X:"]
+ label $w.coords.y_lbl -text [G_msg "Y:"]
entry $w.coords.z_ent -width 5 -relief sunken
entry $w.coords.x_ent -width 5 -relief sunken
entry $w.coords.y_ent -width 5 -relief sunken
@@ -1166,8 +1166,8 @@
pack $w.coords -side top -in $w.bottom -fill both
frame $w.commands
- button $w.commands.reset -text "Reset" -command "$w.zslide set 0; Nv_itemDrag $w.pos $Nv_(VOL_POS) 63 63; Nv_xyCallback $update_routine 126 126 63 63"
- button $w.commands.close -text "Close" -command "destroy $w"
+ button $w.commands.reset -text [G_msg "Reset"] -command "$w.zslide set 0; Nv_itemDrag $w.pos $Nv_(VOL_POS) 63 63; Nv_xyCallback $update_routine 126 126 63 63"
+ button $w.commands.close -text [G_msg "Close"] -command "destroy $w"
pack $w.commands.reset $w.commands.close \
-side left -fill both -padx 3 -pady 3 -expand yes
pack $w.commands -in $w.bottom -fill both
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vquery.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vquery.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/panel_vquery.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -48,13 +48,13 @@
# Initialize panel info
if [catch {set Nv_($BASE)}] {
set panel [St_create {window name size priority} \
- $BASE "Vector Query" 1 5]
+ $BASE [G_msg "Vector Query"] 1 5]
} else {
set panel $Nv_($BASE)
}
frame $BASE -relief flat -bd 0
- Nv_mkPanelname $BASE "Vector Query Panel"
+ Nv_mkPanelname $BASE [G_msg "Vector Query Panel"]
# set highlight defaults
set highlight(COLOR) 1
@@ -80,12 +80,12 @@
frame $query.row1
set Nv_(PICK) 0
checkbutton $query.row1.on -variable Nv_(PICK) \
- -text "query on/off" \
+ -text [G_msg "query on/off"] \
-command "pick_set Nv_(PICK) $Nv_(TOP).canvas"
- Button $query.row1.addremovemap -text "Choose map(s)" \
+ Button $query.row1.addremovemap -text [G_msg "Choose map(s)"] \
-command "pick_GUI_addremovemap" -bd 1 \
- -helptext "Select/unselect vector map(s) to query"
+ -helptext [G_msg "Select/unselect vector map(s) to query"]
pack $query.row1.on $query.row1.addremovemap -side left -padx 3
pack $query.row1 -side top -expand 1 -fill both -pady 3 -padx 3
@@ -95,13 +95,13 @@
-editable 1 \
-textvariable maxdist \
-width 5 -entrybg white \
- -helptext "Set threshold distance for selecting objects"]
+ -helptext [G_msg "Set threshold distance for selecting objects"]]
- label $query.row2.l -text "threshold dist" -fg black -font $nviztxtfont
+ label $query.row2.l -text [G_msg "threshold dist"] -fg black -font $nviztxtfont
rc_load_res "hyperlink.display.maxNumber" maxnumber 20
set Nv_(PICK_SHOW_HL) 0
- checkbutton $query.row2.hl -text "show hyperlink" \
+ checkbutton $query.row2.hl -text [G_msg "show hyperlink"] \
-variable Nv_(PICK_SHOW_HL) \
-command "pick_highlight_hyperlinks Nv_(PICK_SHOW_HL) $Nv_(TOP).canvas [expr $maxnumber - 1]"
@@ -110,38 +110,38 @@
# make frame and widgets for highlighting vector points
frame $ptsel.row1
- label $ptsel.row1.l -text "Highlight queried vector points with..."
+ label $ptsel.row1.l -text [G_msg "Highlight queried vector points with..."]
pack $ptsel.row1.l -side left -expand 0
pack $ptsel.row1 -side top -fill both -pady 3 -padx 3
frame $ptsel.row2
- checkbutton $ptsel.row2.color -text "color " -variable highlight(COLOR) \
+ checkbutton $ptsel.row2.color -text [G_msg "color"] -variable highlight(COLOR) \
-command {Nsite_highlight_set_default color $highlight(COLOR)}
Button $ptsel.row2.color_value -command "highlight_set_color $ptsel.row2.color_value" \
-bg $highlight(COLOR_VALUE) -width 0 -height 0 \
- -bd 1 -helptext "Choose color to indicate point queried"
+ -bd 1 -helptext [G_msg "Choose color to indicate point queried"]
- checkbutton $ptsel.row2.size -text "icon size X" -variable highlight(SIZE) \
+ checkbutton $ptsel.row2.size -text [G_msg "icon size X"] -variable highlight(SIZE) \
-command {Nsite_highlight_set_default size $highlight(SIZE)}
set ptsize [SpinBox $ptsel.row2.size_value \
-range {.5 5 .1} \
-textvariable highlight(SIZE_VALUE) \
-modifycmd {Nsite_highlight_set_default_value size $highlight(SIZE_VALUE)} \
- -width 4 -helptext "Choose size in multiples of default to indicate point queried"]
+ -width 4 -helptext [G_msg "Choose size in multiples of default to indicate point queried"]]
pack $ptsel.row2.color $ptsel.row2.color_value -side left -expand 0
pack $ptsel.row2.size_value $ptsel.row2.size -side right -expand 0
pack $ptsel.row2 -side top -expand 1 -fill both -pady 3 -padx 3
frame $ptsel.row3
- checkbutton $ptsel.row3.marker -text "specific icon " -variable highlight(MARKER) \
+ checkbutton $ptsel.row3.marker -text [G_msg "specific icon"] -variable highlight(MARKER) \
-command {Nsite_highlight_set_default marker $highlight(MARKER)}
highlight_set_marker_button $ptsel.row3.marker_value
pack $ptsel.row3.marker $ptsel.row3.marker_value -side left -expand 0
pack $ptsel.row3 -side top -expand 1 -fill both -pady 3 -padx 3
# make frame and widgets for panel bottom
- button $bottom.close -text Close \
+ button $bottom.close -text [G_msg "Close"] \
-command "Nv_closePanel $BASE" -bd 1
pack $bottom.close -side right
@@ -205,8 +205,8 @@
set rname [list]
foreach ele $r {lappend rname [$ele get_att map]}
- if {[addremove_list_create2 "Select vectors to query" \
- "vectors displayed" "vectors to query" lname rname l r]} {
+ if {[addremove_list_create2 [G_msg "Select vectors to query"] \
+ [G_msg "vectors displayed"] [G_msg "vectors to query"] lname rname l r]} {
# now r is modified and we have to set the differences from pick(MAP_LIST)
# add new pickable elements
@@ -407,7 +407,7 @@
toplevel $win
wm resizable $win true true
- wm title $win "Map: [$_map get_att map]"
+ wm title $win [format [G_msg "Map: %s"] [$_map get_att map]]
wm geometry $win "820x200+10+250"
wm minsize $win 150 100
@@ -423,7 +423,7 @@
set pick($sf.ROW) 0
- button $w.b -text "clear" -command "pick_clear_window $win $sf $_map" -bd 1
+ button $w.b -text [G_msg "clear"] -command "pick_clear_window $win $sf $_map" -bd 1
grid $w.b -row $pick($sf.ROW) -column 0 -columnspan 2 -sticky nsw
incr pick($sf.ROW)
@@ -493,7 +493,7 @@
}
proc pick_clear_window {w sf _map} {
- if {![confirm_ask "Clear Window?" "Yes" "No"]} {return}
+ if {![confirm_ask [G_msg "Clear Window?"] [G_msg "Yes"] [G_msg "No"]]} {return}
# catch {destroy $w}
pick_erase_records $sf
pick_delete_records $sf
@@ -609,13 +609,14 @@
proc highlight_set_marker_button {_w} {
global highlight
+ global Nv_
- set highlight(MARKERS_NAME) {"x" "sphere" "diamond" "cube" "box" "gyro" "aster"}
+ set highlight(MARKERS_NAME) $Nv_(siteshape_names)
set highlight(MARKERS_INDEX) {"1" "3" "5" "4" "2" "9" "8"}
set m $_w
menubutton $m -menu $m.m -relief raised -indicatoron 1 \
- -bd 1 -text "set icon" -width 10
+ -bd 1 -text [G_msg "set icon"] -width 10
#pack $m -side left -fill y -padx 3 -pady 3
menu $m.m -tearoff 0
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_file_tools
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_file_tools 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_file_tools 2011-01-05 18:22:18 UTC (rev 44889)
@@ -33,29 +33,29 @@
wm resizable . true false
# Titlebar
-label .title -text "Map Object File Sequencing" -relief raised
+label .title -text [G_msg "Map Object File Sequencing"] -relief raised
pack .title -side top -fill x -expand yes
frame .controls
# Create buttons for adding fields
frame .controls.fields -relief groove -bd 2
set rname .controls.fields
-label $rname.title -text "Fields:"
-button $rname.add -text "Add" -command "add_field"
-button $rname.delete -text "Delete" -command "delete_field"
-button $rname.state -text "State File: None" -command "change_state_file"
+label $rname.title -text [G_msg "Fields:"]
+button $rname.add -text [G_msg "Add"] -command "add_field"
+button $rname.delete -text [G_msg "Delete"] -command "delete_field"
+button $rname.state -text [G_msg "State File: None"] -command "change_state_file"
pack $rname.title $rname.add $rname.delete $rname.state \
-fill x -expand no -padx 2 -pady 2
# Create buttons for cancelling or accepting
frame .controls.options -relief groove -bd 2
set rname .controls.options
-label $rname.title -text "Options:"
-button $rname.cancel -text "Done" -command "done_script"
-button $rname.accept -text "Add To Script" -command "build_script"
-button $rname.build -text "Build Script..." -command "build_standalone_script"
-button $rname.load -text "Load Fields..." -command "load_fields"
-button $rname.save -text "Save Fields..." -command "save_fields"
+label $rname.title -text [G_msg "Options:"]
+button $rname.cancel -text [G_msg "Done"] -command "done_script"
+button $rname.accept -text [G_msg "Add To Script"] -command "build_script"
+button $rname.build -text [G_msg "Build Script..."] -command "build_standalone_script"
+button $rname.load -text [G_msg "Load Fields..."] -command "load_fields"
+button $rname.save -text [G_msg "Save Fields..."] -command "save_fields"
pack $rname.title $rname.cancel $rname.accept \
$rname.build $rname.load $rname.save\
@@ -72,7 +72,7 @@
# This frame created to display frame numbers next to the list of
# files in fields
frame .fields.display_area.frames -relief groove -bd 2 -width 2c -height 6c
-label .fields.display_area.frames.l1 -text "Frame"
+label .fields.display_area.frames.l1 -text [G_msg "Frame"]
label .fields.display_area.frames.l2 -text " "
listbox .fields.display_area.frames.frame_list \
-yscrollcommand ".fields.scrolly set" -height 9
@@ -108,9 +108,9 @@
# First make sure we're not overwriting something...
if {$FieldsChanged} then {
- if {[tk_dialog .verify "Verify" "Current fields have not been saved, really load new fields?" \
+ if {[tk_dialog .verify [G_msg "Verify"] [G_msg "Current fields have not been saved, really load new fields?"] \
@/usr/local/lib/tk/bitmaps/warning \
- 1 "Ok" "Cance'"] == 1} then {
+ 1 [G_msg "Ok"] [G_msg "Cancel"]] == 1} then {
# Cancel the exit
return
}
@@ -123,7 +123,7 @@
# Read in each of the file fields one at a time, and create
# Field_Data as appropriate
if {[catch {set file_hook [open $new_file r]} error_code] != 0} then {
- display_error "While opening file: $error_code"
+ display_error [format [G_msg "Error while opening file: %s"] $error_code]
return
}
@@ -132,14 +132,14 @@
# Read in state file
if {[catch {gets $file_hook state_file} error_code] != 0} then {
- display_error "While reading state_file: $error_code"
+ display_error [format [G_msg "While reading state_file: %s"] $error_code]
return
}
set_new_state_file $state_file
# Get number of fields
if {[catch {gets $file_hook num_fields} error_code] != 0} then {
- display_error "While reading number of fields: $error_code"
+ display_error [format [G_msg "While reading number of fields: %s"] $error_code]
return
}
@@ -148,13 +148,13 @@
for {set i 0} {$i < $num_fields} {incr i} {
# Input field type
if {[catch {gets $file_hook field_type} error_code] != 0} then {
- display_error "While reading field type: $error_code"
+ display_error [format [G_msg "While reading field type: %s"] $error_code]
return
}
# Input field attribute
if {[catch {gets $file_hook field_att} error_code] != 0} then {
- display_error "While reading field attribute: $error_code"
+ display_error [format [G_msg "While reading field attribute: %s"] $error_code]
return
}
@@ -539,8 +539,8 @@
# Field type frame
set rname .add_field.field_type
frame $rname
- label $rname.lbl -text "Field Type: "
- menubutton $rname.mb -text "Surface" -menu $rname.mb.m -relief raised
+ label $rname.lbl -text [G_msg "Field Type: "]
+ menubutton $rname.mb -text [G_msg "Surface"] -menu $rname.mb.m -relief raised
menu $rname.mb.m
foreach i {Surface Vector Site} {
$rname.mb.m add command -label "$i" -command "set_field_type $i"
@@ -551,8 +551,8 @@
# Field attribute frame
set rname .add_field.field_att
frame $rname
- label $rname.lbl -text "Field Attribute: "
- menubutton $rname.mb -text "Topography" -menu $rname.mb.m -relief raised
+ label $rname.lbl -text [G_msg "Field Attribute: "]
+ menubutton $rname.mb -text [G_msg "Topography"] -menu $rname.mb.m -relief raised
menu $rname.mb.m
foreach i {Topography Color Mask Transparency Shininess Emission} {
$rname.mb.m add command -label "$i" -command "set_field_att $i"
@@ -563,16 +563,16 @@
# Field source frame
set rname .add_field.source
frame $rname
- label $rname.lbl -text "Use Nviz Map: "
- menubutton $rname.mb -text "None" -menu $rname.mb.m -relief raised
+ label $rname.lbl -text [G_msg "Use Nviz Map: "]
+ menubutton $rname.mb -text [G_msg "None"] -menu $rname.mb.m -relief raised
menu $rname.mb.m
set_sources Surface
pack $rname.lbl -side left -anchor w
pack $rname.mb -side right -anchor e
# Accept and Cancel buttons
- button .add_field.accept -text "Accept" -command "create_new_field"
- button .add_field.cancel -text "Cancel" -command "destroy .add_field"
+ button .add_field.accept -text [G_msg "Accept"] -command "create_new_field"
+ button .add_field.cancel -text [G_msg "Cancel"] -command "destroy .add_field"
# Pack everything in
pack .add_field.field_type .add_field.field_att .add_field.source \
@@ -673,7 +673,7 @@
$rname.mb.m delete 0 last
if {[llength $source_list] == 0} then {
- $rname.mb.m add command -label "None" -command "set_source_file None 0"
+ $rname.mb.m add command -label [G_msg "None"] -command "set_source_file None 0"
set_source_file "None" 0
} else {
set j 0
@@ -850,7 +850,7 @@
set name None
}
- .controls.fields.state configure -text "State File: $name"
+ .controls.fields.state configure -text [format [G_msg "State File: %s"] $name]
}
###################################################
@@ -882,10 +882,10 @@
# Get a name for frames
set R .build_frame_name
toplevel $R
- label $R.l -text "Enter an image root name" -relief raised
+ label $R.l -text [G_msg "Enter an image root name"] -relief raised
entry $R.e -width 20 -relief sunken
- button $R.accept -text "accept" -command "set Build_Image_Name \[$R.e get\] ; destroy $R"
- button $R.cancel -text "cancel" -command "set Build_Image_Name -1 ; destroy $R"
+ button $R.accept -text [G_msg "Accept"] -command "set Build_Image_Name \[$R.e get\] ; destroy $R"
+ button $R.cancel -text [G_msg "Cancel"] -command "set Build_Image_Name -1 ; destroy $R"
pack $R.l $R.e $R.accept $R.cancel -padx 1 -pady 1 -fill x -expand yes
grab $R
tkwait window $R
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_get_line
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_get_line 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_get_line 2011-01-05 18:22:18 UTC (rev 44889)
@@ -12,11 +12,11 @@
# Create a simple label and entry widget
set done -1
-label .l -text "Add Script Line"
+label .l -text [G_msg "Add Script Line"]
entry .e -width 80 -relief sunken
frame .f
-button .f.bok -text "Ok" -command {set done 1}
-button .f.bcancel -text "Cancel" -command {set done 0}
+button .f.bok -text [G_msg "Ok"] -command {set done 1}
+button .f.bcancel -text [G_msg "Cancel"] -command {set done 0}
pack .f.bok .f.bcancel -side left -fill both -expand yes
pack .l .e .f -fill x
tkwait variable done
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_play
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_play 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_play 2011-01-05 18:22:18 UTC (rev 44889)
@@ -27,9 +27,9 @@
if {[file isfile $NvizPlayScript]} {
set new_file "$NvizPlayScript"
} else {
- tk_dialog .file_error "File Error" \
- "Script file $NvizPlayScript does not exist" \
- error 0 "Dismiss"
+ tk_dialog .file_error [G_msg "File Error"] \
+ [format [G_msg "Script file %s does not exist"] $NvizPlayScript] \
+ error 0 [G_msg "Dismiss"]
exit
}
} else {
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_tools
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_tools 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/script_tools 2011-01-05 18:22:18 UTC (rev 44889)
@@ -29,22 +29,22 @@
set floop_names [list]
# Tools for vanilla looping
-button .loop_start -text "Open Loop" -command open_loop -bg aquamarine
-button .loop_end -text "Close Loop" -command close_loop -bg aquamarine
+button .loop_start -text [G_msg "Open Loop"] -command open_loop -bg aquamarine
+button .loop_end -text [G_msg "Close Loop"] -command close_loop -bg aquamarine
pack .loop_start .loop_end -side top -fill both -expand 1
# Tools for file sequence looping
-button .floop_start -text "Open File Seq. Loop" -command fopen_loop -bg burlywood
-button .floop_end -text "Close File Seq. Loop" -command fclose_loop -bg burlywood
+button .floop_start -text [G_msg "Open File Seq. Loop"] -command fopen_loop -bg burlywood
+button .floop_end -text [G_msg "Close File Seq. Loop"] -command fclose_loop -bg burlywood
pack .floop_start .floop_end -side top -fill both -expand 1
# Tools for more general file sequence looping
-button .file_sequence_tools -text "File Sequence Tool" \
+button .file_sequence_tools -text [G_msg "File Sequence Tool"] \
-command fopen_tools -bg cornflowerblue
pack .file_sequence_tools -side top -fill both -expand 1
# Quit button
-button .quit -text "Close" -command "exit"
+button .quit -text [G_msg "Close"] -command "exit"
pack .quit -side top -fill both -expand 1
# File Sequence Tools open function
@@ -101,14 +101,14 @@
# Determine how many iterations the loop should go through
set loop_flag 0
toplevel .loop_data
- label .loop_data.start_val_l -text "Loop Start Value"
+ label .loop_data.start_val_l -text [G_msg "Loop Start Value"]
entry .loop_data.start_val -relief sunken
- label .loop_data.end_val_l -text "Loop End Value"
+ label .loop_data.end_val_l -text [G_msg "Loop End Value"]
entry .loop_data.end_val -relief sunken
- label .loop_data.incr_val_l -text "Loop Increment Value"
+ label .loop_data.incr_val_l -text [G_msg "Loop Increment Value"]
entry .loop_data.incr_val -relief sunken
- button .loop_data.ok -text "Accept" -command "set loop_flag 1"
- button .loop_data.cancel -text "Cancel" -command "set loop_flag -1"
+ button .loop_data.ok -text [G_msg "Accept"] -command "set loop_flag 1"
+ button .loop_data.cancel -text [G_msg "Cancel"] -command "set loop_flag -1"
pack .loop_data.start_val_l .loop_data.start_val \
.loop_data.end_val_l .loop_data.end_val \
.loop_data.incr_val_l .loop_data.incr_val \
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/site_attr.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/site_attr.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/site_attr.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -74,7 +74,7 @@
{{All files} * }
}
- set site_attr(MARKERS_NAME) {"histogram" "x" "sphere" "cube" "box" "diamond" "gyro" "aster"}
+ set site_attr(MARKERS_NAME) [list [G_msg "histogram"] {x} [G_msg "sphere"] [G_msg "cube"] [G_msg "box"] [G_msg "diamond"] [G_msg "gyro"] [G_msg "aster"]]
set site_attr(MARKERS_INDEX) {"10" "1" "3" "4" "2" "5" "9" "8"}
set site_attr(FIRST_ROW) 1
@@ -408,24 +408,24 @@
"size" {
set which "entries"
set apply_msg \
- "Fill 2 or more entry fields with \
+ [G_msg "Fill 2 or more entry fields with \
desired min and max values,\
then press \[Apply\]. \
Or press \[Auto\] to automatically \
- generate a range of symbol sizes."
+ generate a range of symbol sizes."]
}
"color" {
set which "colors"
set apply_msg \
- "Fill 2 or more entry fields with desired\
+ [G_msg "Fill 2 or more entry fields with desired\
colors, then press \[Apply\].\
Or press \[Auto\] to automatically\
- generate a color table."
+ generate a color table."]
}
default {
- puts "WARNING: No thematic mapping preferences set for $site_attr($_idx.ATTR)!"
+ puts [format [G_msg "WARNING: No thematic mapping preferences set for %s!"] $site_attr($_idx.ATTR)]
}
}
@@ -444,11 +444,11 @@
set site_attr($_idx.WIN_CMD) $w
# Attribute
- label $w.attr -text "Vary point $site_attr($_idx.ATTR)"
+ label $w.attr -text [format [G_msg "Vary point %s"] $site_attr($_idx.ATTR)]
pack $w.attr -pady 1 -padx 0 -fill x -side top
# Field
- label $w.field -text "GIS attribute: $site_attr($_idx.NAME)"
+ label $w.field -text [format [G_msg "GIS attribute: %s"] $site_attr($_idx.NAME)]
pack $w.field -padx 0 -fill x -side top
# Type
@@ -457,7 +457,7 @@
} else {
set type "numeric"
}
- label $w.type -text "Attribute type: $type"
+ label $w.type -text [format [G_msg "Attribute type: %s"] $type]
pack $w.type -padx 0 -fill x -side top
# Instructions
@@ -469,20 +469,20 @@
frame $w.buttons -borderwidth 0 -relief flat
# Apply
- Button $w.buttons.apply -text "Apply" -bd 1 -width 6 \
+ Button $w.buttons.apply -text [G_msg "Apply"] -bd 1 -width 6 \
-command "site_attr_set_$which $_idx" \
- -helptext "Apply current thematic preferences to point display"
+ -helptext [G_msg "Apply current thematic preferences to point display"]
# Auto
- Button $w.buttons.auto -text "Auto" -bd 1 -width 6\
+ Button $w.buttons.auto -text [G_msg "Auto"] -bd 1 -width 6\
-command "site_attr_set_auto_$which $_idx" \
- -helptext "Automatically generate a color \
- table distributed across range of attribute values"
+ -helptext [G_msg "Automatically generate a color \
+ table distributed across range of attribute values"]
# Clear
- Button $w.buttons.reset -text "Reset" -bd 1 -width 6\
+ Button $w.buttons.reset -text [G_msg "Reset"] -bd 1 -width 6\
-command "site_attr_clear_lut_win $_idx" \
- -helptext "Clear all thematic settings"
+ -helptext [G_msg "Clear all thematic settings"]
#pack $w.reset.set -side top -pady 5
pack $w.buttons.apply $w.buttons.auto $w.buttons.reset \
@@ -492,7 +492,7 @@
# Theme prefs management
set site_attr($_idx.EXTERNAL_LUT_PANEL) 0
frame $w.external_lut -borderwidth 0 -relief flat
- checkbutton $w.external_lut.set -text "Load/save theme preferences" \
+ checkbutton $w.external_lut.set -text [G_msg "Load/save theme preferences"] \
-variable site_attr($_idx.EXTERNAL_LUT_PANEL) -command "site_attr_external_lut $_idx $w.external_lut"
pack $w.external_lut.set -side top
pack $w.external_lut -padx 0 -fill x -side top
@@ -525,21 +525,21 @@
# External LUT manipulation
frame $w.lut_choice -borderwidth 0
frame $w.lut_choice.a -borderwidth 0
- label $w.lut_choice.a.title -text "Select thematic prefs to use"
+ label $w.lut_choice.a.title -text [G_msg "Select thematic prefs to use"]
pack $w.lut_choice.a.title -side top -pady 1
- radiobutton $w.lut_choice.a.local -relief flat -text "current prefs" \
+ radiobutton $w.lut_choice.a.local -relief flat -text [G_msg "current prefs"] \
-value 0 -anchor nw -variable site_attr($_idx.USE_EXTERNAL_VALUES) \
-command "site_attr_lut_local $_idx"
pack $w.lut_choice.a.local -fill x -expand 1 -side top
- radiobutton $w.lut_choice.a.external -relief flat -text "prefs. from file" \
+ radiobutton $w.lut_choice.a.external -relief flat -text [G_msg "prefs. from file"] \
-value 1 -anchor nw -variable site_attr($_idx.USE_EXTERNAL_VALUES)
bind $w.lut_choice.a.external <ButtonRelease> "site_attr_lut_external $_idx %X %Y"
pack $w.lut_choice.a.external -fill x -expand 1 -side top
label $w.lut_choice.a.external_lab -fg black -font $nviztxtfont \
- -text "(preserves current prefs.)"
+ -text [G_msg "(preserves current prefs.)"]
pack $w.lut_choice.a.external_lab -side top
pack $w.lut_choice.a -side top -pady 3 -fill x
@@ -550,12 +550,12 @@
set lut_label $site_attr($lut_id.NAME)
set lut_command "site_attr_lut_open_win $lut_id"
} else {
- set lut_label "no prefs loaded"
+ set lut_label [G_msg "no prefs loaded"]
set lut_command ""
}
frame $w.lut_choice.b -borderwidth 0
- label $w.lut_choice.b.ext_lab -text "View loaded thematic prefs"
+ label $w.lut_choice.b.ext_lab -text [G_msg "View loaded thematic prefs"]
pack $w.lut_choice.b.ext_lab -side top
set site_attr($_idx.EXTERNAL_LUT_BUTTON) \
@@ -567,19 +567,19 @@
frame $w.io -borderwidth 0
frame $w.io.import_lut -borderwidth 0
- label $w.io.import_lut.a -text "Load and save prefs."
+ label $w.io.import_lut.a -text [G_msg "Load and save prefs."]
pack $w.io.import_lut.a -side top
- Button $w.io.import_lut.b -text "Load prefs" -width 15 -bd 1 \
+ Button $w.io.import_lut.b -text [G_msg "Load prefs"] -width 15 -bd 1 \
-command "site_attr_lut_import $_idx" \
- -helptext "Replace current themes with prefs loaded from file"
+ -helptext [G_msg "Replace current themes with prefs loaded from file"]
pack $w.io.import_lut.b -side top
bind $w.io.import_lut.b <ButtonPress> "site_attr_pick_mouse_XY %X %Y"
pack $w.io.import_lut -pady 3 -padx 0 -side top -fill x
frame $w.io.export_lut -borderwidth 0
- Button $w.io.export_lut.b -text "Save prefs" -width 15 -bd 1 \
+ Button $w.io.export_lut.b -text [G_msg "Save prefs"] -width 15 -bd 1 \
-command "site_attr_lut_export $_idx" \
- -helptext "Copy current themes to prefs loaded from file"
+ -helptext [G_msg "Copy current themes to prefs loaded from file"]
pack $w.io.export_lut.b -side top
bind $w.io.export_lut.b <ButtonPress> "site_attr_pick_mouse_XY %X %Y"
pack $w.io.export_lut -pady 3 -padx 0 -side top -fill x
@@ -857,7 +857,7 @@
set len [llength $site_attr($_idx.YLIST)]
if {$len < 2} {
- tk_messageBox -icon warning -message "Too few values: at least 2!" -type ok -parent $site_attr($_idx.WIN_CMD)
+ tk_messageBox -icon warning -message [G_msg "Too few values: at least 2!"] -type ok -parent $site_attr($_idx.WIN_CMD)
} else {
site_attr_update_entries $_idx
}
@@ -912,7 +912,7 @@
global site_attr
if {[site_attr_read_gui_colors $_idx] < 2} {
- tk_messageBox -icon warning -message "Too few values: at least 2!" -type ok -parent $site_attr($_idx.WIN_CMD)
+ tk_messageBox -icon warning -message [G_msg "Too few values: at least 2!"] -type ok -parent $site_attr($_idx.WIN_CMD)
} else {
site_attr_update_colors $_idx
site_attr_update_gui_colors $_idx
@@ -1104,7 +1104,7 @@
switch [llength $site_attr(LUT_LIST)] {
0 {
- tk_messageBox -icon warning -message "No prefs file loaded" -type ok -parent $site_attr($_idx.WIN_CMD)
+ tk_messageBox -icon warning -message [G_msg "No prefs file loaded"] -type ok -parent $site_attr($_idx.WIN_CMD)
set site_attr($_idx.USE_EXTERNAL_VALUES) 0
}
1 {site_attr_lut_set_external $_idx [lindex $site_attr(LUT_LIST) 0]}
@@ -1135,7 +1135,7 @@
trace vdelete site_attr($site_attr($_idx.EXTERNAL_LUT)) w "site_attr_lut_update_external $_idx"
trace vdelete site_attr($site_attr($_idx.EXTERNAL_LUT)) u "site_attr_lut_local $_idx"
- catch {$site_attr($_idx.EXTERNAL_LUT_BUTTON) configure -text "No prefs" -command ""}
+ catch {$site_attr($_idx.EXTERNAL_LUT_BUTTON) configure -text [G_msg "No prefs"] -command ""}
trace vdelete site_attr($site_attr($_idx.EXTERNAL_LUT).NAME) w "site_attr_update_win $_idx"
}
@@ -1143,7 +1143,7 @@
global site_attr
if {$site_attr($_idx.TYPE) != $site_attr($_lut_id.TYPE)} {
- tk_messageBox -icon warning -message "Thematic prefs and attribute have different types" -type ok -parent $site_attr($_idx.WIN_CMD)
+ tk_messageBox -icon warning -message [G_msg "Thematic prefs and attribute have different types"] -type ok -parent $site_attr($_idx.WIN_CMD)
set site_attr($_idx.USE_EXTERNAL_VALUES) $site_attr($_idx.USING_EXTERNAL_VALUES)
return
}
@@ -1194,7 +1194,7 @@
global site_attr
switch [llength $site_attr(LUT_LIST)] {
- 0 {tk_messageBox -icon warning -message "No prefs file loaded" -type ok -parent $site_attr($_idx.WIN_CMD)}
+ 0 {tk_messageBox -icon warning -message [G_msg "No prefs file loaded"] -type ok -parent $site_attr($_idx.WIN_CMD)}
1 {site_attr_lut_import_attr $_idx [lindex $site_attr(LUT_LIST) 0]}
default {site_attr_lut_popup $_idx site_attr_lut_import_attr}
}
@@ -1204,7 +1204,7 @@
global site_attr
if {$site_attr($_idx.TYPE) != $site_attr($_lut_id.TYPE)} {
- tk_messageBox -icon warning -message "Thematic prefs and attributes have different types" -type ok -parent $site_attr($_idx.WIN_CMD)
+ tk_messageBox -icon warning -message [G_msg "Thematic prefs and attributes have different types"] -type ok -parent $site_attr($_idx.WIN_CMD)
return
}
@@ -1268,7 +1268,7 @@
catch {destroy $m}
menu $m -tearoff 0
- if {$_new != "no" } {$m add command -label "New" -command "$_command $_idx $_new"}
+ if {$_new != "no" } {$m add command -label [G_msg "New"] -command "$_command $_idx $_new"}
foreach lut_id $site_attr(LUT_LIST) {
$m add command -label "$site_attr($lut_id.NAME)" -command "$_command $_idx $lut_id"
@@ -1405,7 +1405,7 @@
set row_val "label \$w.l\$row -bg \$val -width 3 -borderwidth 1 -relief raised"
}
default {
- puts "WARNING: No attribute behaviour for $site_attr($_lut_id.ATTR)!"
+ puts [format [G_msg "WARNING: No attribute behaviour for %s!"] $site_attr($_lut_id.ATTR)]
return
}
}
@@ -1415,11 +1415,11 @@
catch {destroy $win}
toplevel $win
wm resizable $win true true
- wm title $win "Thematic prefs file $_lut_id"
+ wm title $win [format [G_msg "Thematic prefs file %s"] $_lut_id]
bind $win <Destroy> "site_attr_lut_destroy_win $_lut_id $win %W"
set w [frame $win.left]
- label $w.name -text "Name: $site_attr($_lut_id.NAME)" -pady 2
+ label $w.name -text [format [G_msg "Name: %s"] $site_attr($_lut_id.NAME)] -pady 2
pack $w.name -pady 1 -fill x -side top
if {$site_attr($_lut_id.TYPE) == "s"} {
@@ -1427,16 +1427,16 @@
} else {
set type "numeric"
}
- label $w.type -text "Type: $type" -pady 2
+ label $w.type -text [format [G_msg "Type: %s"] $type] -pady 2
pack $w.type -pady 1 -padx 0 -fill x -side top
frame $w.buttons
- Button $w.buttons.save -text "Save" -bd 1 -width 6 \
+ Button $w.buttons.save -text [G_msg "Save"] -bd 1 -width 6 \
-command "site_attr_lut_save $_lut_id" \
- -helptext "Save thematic prefs in file"
- Button $w.buttons.delete -text "Clear" -bd 1 -width 6 \
+ -helptext [G_msg "Save thematic prefs in file"]
+ Button $w.buttons.delete -text [G_msg "Clear"] -bd 1 -width 6 \
-command "site_attr_lut_destroy $_lut_id" \
- -helptext "Clear current thematic prefs"
+ -helptext [G_msg "Clear current thematic prefs"]
pack $w.buttons.save -side left -expand 0 -fill x
pack $w.buttons.delete -side right -expand 0 -fill x
@@ -1490,11 +1490,11 @@
set m $_win.lut_menu
catch {destroy $m}
- menubutton $m -menu $m.m -relief raised -indicatoron 1 -bd 1 -text "Load Thematic Prefs"
+ menubutton $m -menu $m.m -relief raised -indicatoron 1 -bd 1 -text [G_msg "Load Thematic Prefs"]
bind $m <Destroy> "site_attr_lut_menu_destroy %W"
menu $m.m -tearoff 0
- $m.m add command -label "Load file" -command "site_attr_lut_create_win \[site_attr_lut_load\]"
+ $m.m add command -label [G_msg "Load file"] -command "site_attr_lut_create_win \[site_attr_lut_load\]"
foreach lut_id $site_attr(LUT_LIST) {
site_attr_lut_menu_add $lut_id
@@ -1574,12 +1574,12 @@
proc site_attr_lut_save {_lut_id} {
global site_attr
- set filename [tk_getSaveFile -initialdir $site_attr(LUT_DIR) -initialfile $site_attr($_lut_id.NAME) -filetypes $site_attr(LUT_FILETYPES) -title "Save thematic prefs"]
+ set filename [tk_getSaveFile -initialdir $site_attr(LUT_DIR) -initialfile $site_attr($_lut_id.NAME) -filetypes $site_attr(LUT_FILETYPES) -title [G_msg "Save thematic prefs"]]
if {$filename != ""} {
if {[file exists $filename]} {
file delete -force -- $filename
- puts "Old LUT \"$filename\" deleted"
+ puts [format [G_msg "Old LUT \"%s\" deleted"] $filename]
}
# file is new
site_attr_lut_write $_lut_id [site_attr_lut_file_from_name $filename]
@@ -1604,7 +1604,7 @@
close $fileId
set site_attr($_lut_id.NAME) [site_attr_lut_name_from_file $_filename]
- puts "Thematic preferences file \"$name\" saved"
+ puts [format [G_msg "Thematic preferences file \"%s\" saved"] $name]
}
@@ -1613,18 +1613,18 @@
global site_attr
if {$filename == ""} {
- set filename [tk_getOpenFile -initialdir $site_attr(LUT_DIR) -filetypes $site_attr(LUT_FILETYPES) -title "Load thematic prefs"]
+ set filename [tk_getOpenFile -initialdir $site_attr(LUT_DIR) -filetypes $site_attr(LUT_FILETYPES) -title [G_msg "Load thematic prefs"]]
}
if {$filename == ""} {return}
if {![file exists $filename]} {
- puts "*** WARNING *** File $filename is unavailable"
+ puts [format [G_msg "*** WARNING *** File \"%s\" is unavailable"] $filename]
return ""
}
if {[site_attr_lut_read $filename] < 5} {
- puts "*** ERROR *** Some thematic pref component are missing in file \"$filename\""
+ puts [format [G_msg "*** ERROR *** Some thematic pref component are missing in file \"%s\""] $filename]
return ""
}
@@ -1697,7 +1697,7 @@
}
}
default {
- puts "WARNING: Unknown Tag \"$tag_name\" in file \"$_filename\""
+ puts [format [G_msg "WARNING: Unknown Tag \"%s\" in file \"%s\""] $tag_name, $_filename]
}
}
# foreach elt $tag_list {puts "*** $elt ***"}
@@ -1767,7 +1767,7 @@
"size" {set st_att [Nsite_attr_get_value "ST_ATT_SIZE"]}
"color" {set st_att [Nsite_attr_get_value "ST_ATT_COLOR"]}
"marker" {set st_att [Nsite_attr_get_value "ST_ATT_MARKER"]}
- default {puts "WARNING: Unknown attribute $_attr!"; return $ret_list}
+ default {puts [format [G_msg "WARNING: Unknown attribute %s!"] $_attr]; return $ret_list}
}
set max [Nsite_attr_get_value "GPT_MAX_ATTR"]
@@ -1788,14 +1788,14 @@
incr index
}
}
- if {$not_found} {puts "WARNING: field $_field NOT FOUND"; return}
+ if {$not_found} {puts [format [G_msg "WARNING: field %s NOT FOUND"] $_field]; return}
# verify if lut with this name is already loaded
set lut_id [site_attr_lut_id_from_name [site_attr_lut_name_from_file $_lut_name]]
if {$lut_id == "NO_LUT"} {
# if not, load it!
set lut_id [site_attr_lut_load [file join $site_attr(LUT_DIR) [site_attr_lut_file_from_name $_lut_name]]]
- if {$lut_id == ""} {puts "WARNING: lut file [site_attr_lut_file_from_name $_lut_name] NOT FOUND"; return}
+ if {$lut_id == ""} {puts [format [G_msg "WARNING: lut file %s NOT FOUND"] [site_attr_lut_file_from_name $_lut_name]]; return}
}
# FROM HERE ON EVERITHING SHOULD BE OK
@@ -1849,7 +1849,7 @@
"size" {set st_att [Nsite_attr_get_value "ST_ATT_SIZE"]}
"color" {set st_att [Nsite_attr_get_value "ST_ATT_COLOR"]}
"marker" {set st_att [Nsite_attr_get_value "ST_ATT_MARKER"]}
- default {puts "WARNING: Unknown attribute $_attr!"; return $ret_list}
+ default {puts [format [G_msg "WARNING: Unknown attribute %s!"] $_attr]; return $ret_list}
}
for {set nattr 0} {$nattr < $max} {incr nattr} {
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/widgets.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/widgets.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/widgets.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -67,10 +67,10 @@
set y2 [expr $y + 5]
if {[string compare $type puck] == 0} {
#Draw North Arrow
- $C create text [expr $width - 2] [expr $height/2] -text E -fill black
- $C create text 3 [expr $height/2] -text W -fill black -anchor w
- $C create text [expr $width/2] 2 -text N -fill black -anchor n
- $C create text [expr $width/2] $height -text S -fill black -anchor s
+ $C create text [expr $width - 2] [expr $height/2] -text [G_msg "E"] -fill black
+ $C create text 3 [expr $height/2] -text [G_msg "W"] -fill black -anchor w
+ $C create text [expr $width/2] 2 -text [G_msg "N"] -fill black -anchor n
+ $C create text [expr $width/2] $height -text [G_msg "S"] -fill black -anchor s
$C create line $x $y [expr $width/2] [expr $height/2] -tags line \
-fill gray70 -arrow last
$C create oval $x1 $y1 $x2 $y2 -width 1 -outline gray70 -fill LightGoldenrod \
@@ -593,7 +593,7 @@
set name [Nget_current $type]
if {[llength $list] == 0} {
- set name "None Loaded "
+ set name [G_msg "None Loaded"]
} else {
set n [lsearch $list $name]
set list [lreplace $list $n $n]
Modified: grass/branches/releasebranch_6_4/visualization/nviz/scripts/wirecolorPopup.tcl
===================================================================
--- grass/branches/releasebranch_6_4/visualization/nviz/scripts/wirecolorPopup.tcl 2011-01-05 18:19:45 UTC (rev 44888)
+++ grass/branches/releasebranch_6_4/visualization/nviz/scripts/wirecolorPopup.tcl 2011-01-05 18:22:18 UTC (rev 44889)
@@ -27,7 +27,7 @@
catch {destroy $w}
toplevel $w -class Dialog
- wm title $w "Select Wire Color"
+ wm title $w [G_msg "Select Wire Color"]
wm iconname $w "Color"
wm geometry $w 300x450
wm minsize $w 50 100
@@ -54,7 +54,7 @@
frame $w.top -relief raised -border 1
frame $w.bot -relief raised -border 1
- checkbutton $w.usemap -text "use surface color" -onvalue UseMap \
+ checkbutton $w.usemap -text [G_msg "use surface color"] -onvalue UseMap \
-offvalue 0 -variable CurrWireColor
frame $w.top.left
Nv_mkWireColorScale $w.top.left Red $r red $w.top.color
@@ -77,10 +77,10 @@
tkwait visibility $w
frame $w.bot.buttonframe
- button $w.bot.buttonframe.ok -text OK -width 6 \
+ button $w.bot.buttonframe.ok -text [G_msg "Ok"] -width 6 \
-command "destroy $w" -bd 1
button $w.bot.buttonframe.cancel -bd 1 -width 6\
- -text Cancel -command "set CurrWireColor $tmp; destroy $w"
+ -text [G_msg "Cancel"] -command "set CurrWireColor $tmp; destroy $w"
pack $w.bot.buttonframe.cancel -side right -expand 0
pack $w.bot.buttonframe.ok -side left -expand 0
pack $w.bot.buttonframe -side bottom -fill x \
More information about the grass-commit
mailing list