rwdlanguage 0.01
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.txt +475 -0
- data/bin/rwdlanguage +19 -0
- data/code/01rwdcore/01rwdcore.rb +29 -0
- data/code/01rwdcore/02helptexthashbegin.rb +16 -0
- data/code/01rwdcore/03helptexthash.rb +21 -0
- data/code/01rwdcore/jumplinkcommand.rb +36 -0
- data/code/01rwdcore/openhelpwindow.rb +38 -0
- data/code/01rwdcore/returntomain.rb +10 -0
- data/code/01rwdcore/rundocuments.rb +10 -0
- data/code/01rwdcore/runeditconfiguration.rb +10 -0
- data/code/01rwdcore/runhelpabout.rb +15 -0
- data/code/01rwdcore/runopentinkerdocument.rb +7 -0
- data/code/01rwdcore/runtab.rb +15 -0
- data/code/01rwdcore/rwdtinkerversion.rb +22 -0
- data/code/01rwdcore/rwdwindowreturn.rb +9 -0
- data/code/01rwdcore/selectiontab.rb +11 -0
- data/code/01rwdcore/setuphelpaboutoptions.rb +15 -0
- data/code/01rwdcore/setuptinkerdocuments.rb +7 -0
- data/code/01rwdcore/test_cases.rb +158 -0
- data/code/01rwdcore/test_harness.rb +20 -0
- data/code/01rwdcore/uploadreturns.rb +65 -0
- data/code/dd0viewphoto/dd0viewphoto.rb +5 -0
- data/code/superant.com.language/0uninstallapplet.rb +22 -0
- data/code/superant.com.language/googlelang.rb +25 -0
- data/code/superant.com.language/helptexthashload.rb +22 -0
- data/code/superant.com.language/loadconfigurationrecord.rb +22 -0
- data/code/superant.com.language/loadconfigurationvariables.rb +14 -0
- data/code/superant.com.language/openhelpwindow.rb +24 -0
- data/code/superant.com.language/rubySteak.rb +40 -0
- data/code/superant.com.language/runappletwindow.rb +12 -0
- data/code/superant.com.language/runrwdshellwindow.rb +12 -0
- data/code/superant.com.language/runrwdwordsbackwindow.rb +10 -0
- data/code/superant.com.language/rwdtinkerversion.rb +10 -0
- data/code/superant.com.language/saveconfigurationrecord.rb +20 -0
- data/code/superant.com.language/test_cases.rb +20 -0
- data/code/superant.com.rwdtinkerbackwindow/changelocale.rb +84 -0
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +169 -0
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +38 -0
- data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +20 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +55 -0
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +14 -0
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +37 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -0
- data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
- data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +40 -0
- data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +46 -0
- data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +52 -0
- data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
- data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +15 -0
- data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +13 -0
- data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/showlocaleoptions.rb +9 -0
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +23 -0
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +16 -0
- data/code/superant.com.thesaurus/clearhttpview3.rb +9 -0
- data/code/superant.com.thesaurus/listwordlookup.rb +37 -0
- data/code/superant.com.thesaurus/runappletwindow.rb +12 -0
- data/code/superant.com.words/dictlookup.rb +20 -0
- data/code/superant.com.words/runrwdwordsbackwindow.rb +10 -0
- data/code/superant.com.words/rwdtinkerversion.rb +10 -0
- data/code/zz0applicationend/zz0end.rb +5 -0
- data/configuration/rwdtinker.dist +15 -0
- data/configuration/rwdwlanguage.dist +21 -0
- data/configuration/tinkerwin2variables.dist +23 -0
- data/gui/00coreguibegin/applicationguitop.rwd +9 -0
- data/gui/frontwindow0/cc0openphoto.rwd +22 -0
- data/gui/frontwindowselections/00selectiontabbegin.rwd +11 -0
- data/gui/frontwindowselections/jumplinkcommands.rwd +15 -0
- data/gui/frontwindowselections/wwselectionend.rwd +3 -0
- data/gui/frontwindowtdocuments/00documentbegin.rwd +6 -0
- data/gui/frontwindowtdocuments/tinkerdocuments.rwd +14 -0
- data/gui/frontwindowtdocuments/zzdocumentend.rwd +8 -0
- data/gui/helpaboutbegin/zzzrwdlasttab.rwd +6 -0
- data/gui/helpaboutbegin/zzzzhelpscreenstart.rwd +3 -0
- data/gui/helpaboutbegin/zzzzzzhelpabouttab.rwd +15 -0
- data/gui/helpaboutzend/helpscreenend.rwd +3 -0
- data/gui/helpaboutzend/zhelpscreenstart2.rwd +3 -0
- data/gui/helpaboutzend/zzzzhelpabout2.rwd +15 -0
- data/gui/helpaboutzend/zzzzhelpscreen2end.rwd +3 -0
- data/gui/tinkerbackwindows/superant.com.language/1appname.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.language/22google.rwd +38 -0
- data/gui/tinkerbackwindows/superant.com.language/44germany.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.language/67viewconfiguration.rwd +27 -0
- data/gui/tinkerbackwindows/superant.com.language/77jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.language/z9end.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +41 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +30 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +29 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdlogfile.rwd +20 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80localechanger.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +31 -0
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.words/1appname.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.words/1dictionary.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.words/4thesaurus.rwd +36 -0
- data/gui/tinkerbackwindows/superant.com.words/77jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.words/z9end.rwd +6 -0
- data/gui/zzcoreguiend/yy9rwdend.rwd +4 -0
- data/init.rb +179 -0
- data/installed/rwdwlanguage.inf +24 -0
- data/installed/temp.rb +1 -0
- data/lang/en/rwdcore/en.po +197 -0
- data/lang/en/rwdlanguage/en.po +32 -0
- data/lang/es/rwdcore/es.po +184 -0
- data/lang/es/rwdlanguage/en.po +32 -0
- data/lang/fr/rwdcore/fr.po +169 -0
- data/lang/fr/rwdlanguage/en.po +32 -0
- data/lang/hi/rwdcore/hi.po +173 -0
- data/lang/hi/rwdlanguage/en.po +32 -0
- data/lang/ja/rwdcore/ja.po +171 -0
- data/lang/ja/rwdlanguage/en.po +32 -0
- data/lang/nl/rwdcore/nl.po +169 -0
- data/lang/nl/rwdlanguage/en.po +32 -0
- data/lib/dict.rb +438 -0
- data/lib/g_translate.rb +43 -0
- data/lib/g_translate/client.rb +84 -0
- data/lib/g_translate/translator.rb +57 -0
- data/lib/ger-eng.txt +111283 -0
- data/lib/oothesaurus.rb +76 -0
- data/lib/rconftool.rb +387 -0
- data/lib/rwd/browser.rb +123 -0
- data/lib/rwd/ftools.rb +174 -0
- data/lib/rwd/mime.rb +328 -0
- data/lib/rwd/net.rb +877 -0
- data/lib/rwd/ruby.rb +889 -0
- data/lib/rwd/rwd.rb +1425 -0
- data/lib/rwd/sgml.rb +236 -0
- data/lib/rwd/thread.rb +63 -0
- data/lib/rwd/tree.rb +371 -0
- data/lib/rwd/xml.rb +101 -0
- data/lib/rwdthemes/default.rwd +317 -0
- data/lib/rwdthemes/pda.rwd +72 -0
- data/lib/rwdthemes/windowslike.rwd +171 -0
- data/lib/rwdtinker/rwdcodedir.rb +56 -0
- data/lib/rwdtinker/rwdguidir.rb +57 -0
- data/lib/rwdtinker/rwdlangdir.rb +60 -0
- data/lib/rwdtinker/rwdtinkertools.rb +25 -0
- data/lib/zip/ioextras.rb +155 -0
- data/lib/zip/stdrubyext.rb +111 -0
- data/lib/zip/tempfile_bugfixed.rb +195 -0
- data/lib/zip/zip.rb +1847 -0
- data/lib/zip/zipfilesystem.rb +609 -0
- data/lib/zip/ziprequire.rb +90 -0
- data/rwd_files/HowTo_Language.txt +179 -0
- data/rwd_files/HowTo_Tinker.txt +515 -0
- data/rwd_files/HowTo_TinkerWin2.txt +202 -0
- data/rwd_files/Readme.txt +57 -0
- data/rwd_files/RubyWebDialogs.html +6 -0
- data/rwd_files/Tinkerhelptexthash.txt +84 -0
- data/rwd_files/favicon.ico +0 -0
- data/rwd_files/log/rwdtinker.log +726 -0
- data/rwd_files/rdoc-style.css +175 -0
- data/rwd_files/rwdapplications.html +76 -0
- data/rwd_files/rwdlanguagehelpfiles.txt +34 -0
- data/rwd_files/tinker.png +0 -0
- data/rwdconfig.dist +24 -0
- data/rwdlanguage.rb +1 -0
- data/tests/RubyGauge.rb +179 -0
- data/tests/checkdepends.sh +4 -0
- data/tests/cleancnf.sh +6 -0
- data/tests/makedist-rwdwlanguage.rb +56 -0
- data/tests/makedist.rb +66 -0
- data/tests/rdep.rb +354 -0
- data/tests/totranslate.lang +93 -0
- data/zips/rwdwcalc-0.63.zip +0 -0
- data/zips/rwdwfoldeditor-0.08.zip +0 -0
- data/zips/rwdwhypernote-0.16.zip +0 -0
- data/zips/rwdwlanguage-0.01.zip +0 -0
- data/zips/rwdwmovies-0.98.zip +0 -0
- data/zips/rwdwruby-1.08.zip +0 -0
- data/zips/temp.rb +1 -0
- data/zips/tinkerbellw-0.04.zip +0 -0
- data/zips/wrubyslippers-1.08.zip +0 -0
- metadata +246 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
# this to start the test harness
|
2
|
+
def rwdtest_harness
|
3
|
+
|
4
|
+
print "in test harness\n"
|
5
|
+
$testasserts = 0
|
6
|
+
$testerrorarray = [""]
|
7
|
+
$testfailures = 0
|
8
|
+
|
9
|
+
$testharnessarray.each { |x|
|
10
|
+
print "calling #{x}\n"
|
11
|
+
eval("#{x}")
|
12
|
+
|
13
|
+
}
|
14
|
+
$rwdtinkerlog.info "successes = #{$testasserts}"
|
15
|
+
$rwdtinkerlog.info "failures = #{$testfailures}"
|
16
|
+
$rwdtinkerlog.info "failed methods #{$testerrorarray}"
|
17
|
+
$rwdtinkerlog.info "tested methods #{$testharnessarray}"
|
18
|
+
|
19
|
+
end
|
20
|
+
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# return information to the author
|
3
|
+
|
4
|
+
def uploadreturnsfile
|
5
|
+
require 'net/ftp'
|
6
|
+
BasicSocket.do_not_reverse_lookup = true
|
7
|
+
@returnsftpdisplays = ""
|
8
|
+
randomnumber = rand(9999) + 1000
|
9
|
+
puts randomnumber.to_i
|
10
|
+
|
11
|
+
|
12
|
+
returns_ftpsite = "ftp.superant.com"
|
13
|
+
returns_ftplogin = "anonymous@superant.com"
|
14
|
+
returns_ftppassword = "anonymous@superant.com"
|
15
|
+
returns_ftpdirectory = "/incoming/returns/"
|
16
|
+
|
17
|
+
begin
|
18
|
+
platformdisplay = "Platform is " + RUBY_PLATFORM + "\n"
|
19
|
+
platformdisplay = platformdisplay + "Ruby Version " + VERSION + "\n"
|
20
|
+
platformdisplay = platformdisplay + "rwdtinker version " + RwdTinkerVersion + "\n"
|
21
|
+
platformdisplay = platformdisplay + "application name " + $rwdapplicationidentity + "\n"
|
22
|
+
platformdisplay = platformdisplay + "program directory " + $progdir + "\n"
|
23
|
+
platformdisplay = platformdisplay + "hostname " + Resolv.getname(Resolv.getaddress("localhost")) + "\n"
|
24
|
+
platformdisplay = platformdisplay + "Date " + Date.today().to_s + "\n"
|
25
|
+
if ! @a_emailupload.empty?
|
26
|
+
platformdisplay = platformdisplay + @a_emailupload + "\n"
|
27
|
+
end
|
28
|
+
if ! @a_emailupload.empty?
|
29
|
+
platformdisplay = platformdisplay + @a_commentupload + "\n"
|
30
|
+
end
|
31
|
+
updatefile = Date.today().to_s + Resolv.getname(Resolv.getaddress("localhost")) + randomnumber.to_s
|
32
|
+
|
33
|
+
tmpdir = ENV['TMP']
|
34
|
+
if tmpdir.to_s.empty?
|
35
|
+
tmpdir = "/tmp"
|
36
|
+
end
|
37
|
+
fileName = File.join( tmpdir, updatefile)
|
38
|
+
fd = File.open(fileName,"w")
|
39
|
+
fd.print(platformdisplay) # save the record info to the file
|
40
|
+
fd.close
|
41
|
+
ftp = Net::FTP::new(returns_ftpsite)
|
42
|
+
@returnsftpdisplay = "data uploaded" + "\n"
|
43
|
+
|
44
|
+
filedirname = File.join(tmpdir,updatefile)
|
45
|
+
|
46
|
+
ftp.debug_mode = false
|
47
|
+
ftp.login(returns_ftplogin, returns_ftppassword)
|
48
|
+
ftp.chdir(returns_ftpdirectory)
|
49
|
+
print "I'm in the directory ", ftp.pwd(), "\n"
|
50
|
+
|
51
|
+
puts filedirname
|
52
|
+
ftp.puttextfile(filedirname , updatefile)
|
53
|
+
@returnsftpdisplay = @returnsftpdisplay + platformdisplay
|
54
|
+
|
55
|
+
|
56
|
+
ftp.close
|
57
|
+
|
58
|
+
rescue
|
59
|
+
@returnsftpdisplay = "upload error"
|
60
|
+
if ftp
|
61
|
+
ftp.close
|
62
|
+
end
|
63
|
+
print "ftp error"
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# uninstall
|
2
|
+
|
3
|
+
def rwdwlanguage()
|
4
|
+
|
5
|
+
$tinkerdocumentsarray.delete_if {|x| x == "HowTo_Language.txt"}
|
6
|
+
$tinkerhelpaboutarray.delete_if {|x| x == "RwdLanguage"}
|
7
|
+
Helptext.delete_if {|key, value| key == :rwdlanguage_help }
|
8
|
+
Helptext.delete_if {|key, value| key == :rwdlanguage_configuration }
|
9
|
+
$rwdjumplink.delete_if {|x| x == "RwdLanguageWindow"}
|
10
|
+
$rwdjumplink.delete_if {|x| x == "RwdWordsMainWindow"}
|
11
|
+
$rwdjumplink.delete_if {|x| x == "RwdThesaurus"}
|
12
|
+
$rwdtinkerlog.debug "wlanguageuninstall: DeleteLanguageConf"
|
13
|
+
if DeleteLanguageConfig
|
14
|
+
|
15
|
+
fileName = File.join("configuration","rwdwlanguage.cnf")
|
16
|
+
File.delete(fileName)
|
17
|
+
|
18
|
+
|
19
|
+
end
|
20
|
+
return true
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
def rwdlanggoogle_lookup
|
3
|
+
|
4
|
+
require 'lib/g_translate'
|
5
|
+
@rwdlangspanish_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'es'
|
6
|
+
@rwdlangjapanese_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'ja'
|
7
|
+
|
8
|
+
|
9
|
+
@rwdlangnl_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'nl'
|
10
|
+
|
11
|
+
@rwdlangar_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'ar'
|
12
|
+
|
13
|
+
@rwdlangfr_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'fr'
|
14
|
+
|
15
|
+
@rwdlangit_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'it'
|
16
|
+
@rwdlangel_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'el'
|
17
|
+
@rwdlangru_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'ru'
|
18
|
+
@rwdlangzh_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'zh'
|
19
|
+
@rwdlangde_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'de'
|
20
|
+
@rwdlangpt_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'pt'
|
21
|
+
@rwdlanghe_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'he'
|
22
|
+
@rwdlanghi_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'hi'
|
23
|
+
@rwdlangko_result = GTranslate.translate @rwdlanguage_datain, :from => 'en' , :to => 'kp'
|
24
|
+
end
|
25
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# this code loads the help text
|
2
|
+
|
3
|
+
|
4
|
+
tmphelpfilename = "rwdlanguagehelpfiles.txt"
|
5
|
+
tmphelpdir = "rwd_files"
|
6
|
+
|
7
|
+
begin # exception trapped block
|
8
|
+
|
9
|
+
|
10
|
+
fileName = File.join(tmphelpdir ,tmphelpfilename )
|
11
|
+
|
12
|
+
|
13
|
+
fd = File.open(fileName,"r")
|
14
|
+
tmphelptext = fd.read
|
15
|
+
fd.close
|
16
|
+
eval tmphelptext
|
17
|
+
|
18
|
+
rescue SystemCallError, StandardError
|
19
|
+
$rwdtinkerlog.error "foldeditor help file load: system call error: "
|
20
|
+
end # exception rescue
|
21
|
+
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# this method puts the configuration rexord on the screen
|
2
|
+
def loadrwdelizaconfiguration
|
3
|
+
|
4
|
+
require 'fileutils'
|
5
|
+
|
6
|
+
@a_languageconfigurationfilename = "rwdwlanguage.cnf"
|
7
|
+
|
8
|
+
|
9
|
+
begin # exception trapped block
|
10
|
+
|
11
|
+
Dir.chdir($progdir)
|
12
|
+
fileName = File.join(ConfigurationDir, @a_languageconfigurationfilename )
|
13
|
+
|
14
|
+
|
15
|
+
fd = File.open(fileName,"r")
|
16
|
+
@a_languageconfigurationfile= fd.read
|
17
|
+
fd.close
|
18
|
+
rescue SystemCallError, StandardError
|
19
|
+
$stderr.print "system call error: " + $!
|
20
|
+
end # exception rescue
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# this method loads the on screen variables into the running class
|
2
|
+
def loadrwdelizaconfigurationvariables
|
3
|
+
|
4
|
+
tmpfilename = "rwdwlanguage.cnf"
|
5
|
+
configfiletoload = File.join(ConfigurationDir, tmpfilename )
|
6
|
+
begin
|
7
|
+
load configfiletoload
|
8
|
+
|
9
|
+
|
10
|
+
rescue
|
11
|
+
|
12
|
+
$stderr.puts "loading error"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# this code is to call the help window
|
2
|
+
def runhelpwindowrwdlanguage
|
3
|
+
|
4
|
+
$help_topic = "rwdlanguage_generalhelp"
|
5
|
+
$helptopicsarray = $helptopicsarray << "rwdlanguage_generalhelp"
|
6
|
+
|
7
|
+
helpsearchterm = @rwd_tab + "_help"
|
8
|
+
|
9
|
+
|
10
|
+
if Helptext.has_key? helpsearchterm.intern
|
11
|
+
$help_topic = helpsearchterm
|
12
|
+
if ! $helptopicsarray.include?( helpsearchterm)
|
13
|
+
$helptopicsarray << helpsearchterm
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
if @rwd_window != "rwdtinkerhelpwindow"
|
18
|
+
$previouswindow = @rwd_window
|
19
|
+
$previoustab = @rwd_tab
|
20
|
+
end
|
21
|
+
runhelpwindow
|
22
|
+
end
|
23
|
+
|
24
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
# an implementation of the Steak translation dictionary in Ruby
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
# @foundGermanValue = String.new("Deutsch <-> Englisch")
|
7
|
+
|
8
|
+
|
9
|
+
def findByGermanEntry(searchEntry,langfile)
|
10
|
+
|
11
|
+
tmpsearchEntry = String.new(searchEntry)
|
12
|
+
foundGermanValue = Array.new
|
13
|
+
foundGermanValue << "DE <-> EN"
|
14
|
+
foundGermanValue << "\n"
|
15
|
+
langfile.each_line{
|
16
|
+
|line|
|
17
|
+
if line.include?(tmpsearchEntry) then
|
18
|
+
foundGermanValue << line
|
19
|
+
end
|
20
|
+
}
|
21
|
+
return foundGermanValue
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
def germanlookup
|
27
|
+
|
28
|
+
aDictionaryFile = File.new("lib/ger-eng.txt")
|
29
|
+
|
30
|
+
@german_display = findByGermanEntry(@a_germaninput,aDictionaryFile)
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
# -------------------------- DONE ------------------------
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Application Rwdtinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# This application is a contact book
|
3
|
+
# For more information about see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# call the window
|
6
|
+
def runrwdthesaurus
|
7
|
+
|
8
|
+
@rwd_window = "rwdwordsbackwindow"
|
9
|
+
@rwd_tab="superantcomthesaurus"
|
10
|
+
|
11
|
+
end
|
12
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Application Rwdtinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# This application is a contact book
|
3
|
+
# For more information about see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# call the window
|
6
|
+
def runrwdlanguagewindow
|
7
|
+
|
8
|
+
@rwd_window = "rwdlanguagewindow"
|
9
|
+
@rwd_tab="googlewindow"
|
10
|
+
|
11
|
+
end
|
12
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Application RwdAddresses orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# This application is a contact book
|
3
|
+
# For more information about see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# call the window
|
6
|
+
def runrwdwordsbackwindow
|
7
|
+
@rwd_window = "rwdwordsbackwindow"
|
8
|
+
@rwd_tab = "unixfortunes"
|
9
|
+
end
|
10
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
+
# This application is a framework for writing programs from RubyWebDialogs
|
3
|
+
# For information see http://www.rubyforge.net/projects/rwdapplications
|
4
|
+
|
5
|
+
# return the version constant defined in the config file
|
6
|
+
def rwdlanguagehelpaboutsetup
|
7
|
+
return ["RwdLanguage","(c) 2005-2008 Steven Gibson ","Version #{RwdLanguageVersion}"]
|
8
|
+
end
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# this method adds a new address record
|
2
|
+
def saverwdelizaconfiguration
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
|
6
|
+
newname = "rwdwlanguage.cnf" # grab the filename to create
|
7
|
+
newdata = @a_languageconfigurationfile
|
8
|
+
|
9
|
+
|
10
|
+
begin # exception trapped block
|
11
|
+
fileName = File.join( ConfigurationDir, newname )
|
12
|
+
fd = File.open(fileName,"w")
|
13
|
+
fd.print(newdata) # save the record info to the file
|
14
|
+
fd.close
|
15
|
+
@newconfigurationresult=newdata # show the record info in the browser
|
16
|
+
rescue SystemCallError, StandardError
|
17
|
+
$stderr.print "system call error: " + $!
|
18
|
+
end # exception rescue
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# this is the test harness
|
2
|
+
def rwdlanguage_all_tests
|
3
|
+
|
4
|
+
$rwdtinkerlog.info "in rwdlanguage all tests"
|
5
|
+
test_runrwdlanguagewindow
|
6
|
+
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_runrwdlanguagewindow
|
10
|
+
|
11
|
+
|
12
|
+
rwd_jump( "dictlookup")
|
13
|
+
if @rwd_tab == "dictlookup"
|
14
|
+
$testasserts += 1
|
15
|
+
else
|
16
|
+
$testfailures += 1
|
17
|
+
$testerrorarray << "dictlookup"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
@@ -0,0 +1,84 @@
|
|
1
|
+
|
2
|
+
#***********************************************************************
|
3
|
+
#* Rwd/Tinker -- A Ruby program for the RudyWebDialog.
|
4
|
+
#* Copyright (c) 2004, 2005 by Steven Gibson. All Rights Reserved.
|
5
|
+
#*
|
6
|
+
#* This library is free software; you can redistribute it and/or
|
7
|
+
#* modify it under the terms of the GNU General Public
|
8
|
+
#* License as published by the Free Software Foundation; either
|
9
|
+
#* .
|
10
|
+
#*
|
11
|
+
#* These files are distributed in the hope that they will be useful,
|
12
|
+
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
#* General Public License for more details.
|
15
|
+
#*
|
16
|
+
#* You should have received a copy of the GNU General Public
|
17
|
+
#* License along with these files; if not, write to the Free Software
|
18
|
+
#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
|
+
#*
|
20
|
+
#* For further information please contact the author by e-mail
|
21
|
+
#* at "smalllinux@gmail.com".
|
22
|
+
#***********************************************************************/
|
23
|
+
|
24
|
+
def runlocalechangercommand
|
25
|
+
|
26
|
+
$rwdtinkerlog.info "preparing to restart gui"
|
27
|
+
|
28
|
+
$lang = @a_localechooseinput # pick the language of choice
|
29
|
+
|
30
|
+
tempdoc = " "
|
31
|
+
|
32
|
+
Dir.chdir($progdir) # change back to top program directory
|
33
|
+
|
34
|
+
|
35
|
+
# build the English Language hash file from the parts
|
36
|
+
|
37
|
+
|
38
|
+
require 'lib/rwdtinker/rwdlangdir'
|
39
|
+
|
40
|
+
tempdoc = " "
|
41
|
+
#go get all the po language file files in english
|
42
|
+
tempdoc = RwdtinkerTools.findlanguagefiles(LangDir,"en")
|
43
|
+
|
44
|
+
#writes the contents of doc into the languagehashvariable
|
45
|
+
languagehashvariable = tempdoc
|
46
|
+
|
47
|
+
# END of en Lang building
|
48
|
+
tempdoc = " "
|
49
|
+
Dir.chdir($progdir) # change back to top program directory
|
50
|
+
|
51
|
+
# build the local Language hash file from the parts
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
# Go get all the po files for the language of choice
|
56
|
+
tempdoc = RwdtinkerTools.findlanguagefiles(LangDir,$lang)
|
57
|
+
# the contents of doc into the variable
|
58
|
+
languagehashvariable = languagehashvariable + tempdoc
|
59
|
+
|
60
|
+
Dir.chdir($progdir) # change back to top program directory
|
61
|
+
|
62
|
+
# lets read those po files, first english then the chosen language
|
63
|
+
temp = eval( languagehashvariable )
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
# build the actual GUI from the gui parts
|
69
|
+
require 'lib/rwdtinker/rwdguidir'
|
70
|
+
|
71
|
+
tempdoc = RwdtinkerTools.findguifiles(GuiDir)
|
72
|
+
|
73
|
+
|
74
|
+
# gui variable is done
|
75
|
+
guiRWD = ""
|
76
|
+
$rwd_gui_tinker = tempdoc
|
77
|
+
|
78
|
+
$rwdtinkerlog.info "restarting gui now"
|
79
|
+
|
80
|
+
RWDWindow.new($rwd_gui_tinker, @rwd_window).render("DEFAULT")
|
81
|
+
|
82
|
+
end
|
83
|
+
|
84
|
+
|