vizi_translator 0.1.0 → 0.2.0
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.
- data/README.rdoc +54 -0
- data/Rakefile +14 -15
- data/build_gem1.bat +0 -0
- data/build_gem2.bat +0 -0
- data/build_gem3.bat +0 -0
- data/build_gem4.bat +0 -0
- data/geany_run_script.bat +0 -0
- data/lib/vizi_translator.rb +1 -1
- data/log/system.log +58 -1
- data/testit.rb +4 -3
- data/vizi_translator-0.1.0.gem +0 -0
- data/vizi_translator.gemspec +1 -1
- metadata +102 -80
- data/lib/vizi/vizi_translator +0 -11
data/README.rdoc
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
= ViziTranslator
|
2
|
+
|
3
|
+
== Introduction
|
4
|
+
|
5
|
+
This gem module provides a classes to support the language translation of text files or text strings.
|
6
|
+
The Frengly on-line service requires registration and prvoides access with a username and password.
|
7
|
+
The gem module uses the NET::HTTP library to access the Frengly service.
|
8
|
+
Find out more about the translation service at www.frengly.com.
|
9
|
+
|
10
|
+
== Installation
|
11
|
+
|
12
|
+
Just run:
|
13
|
+
|
14
|
+
gem install vizi_translator
|
15
|
+
|
16
|
+
This sample application will read a text file for translation.
|
17
|
+
|
18
|
+
The sample text file is a index markdown file written in English.
|
19
|
+
The English markdown file provides content for Vizitrax's home page.
|
20
|
+
The translated file can be used to replace the English content with content for another language.
|
21
|
+
|
22
|
+
== Usage
|
23
|
+
|
24
|
+
require 'vizi_translator'
|
25
|
+
|
26
|
+
# Set username and password. Username must be registered at Frengly
|
27
|
+
username = "akivi"
|
28
|
+
password = "welcome123"
|
29
|
+
|
30
|
+
# Set target language for translation
|
31
|
+
targetlanguage = "fr"
|
32
|
+
|
33
|
+
begin
|
34
|
+
# Open test file for translation
|
35
|
+
@test = File.read(Dir.pwd+'./data/index.md')
|
36
|
+
|
37
|
+
# Initiate Translator class
|
38
|
+
translator = Vizi::Translator.new
|
39
|
+
# Get array with available language codes
|
40
|
+
@langcodes = translator.getcodes
|
41
|
+
# Get hashed list of languages and language codes
|
42
|
+
@langlist = translator.getlist
|
43
|
+
|
44
|
+
# Call method to do the translation
|
45
|
+
@testnew = translator.gettext(username, password, @test, targetlanguage)
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
== License
|
51
|
+
|
52
|
+
This code is made available under the MIT license.
|
53
|
+
|
54
|
+
All users of this code should read and follow the acceptable use policies for the Frengly translation service.
|
data/Rakefile
CHANGED
@@ -4,20 +4,19 @@ require 'rake/rdoctask'
|
|
4
4
|
require 'rake/testtask'
|
5
5
|
|
6
6
|
spec = Gem::Specification.new do |s|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
s.files = %w(README.rdoc Rakefile) + Dir.glob("lib/**/*")
|
7
|
+
s.name = 'vizi_translator'
|
8
|
+
s.version = '0.1.0'
|
9
|
+
s.summary = "Language translator that provides a wrapper to the Frengly on-line service"
|
10
|
+
s.description = "This gem module provides a classes to support the language translation of text files or text strings.
|
11
|
+
The Frengly on-line service requires registration and prvoides access with a username and password.
|
12
|
+
The gem module uses the NET::HTTP library to access the Frengly service"
|
13
|
+
s.files = Dir.glob("**/**/**")
|
14
|
+
s.test_files = Dir.glob("test/*_test.rb")
|
15
|
+
s.author = "Al Kivi"
|
16
|
+
s.homepage = "http://www.vizitrax.com"
|
17
|
+
s.email = "al.kivi@vizitrax.com"
|
18
|
+
s.has_rdoc = true
|
19
|
+
s.required_ruby_version = '>= 1.8.7'
|
21
20
|
end
|
22
21
|
|
23
22
|
Rake::GemPackageTask.new(spec) do |pkg|
|
@@ -26,7 +25,7 @@ end
|
|
26
25
|
|
27
26
|
Rake::RDocTask.new(:rdoc) do |rdoc|
|
28
27
|
rdoc.rdoc_dir = 'rdoc'
|
29
|
-
rdoc.title = '
|
28
|
+
rdoc.title = 'ViziTranslator'
|
30
29
|
rdoc.options << '--line-numbers' << '--inline-source'
|
31
30
|
rdoc.rdoc_files.include('README')
|
32
31
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
data/build_gem1.bat
CHANGED
File without changes
|
data/build_gem2.bat
CHANGED
File without changes
|
data/build_gem3.bat
CHANGED
File without changes
|
data/build_gem4.bat
CHANGED
File without changes
|
data/geany_run_script.bat
CHANGED
File without changes
|
data/lib/vizi_translator.rb
CHANGED
data/log/system.log
CHANGED
@@ -1 +1,58 @@
|
|
1
|
-
|
1
|
+
I, [2012-06-02T22:56:14.084941 #12523] INFO -- : Starting ... >>> Sat Jun 02 22:56:14 -0400 2012
|
2
|
+
I, [2012-06-02T22:56:50.601909 #12571] INFO -- : Starting ... >>> Sat Jun 02 22:56:50 -0400 2012
|
3
|
+
I, [2012-06-02T22:56:50.602119 #12571] INFO -- : 
|
4
|
+
# Welcome to our new website
|
5
|
+
If you are a returning visit to our site, you will see many changes.
|
6
|
+
|
7
|
+
The first change you will see is a new layout that is a result of the move to Ramaze language.
|
8
|
+
|
9
|
+
If you are not familiar with Ramaze, you can find more information at [Ramaze web site](http://ramaze.net).
|
10
|
+
|
11
|
+
Another change that you will discover is the use of Google docs spreadsheets to store the results of the weekly production analysis.
|
12
|
+
|
13
|
+
The Google spreadsheets provide more capabilities including visitor mapping and additional pivot analysis.
|
14
|
+
|
15
|
+
Here is a sample map that is available with the Google tool.
|
16
|
+
|
17
|
+

|
18
|
+
|
19
|
+
...
|
20
|
+
|
21
|
+
I, [2012-06-02T23:09:01.223644 #12737] INFO -- : Starting ... >>> Sat Jun 02 23:09:01 -0400 2012
|
22
|
+
I, [2012-06-02T23:09:01.223875 #12737] INFO -- : 
|
23
|
+
# Welcome to our new website
|
24
|
+
If you are a returning visit to our site, you will see many changes.
|
25
|
+
|
26
|
+
The first change you will see is a new layout that is a result of the move to Ramaze language.
|
27
|
+
|
28
|
+
If you are not familiar with Ramaze, you can find more information at [Ramaze web site](http://ramaze.net).
|
29
|
+
|
30
|
+
Another change that you will discover is the use of Google docs spreadsheets to store the results of the weekly production analysis.
|
31
|
+
|
32
|
+
The Google spreadsheets provide more capabilities including visitor mapping and additional pivot analysis.
|
33
|
+
|
34
|
+
Here is a sample map that is available with the Google tool.
|
35
|
+
|
36
|
+

|
37
|
+
|
38
|
+
...
|
39
|
+
|
40
|
+
I, [2012-06-02T23:09:08.162443 #12737] INFO -- : 
|
41
|
+
# L'accueil à notre nouveau site
|
42
|
+
Si vous vous êtes un regagnais visitez à notre site, vous voulez voir de nombreux altérais.
|
43
|
+
|
44
|
+
Premiere changement vous voulez voir c'est une nouveau mise en page que c'est une suite du déménager à Ramaze la langue.
|
45
|
+
|
46
|
+
Si vous vous êtes pas familier avec Ramaze, tu peux trouver davantage renseignements sur [Ramaze web site](http://ramaze.net).
|
47
|
+
|
48
|
+
Un autre changement que vous voulez de découvrir faut la utilisez de Google docs spreadsheets à magasin la résultats du chaque semaine production l'analyse.
|
49
|
+
|
50
|
+
La Google spreadsheets fournir des davantage capacités compris visiteur mapping et d'autres pivot l'analyse.
|
51
|
+
|
52
|
+
Voici c'est une l'échantillon la carte que faut disponibles avec la Google outil.
|
53
|
+
|
54
|
+

|
55
|
+
|
56
|
+
...
|
57
|
+
|
58
|
+
I, [2012-06-02T23:09:08.162606 #12737] INFO -- : Ending ... >>> Sat Jun 02 23:09:08 -0400 2012
|
data/testit.rb
CHANGED
@@ -7,8 +7,9 @@
|
|
7
7
|
#
|
8
8
|
# Author:: Al Kivi <al.kivi@vizitrax.com>
|
9
9
|
|
10
|
-
require 'c:\ruby-gems\vizi_translator\lib\vizi_translator'
|
11
|
-
|
10
|
+
## require 'c:\ruby-gems\vizi_translator\lib\vizi_translator'
|
11
|
+
require 'rubygems'
|
12
|
+
require 'vizi_translator'
|
12
13
|
|
13
14
|
require 'logger'
|
14
15
|
syslog = Logger.new('./log/system.log',shift_age = 'weekly')
|
@@ -25,7 +26,7 @@ p 'starting'
|
|
25
26
|
|
26
27
|
begin
|
27
28
|
# Open test file for translation
|
28
|
-
@test = File.read(Dir.pwd+'
|
29
|
+
@test = File.read(Dir.pwd+'/data/index.md')
|
29
30
|
p 'input file ...'
|
30
31
|
p @test
|
31
32
|
syslog.info @test
|
Binary file
|
data/vizi_translator.gemspec
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
|
3
3
|
spec = Gem::Specification.new do |s|
|
4
4
|
s.name = 'vizi_translator'
|
5
|
-
s.version = '0.
|
5
|
+
s.version = '0.2.0'
|
6
6
|
s.summary = "Language translator that provides a wrapper to the Frengly on-line service"
|
7
7
|
s.description = "This gem module provides a classes to support the language translation of text files or text strings.
|
8
8
|
The Frengly on-line service requires registration and prvoides access with a username and password.
|
metadata
CHANGED
@@ -1,122 +1,144 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: vizi_translator
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Al Kivi
|
9
|
-
autorequire:
|
14
|
+
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
17
|
+
|
18
|
+
date: 2012-06-02 00:00:00 -04:00
|
19
|
+
default_executable:
|
14
20
|
dependencies: []
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
21
|
+
|
22
|
+
description: |-
|
23
|
+
This gem module provides a classes to support the language translation of text files or text strings.
|
24
|
+
The Frengly on-line service requires registration and prvoides access with a username and password.
|
25
|
+
The gem module uses the NET::HTTP library to access the Frengly service
|
19
26
|
email: al.kivi@vizitrax.com
|
20
27
|
executables: []
|
28
|
+
|
21
29
|
extensions: []
|
30
|
+
|
22
31
|
extra_rdoc_files: []
|
23
|
-
|
24
|
-
|
25
|
-
-
|
26
|
-
-
|
27
|
-
-
|
28
|
-
-
|
29
|
-
- data/testfile.txt
|
30
|
-
- doc/created.rid
|
31
|
-
- doc/docs/Whois_Documentation.doc
|
32
|
-
- doc/formats/apache-custom-log.pdf
|
32
|
+
|
33
|
+
files:
|
34
|
+
- vizi_translator-0.1.0.gem
|
35
|
+
- doc/Visit.html
|
36
|
+
- doc/testit_rb.html
|
37
|
+
- doc/Rakefile.html
|
33
38
|
- doc/formats/apache.rtf
|
39
|
+
- doc/formats/w3c-extended.rtf
|
40
|
+
- doc/formats/apache-custom-log.pdf
|
34
41
|
- doc/formats/format-descriptions.xls
|
35
42
|
- doc/formats/w3c-extended.pdf
|
36
|
-
- doc/
|
37
|
-
- doc/
|
38
|
-
- doc/
|
39
|
-
- doc/
|
43
|
+
- doc/Vizi/Visit.html
|
44
|
+
- doc/Vizi/VisitList.html
|
45
|
+
- doc/Vizi/LogFormat.html
|
46
|
+
- doc/Vizi/UnSupportedLanguage.html
|
47
|
+
- doc/Vizi/LogParser.html
|
48
|
+
- doc/Vizi/Translator.html
|
40
49
|
- doc/images/bullet_black.png
|
41
|
-
- doc/images/bullet_toggle_minus.png
|
42
50
|
- doc/images/bullet_toggle_plus.png
|
43
|
-
- doc/images/
|
44
|
-
- doc/images/
|
51
|
+
- doc/images/zoom.png
|
52
|
+
- doc/images/bug.png
|
53
|
+
- doc/images/wrench_orange.png
|
54
|
+
- doc/images/bullet_toggle_minus.png
|
45
55
|
- doc/images/loadingAnimation.gif
|
46
56
|
- doc/images/macFFBgHack.png
|
47
|
-
- doc/images/
|
48
|
-
- doc/images/
|
49
|
-
- doc/images/page_white_text.png
|
50
|
-
- doc/images/page_white_width.png
|
51
|
-
- doc/images/plugin.png
|
52
|
-
- doc/images/ruby.png
|
57
|
+
- doc/images/date.png
|
58
|
+
- doc/images/brick_link.png
|
53
59
|
- doc/images/tag_green.png
|
60
|
+
- doc/images/ruby.png
|
61
|
+
- doc/images/page_white_width.png
|
62
|
+
- doc/images/find.png
|
54
63
|
- doc/images/wrench.png
|
55
|
-
- doc/images/
|
56
|
-
- doc/images/
|
57
|
-
- doc/
|
58
|
-
- doc/
|
59
|
-
- doc/
|
60
|
-
- doc/
|
61
|
-
- doc/
|
62
|
-
- doc/
|
64
|
+
- doc/images/page_green.png
|
65
|
+
- doc/images/package.png
|
66
|
+
- doc/images/plugin.png
|
67
|
+
- doc/images/brick.png
|
68
|
+
- doc/images/page_white_text.png
|
69
|
+
- doc/VisitList.html
|
70
|
+
- doc/ViziLogParser.html
|
71
|
+
- doc/Object.html
|
72
|
+
- doc/Vizi.html
|
73
|
+
- doc/created.rid
|
74
|
+
- doc/lib/vizi_tracker_rb.html
|
63
75
|
- doc/lib/vizi/vizi_tracker_rb.html
|
64
|
-
- doc/lib/vizi/
|
76
|
+
- doc/lib/vizi/parser_rb.html
|
65
77
|
- doc/lib/vizi/vizi_translator_rb.html
|
78
|
+
- doc/lib/vizi/vizi_translator.html
|
66
79
|
- doc/lib/vizi_log_parser_rb.html
|
67
|
-
- doc/lib/vizi_tracker_rb.html
|
68
80
|
- doc/lib/vizi_translator_rb.html
|
69
|
-
- doc/
|
81
|
+
- doc/docs/Whois_Documentation.doc
|
82
|
+
- doc/ViziLogFormat.html
|
83
|
+
- doc/js/thickbox-compressed.js
|
84
|
+
- doc/js/jquery.js
|
85
|
+
- doc/js/darkfish.js
|
86
|
+
- doc/js/quicksearch.js
|
70
87
|
- doc/ParserTest.html
|
71
|
-
- doc/
|
72
|
-
- doc/rdoc.css
|
73
|
-
- doc/README_rdoc.html
|
74
|
-
- doc/test/parser_test_rb.html
|
88
|
+
- doc/index.html
|
75
89
|
- doc/test/test_helper_rb.html
|
76
|
-
- doc/
|
77
|
-
- doc/
|
78
|
-
- doc/
|
79
|
-
- doc/Vizi/LogFormat.html
|
80
|
-
- doc/Vizi/LogParser.html
|
81
|
-
- doc/Vizi/Translator.html
|
82
|
-
- doc/Vizi/UnSupportedLanguage.html
|
83
|
-
- doc/Vizi/Visit.html
|
84
|
-
- doc/Vizi/VisitList.html
|
85
|
-
- doc/Vizi.html
|
86
|
-
- doc/ViziLogFormat.html
|
87
|
-
- doc/ViziLogParser.html
|
90
|
+
- doc/test/parser_test_rb.html
|
91
|
+
- doc/README_rdoc.html
|
92
|
+
- doc/rdoc.css
|
88
93
|
- geany_run_script.bat
|
89
|
-
-
|
94
|
+
- build_gem4.bat
|
95
|
+
- data/testfile.txt
|
96
|
+
- data/index.md
|
90
97
|
- lib/vizi/vizi_translator.rb
|
91
98
|
- lib/vizi_translator.rb
|
92
|
-
-
|
99
|
+
- build_gem1.bat
|
100
|
+
- build_gem3.bat
|
101
|
+
- README.rdoc
|
93
102
|
- Rakefile
|
94
|
-
-
|
95
|
-
- vizi_translator-0.1.0.gem
|
103
|
+
- log/system.log
|
96
104
|
- vizi_translator.gemspec
|
105
|
+
- testit.rb
|
106
|
+
- build_gem2.bat
|
97
107
|
has_rdoc: true
|
98
108
|
homepage: http://www.vizitrax.com
|
99
109
|
licenses: []
|
100
|
-
|
110
|
+
|
111
|
+
post_install_message:
|
101
112
|
rdoc_options: []
|
102
|
-
|
113
|
+
|
114
|
+
require_paths:
|
103
115
|
- lib
|
104
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
105
117
|
none: false
|
106
|
-
requirements:
|
107
|
-
- -
|
108
|
-
- !ruby/object:Gem::Version
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
hash: 57
|
122
|
+
segments:
|
123
|
+
- 1
|
124
|
+
- 8
|
125
|
+
- 7
|
109
126
|
version: 1.8.7
|
110
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
128
|
none: false
|
112
|
-
requirements:
|
113
|
-
- -
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
hash: 3
|
133
|
+
segments:
|
134
|
+
- 0
|
135
|
+
version: "0"
|
116
136
|
requirements: []
|
117
|
-
|
118
|
-
|
119
|
-
|
137
|
+
|
138
|
+
rubyforge_project:
|
139
|
+
rubygems_version: 1.6.2
|
140
|
+
signing_key:
|
120
141
|
specification_version: 3
|
121
142
|
summary: Language translator that provides a wrapper to the Frengly on-line service
|
122
143
|
test_files: []
|
144
|
+
|
data/lib/vizi/vizi_translator
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
# This gem module provides a classes to find the right Regional Internet Registry
|
2
|
-
# for a given IP Address. The query method will navigate each major RIR until a
|
3
|
-
# response is found.
|
4
|
-
#
|
5
|
-
# Author:: Al Kivi <al.kivi@vizitrax.com>
|
6
|
-
# License:: MIT
|
7
|
-
|
8
|
-
module Vizi
|
9
|
-
# This class includes a set of methods to navigate and query the regional whois servers
|
10
|
-
class Gowhois
|
11
|
-
|