rwdtinker 1.54 → 1.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,11 +2,8 @@
2
2
  ConfigurationDir = "configuration" # for use in program - init.rb has this value without using this constant
3
3
  CodeName = "rwdtinker"
4
4
  CodeNameFile = CodeName + ".rb"
5
- LangNameFile = "rwdlanguage.rb"
6
5
  RWDFile = "rwdtinker.rwd"
7
6
  LangDir = "lang"
8
- TempLangHashFile = LangDir + "/" + "templangfile.rb"
9
- LocalLangHashFile = LangDir + "/" + "xlocallangfile.rb"
10
7
  CodeDir = "code"
11
8
  GuiDir = "gui"
12
9
  $help_topic = "general_help"
@@ -1,2 +1,2 @@
1
1
 
2
- RwdTinkerVersion = "1.54"
2
+ RwdTinkerVersion = "1.55"
data/init.rb CHANGED
@@ -73,6 +73,8 @@ $progdir = File::expand_path( File.dirname(__FILE__))
73
73
  Dir.chdir($progdir) # change back to top program directory
74
74
 
75
75
  # build the English Language hash file from the parts
76
+ languagehashvariable = 'Message = Hash.new { |hh, kk| hh[kk] = "ERROR: Message not found: #{kk.inspect}."; hh[kk] }
77
+ langmessage = {' + "\n"
76
78
  startlangdir = File.join(LangDir,"en")
77
79
  #get a list of the files and subdirectories on the starting directory only
78
80
  alanghash = Array.new(Dir[startlangdir].entries.sort)
@@ -100,10 +102,11 @@ $progdir = File::expand_path( File.dirname(__FILE__))
100
102
  end
101
103
  end
102
104
 
103
- fileLangHash=File.open(TempLangHashFile,"w") #deletes and opens a the file in fileName
104
- fileLangHash.write($tempdoc) #writes the contents of doc into the file
105
- fileLangHash.close
106
- # END of Lang building
105
+
106
+ #writes the contents of doc into the languagehashvariable
107
+ languagehashvariable = languagehashvariable + $tempdoc + "} ; langmessage.each { |kk, vv| Message[kk] = vv }"
108
+
109
+ # END of en Lang building
107
110
  $tempdoc = " "
108
111
  Dir.chdir($progdir) # change back to top program directory
109
112
 
@@ -135,31 +138,16 @@ $progdir = File::expand_path( File.dirname(__FILE__))
135
138
  end
136
139
  end
137
140
 
138
- filelocalLangHash=File.open(LocalLangHashFile,"w") #deletes and opens a the file in fileName
139
- filelocalLangHash.write($tempdoc) #writes the contents of doc into the file
140
- filelocalLangHash.close
141
+
142
+ #writes the contents of doc into the variable
143
+ languagehashvariable = languagehashvariable + " ; Message.update(" + $tempdoc + ' :rwdtinker => "Rwdtinker" ) '
144
+
141
145
 
142
146
  $tempdoc = " "
143
147
 
144
148
  Dir.chdir($progdir) # change back to top program directory
145
-
146
- # build the language hash constant object from the lang parts
147
- #get a list of the files in lang directory only
148
- alangfile = Dir.new(LangDir).entries.sort.reverse.delete_if { |x| ! (x =~ /rb$/) }
149
- alangfile.length.times{
150
- fileName = alangfile.pop
151
- Dir.chdir($progdir)
152
- Dir.chdir(LangDir)
153
- fileLangA=File.open("#{fileName}","r") #opens the file thats in fileName as read only
154
- $tempdoc += fileLangA.read #reads the file into the doc string
155
- fileLangA.close
156
- }
157
-
158
- Dir.chdir($progdir)
159
- fileLangB=File.open(LangNameFile,"w") #deletes and opens a the file in fileName
160
- fileLangB.write($tempdoc) #writes the contents of doc into the file
161
- fileLangB.close
162
- load LangNameFile # load the file
149
+
150
+ temp = eval( languagehashvariable )
163
151
 
164
152
  $tempdoc = " "
165
153
 
@@ -227,6 +227,9 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
227
227
  Thanks, Steven Gibson
228
228
 
229
229
  == Changelog
230
+ version 1.55
231
+ refactored language files to load without intermediate files
232
+
230
233
  version 1.54
231
234
  refactored rwdtinker applet installation tab - remote gem and local installs share menu buttons
232
235
  corrected some program logic errors in remote control code including close socket
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.4
3
3
  specification_version: 1
4
4
  name: rwdtinker
5
5
  version: !ruby/object:Gem::Version
6
- version: "1.54"
7
- date: 2005-02-13
6
+ version: "1.55"
7
+ date: 2005-02-27
8
8
  summary: rwdtinker application is a framework to program for RubyWebDialogs.
9
9
  require_paths:
10
10
  - "."
@@ -80,13 +80,6 @@ files:
80
80
  - extras/zip/zip.rb
81
81
  - extras/zip/zipfilesystem.rb
82
82
  - extras/zip/ziprequire.rb
83
- - lang/alanguagehashbegin.rb
84
- - lang/languagehash.rb
85
- - lang/templangfile.rb
86
- - lang/vlanguagehashend.rb
87
- - lang/wlocallangstart.rb
88
- - lang/xlocallangfile.rb
89
- - lang/zlocallangend.rb
90
83
  - lang/en/rwdcore/languagefile.rb
91
84
  - lang/es/rwdcore/languagefile-es.rb
92
85
  - lang/jp/rwdcore/languagefile.rb
@@ -1,4 +0,0 @@
1
-
2
-
3
- Message = Hash.new { |hh, kk| hh[kk] = "ERROR: Identificador de mensaje desconocido: #{kk.inspect}."; hh[kk] }
4
- langmessage = {
data/lang/languagehash.rb DELETED
@@ -1,4 +0,0 @@
1
- # The encoding for the webpages. This should match the encoding used
2
- # to create these messages.
3
-
4
-
data/lang/templangfile.rb DELETED
@@ -1,16 +0,0 @@
1
- # English Language files for RwdTinker core
2
-
3
-
4
- :applet_installed => "applet installed!.",
5
- :clickfor_version => '"click for version"',
6
- :documents => '"Documents"',
7
- :help => '"Help"',
8
- :module_unknown => "Module unknown",
9
- :next => '"Next"',
10
- :rwdtinker_window_2 => "RwdTinker Window 2",
11
- :rwdtinker => "RwdTinker",
12
- :rwdtinker_help_window => '"RwdTinker Help Window"',
13
- :rwdtinker_back_window => '"RwdTinker Back Window"',
14
- :rwdtinker_help => '"RwdTinker Help"',
15
- :tinker_logo => "Tinker Logo",
16
- :selection_panel => '"Selection Panel"',
@@ -1,6 +0,0 @@
1
-
2
- }
3
- langmessage.each { |kk, vv| Message[kk] = vv }
4
-
5
-
6
-
@@ -1,5 +0,0 @@
1
-
2
- Message.update(
3
-
4
-
5
-
@@ -1,16 +0,0 @@
1
- # English Language files for RwdTinker core
2
-
3
-
4
- :applet_installed => "applet installed!.",
5
- :clickfor_version => '"click for version"',
6
- :documents => '"Documents"',
7
- :help => '"Help"',
8
- :module_unknown => "Module unknown",
9
- :next => '"Next"',
10
- :rwdtinker_window_2 => "RwdTinker Window 2",
11
- :rwdtinker => "RwdTinker",
12
- :rwdtinker_help_window => '"RwdTinker Help Window"',
13
- :rwdtinker_back_window => '"RwdTinker Back Window"',
14
- :rwdtinker_help => '"RwdTinker Help"',
15
- :tinker_logo => "Tinker Logo",
16
- :selection_panel => '"Selection Panel"',
@@ -1,2 +0,0 @@
1
- :rwdtinker => "RwdTinker"
2
- )