summaryrefslogtreecommitdiff
path: root/ext/tk/sample/demos-jp/knightstour.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/sample/demos-jp/knightstour.rb')
-rw-r--r--ext/tk/sample/demos-jp/knightstour.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/ext/tk/sample/demos-jp/knightstour.rb b/ext/tk/sample/demos-jp/knightstour.rb
index ae0f13076e..835a24c392 100644
--- a/ext/tk/sample/demos-jp/knightstour.rb
+++ b/ext/tk/sample/demos-jp/knightstour.rb
@@ -1,4 +1,4 @@
-# -*- coding: euc-jp -*-
+# -*- coding: utf-8 -*-
#
# Based on the widget demo of Tcl/Tk8.5.2
# The following is the original copyright text.
@@ -94,13 +94,13 @@ class Knights_Tour
@start_btn.state :normal
if @visited.length == 64
if @initial == square
- @log.insert :end, 'ͷ(closed tour)'
+ @log.insert :end, '周遊(closed tour)成功!'
else
- @log.insert :end, "\n", {}
+ @log.insert :end, "成功\n", {}
Tk.after(@delay.numeric * 2){tour(rand(64))} if @continuous.bool
end
else
- @log.insert :end, "ԡ\n", {}
+ @log.insert :end, "失敗!\n", {}
end
end
end
@@ -158,10 +158,10 @@ class Knights_Tour
sep = Ttk::Separator.new(frame)
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
TkGrid('x',
- Ttk::Button.new(frame, :text=>'ɻ',
+ Ttk::Button.new(frame, :text=>'コード参照',
:image=>$image['view'], :compound=>:left,
:command=>proc{showCode 'knightstour'}),
- Ttk::Button.new(frame, :text=>'Ĥ',
+ Ttk::Button.new(frame, :text=>'閉じる',
:image=>$image['delete'], :compound=>:left,
:command=>proc{
$knightstour.destroy
@@ -187,14 +187,14 @@ class Knights_Tour
@continuous = TkVariable.new(false)
tool_f = Ttk::Frame.new($knightstour)
- label = Ttk::Label.new(tool_f, :text=>'¹®')
+ label = Ttk::Label.new(tool_f, :text=>'実行速度')
scale = Ttk::Scale.new(tool_f, :from=>8, :to=>2000, :variable=>@delay,
:command=>proc{|n| set_delay(n)})
- check = Ttk::Checkbutton.new(tool_f, :text=>'ȿ',
+ check = Ttk::Checkbutton.new(tool_f, :text=>'反復',
:variable=>@continuous)
- @start_btn = Ttk::Button.new(tool_f, :text=>'',
+ @start_btn = Ttk::Button.new(tool_f, :text=>'開始',
:command=>proc{tour()})
- @exit_btn = Ttk::Button.new(tool_f, :text=>'λ',
+ @exit_btn = Ttk::Button.new(tool_f, :text=>'終了',
:command=>proc{_exit()})
7.downto(0){|row|