go_translate_yourself 0.0.4 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/{MIT-LICENSE → LICENSE} +0 -0
- data/app/modles/go_translate_yourself/base_store.rb +1 -1
- data/app/modles/go_translate_yourself/mongo_store.rb +2 -1
- data/app/views/go_translate_yourself/site_translations/edit.html.erb +15 -12
- metadata +17 -17
- data/Gemfile +0 -24
- data/Gemfile.lock +0 -159
- data/Rakefile +0 -35
data/{MIT-LICENSE → LICENSE}
RENAMED
File without changes
|
@@ -5,10 +5,11 @@ module GoTranslateYourself
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def []=(key, value)
|
8
|
-
collection.update({_id: key}, {'$set' => {:value => value}}, upsert: true, safe: true)
|
8
|
+
collection.update({_id: key}, {'$set' => {:value => ActiveSupport::JSON.encode(value)}}, upsert: true, safe: true)
|
9
9
|
end
|
10
10
|
|
11
11
|
def [](key)
|
12
|
+
load_dev_translations if Rails.env.development?
|
12
13
|
if document = collection.find_one(_id: key)
|
13
14
|
document["value"]
|
14
15
|
else
|
@@ -1,24 +1,27 @@
|
|
1
1
|
<%= form_tag update_site_translations_path, :method => :post do %>
|
2
|
-
<table>
|
3
|
-
<tr>
|
2
|
+
<table class="gt_site_translations">
|
3
|
+
<tr class="gt_ths">
|
4
4
|
<th>Key</th>
|
5
|
-
<th>
|
6
|
-
<% @locales.each do |locale| %>
|
7
|
-
<th><%= locale %></th>
|
8
|
-
<% end %>
|
5
|
+
<th>Value</th>
|
9
6
|
</tr>
|
10
7
|
<% @keys.each do |key| %>
|
11
|
-
<tr>
|
12
|
-
|
8
|
+
<tr class="gt_separator"><td colspan="2"></td></tr>
|
9
|
+
<tr class="gt_default_value">
|
10
|
+
<td class="gt_key">
|
13
11
|
<%= key %>
|
14
12
|
</td>
|
15
|
-
<td>
|
13
|
+
<td class="gt_value">
|
16
14
|
<%= GoTranslateYourself.current_store.default_translation("dev.#{key}") %>
|
17
15
|
</td>
|
18
16
|
<% @locales.each do |locale| %>
|
19
|
-
<
|
20
|
-
|
21
|
-
|
17
|
+
<tr>
|
18
|
+
<td>
|
19
|
+
<%= locale %>
|
20
|
+
</td>
|
21
|
+
<td>
|
22
|
+
<%= text_field_tag "translations[#{locale}.#{key}]", ActiveSupport::JSON.decode(GoTranslateYourself.current_store["#{locale}.#{key}"] || "") %>
|
23
|
+
</td>
|
24
|
+
</tr>
|
22
25
|
<% end %>
|
23
26
|
</tr>
|
24
27
|
<% end %>
|
metadata
CHANGED
@@ -5,21 +5,22 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 6
|
9
|
+
version: 0.0.6
|
10
10
|
platform: ruby
|
11
|
-
authors:
|
12
|
-
|
11
|
+
authors:
|
12
|
+
- "Hubert \xC5\x81\xC4\x99picki"
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-10-
|
17
|
+
date: 2010-10-22 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
21
|
-
description:
|
21
|
+
description: GoTranslateYourself is engine, that you can easily integrate with your administration panel, and let your clients do the dirty work translating the site
|
22
22
|
email:
|
23
|
+
- hubert.lepicki@amberbit.com
|
23
24
|
executables: []
|
24
25
|
|
25
26
|
extensions: []
|
@@ -27,20 +28,17 @@ extensions: []
|
|
27
28
|
extra_rdoc_files: []
|
28
29
|
|
29
30
|
files:
|
30
|
-
- MIT-LICENSE
|
31
|
-
- Gemfile
|
32
|
-
- README.rdoc
|
33
|
-
- Gemfile.lock
|
34
|
-
- Rakefile
|
35
|
-
- lib/go_translate_yourself/engine.rb
|
36
|
-
- lib/go_translate_yourself.rb
|
37
31
|
- app/controllers/go_translate_yourself/site_translations_controller.rb
|
38
32
|
- app/modles/go_translate_yourself/base_store.rb
|
39
33
|
- app/modles/go_translate_yourself/mongo_store.rb
|
40
34
|
- app/views/go_translate_yourself/site_translations/edit.html.erb
|
35
|
+
- lib/go_translate_yourself/engine.rb
|
36
|
+
- lib/go_translate_yourself.rb
|
41
37
|
- config/routes.rb
|
38
|
+
- LICENSE
|
39
|
+
- README.rdoc
|
42
40
|
has_rdoc: true
|
43
|
-
homepage:
|
41
|
+
homepage: http://github.com/hubertlepicki/GoTranslateYourself
|
44
42
|
licenses: []
|
45
43
|
|
46
44
|
post_install_message:
|
@@ -62,14 +60,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
60
|
- - ">="
|
63
61
|
- !ruby/object:Gem::Version
|
64
62
|
segments:
|
65
|
-
-
|
66
|
-
|
63
|
+
- 1
|
64
|
+
- 3
|
65
|
+
- 6
|
66
|
+
version: 1.3.6
|
67
67
|
requirements: []
|
68
68
|
|
69
69
|
rubyforge_project:
|
70
70
|
rubygems_version: 1.3.7
|
71
71
|
signing_key:
|
72
72
|
specification_version: 3
|
73
|
-
summary:
|
73
|
+
summary: Rails engine to manage translations
|
74
74
|
test_files: []
|
75
75
|
|
data/Gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
source "http://rubygems.org"
|
2
|
-
|
3
|
-
gem "rails", "3.0.0"
|
4
|
-
gem "mongo", "1.1"
|
5
|
-
gem "bson_ext", ">=1.0.5"
|
6
|
-
|
7
|
-
if RUBY_VERSION < '1.9'
|
8
|
-
gem "ruby-debug", ">= 0.10.3"
|
9
|
-
end
|
10
|
-
|
11
|
-
gem "diff-lcs", "1.1.2", require: nil
|
12
|
-
gem "rspec-rails", :git => "git://github.com/rspec/rspec-rails.git"
|
13
|
-
gem "rspec", :git => "git://github.com/rspec/rspec.git"
|
14
|
-
gem "rspec-core", :git => "git://github.com/rspec/rspec-core.git"
|
15
|
-
gem "rspec-expectations", :git => "git://github.com/rspec/rspec-expectations.git"
|
16
|
-
gem "rspec-mocks", :git => "git://github.com/rspec/rspec-mocks.git"
|
17
|
-
|
18
|
-
gem "steak", git: "git://github.com/cavalle/steak.git"
|
19
|
-
gem "capybara", "0.3.9", require: nil
|
20
|
-
gem "timecop", "0.3.5"
|
21
|
-
gem "mongrel", "1.2.0.pre2"
|
22
|
-
gem "cgi_multipart_eof_fix"
|
23
|
-
gem "fastthread"
|
24
|
-
|
data/Gemfile.lock
DELETED
@@ -1,159 +0,0 @@
|
|
1
|
-
GIT
|
2
|
-
remote: git://github.com/cavalle/steak.git
|
3
|
-
revision: 86331782937ee379e14e02a0d313774a0391dab4
|
4
|
-
specs:
|
5
|
-
steak (1.0.0.beta.2)
|
6
|
-
rspec
|
7
|
-
|
8
|
-
GIT
|
9
|
-
remote: git://github.com/rspec/rspec-core.git
|
10
|
-
revision: 792707bd88723c4e120ed0326979b23371074179
|
11
|
-
specs:
|
12
|
-
rspec-core (2.0.0.rc)
|
13
|
-
|
14
|
-
GIT
|
15
|
-
remote: git://github.com/rspec/rspec-expectations.git
|
16
|
-
revision: 6967fd6393a4c9a3aafc25045f64a54d17545834
|
17
|
-
specs:
|
18
|
-
rspec-expectations (2.0.0.rc)
|
19
|
-
diff-lcs (>= 1.1.2)
|
20
|
-
|
21
|
-
GIT
|
22
|
-
remote: git://github.com/rspec/rspec-mocks.git
|
23
|
-
revision: 361f31542f8ef4aa1a0cb8102893627022fcc88b
|
24
|
-
specs:
|
25
|
-
rspec-mocks (2.0.0.rc)
|
26
|
-
rspec-core (= 2.0.0.rc)
|
27
|
-
rspec-expectations (= 2.0.0.rc)
|
28
|
-
|
29
|
-
GIT
|
30
|
-
remote: git://github.com/rspec/rspec-rails.git
|
31
|
-
revision: b45d0936d77f3e532a08fc1b49f072be05873f94
|
32
|
-
specs:
|
33
|
-
rspec-rails (2.0.0.rc)
|
34
|
-
rspec (= 2.0.0.rc)
|
35
|
-
|
36
|
-
GIT
|
37
|
-
remote: git://github.com/rspec/rspec.git
|
38
|
-
revision: bf20df3f6652f15f014c7d6d546edd9456749196
|
39
|
-
specs:
|
40
|
-
rspec (2.0.0.rc)
|
41
|
-
rspec-core (= 2.0.0.rc)
|
42
|
-
rspec-expectations (= 2.0.0.rc)
|
43
|
-
rspec-mocks (= 2.0.0.rc)
|
44
|
-
|
45
|
-
GEM
|
46
|
-
remote: http://rubygems.org/
|
47
|
-
specs:
|
48
|
-
abstract (1.0.0)
|
49
|
-
actionmailer (3.0.0)
|
50
|
-
actionpack (= 3.0.0)
|
51
|
-
mail (~> 2.2.5)
|
52
|
-
actionpack (3.0.0)
|
53
|
-
activemodel (= 3.0.0)
|
54
|
-
activesupport (= 3.0.0)
|
55
|
-
builder (~> 2.1.2)
|
56
|
-
erubis (~> 2.6.6)
|
57
|
-
i18n (~> 0.4.1)
|
58
|
-
rack (~> 1.2.1)
|
59
|
-
rack-mount (~> 0.6.12)
|
60
|
-
rack-test (~> 0.5.4)
|
61
|
-
tzinfo (~> 0.3.23)
|
62
|
-
activemodel (3.0.0)
|
63
|
-
activesupport (= 3.0.0)
|
64
|
-
builder (~> 2.1.2)
|
65
|
-
i18n (~> 0.4.1)
|
66
|
-
activerecord (3.0.0)
|
67
|
-
activemodel (= 3.0.0)
|
68
|
-
activesupport (= 3.0.0)
|
69
|
-
arel (~> 1.0.0)
|
70
|
-
tzinfo (~> 0.3.23)
|
71
|
-
activeresource (3.0.0)
|
72
|
-
activemodel (= 3.0.0)
|
73
|
-
activesupport (= 3.0.0)
|
74
|
-
activesupport (3.0.0)
|
75
|
-
arel (1.0.1)
|
76
|
-
activesupport (~> 3.0.0)
|
77
|
-
bson (1.1)
|
78
|
-
bson_ext (1.1)
|
79
|
-
builder (2.1.2)
|
80
|
-
capybara (0.3.9)
|
81
|
-
culerity (>= 0.2.4)
|
82
|
-
mime-types (>= 1.16)
|
83
|
-
nokogiri (>= 1.3.3)
|
84
|
-
rack (>= 1.0.0)
|
85
|
-
rack-test (>= 0.5.4)
|
86
|
-
selenium-webdriver (>= 0.0.3)
|
87
|
-
cgi_multipart_eof_fix (2.5.0)
|
88
|
-
culerity (0.2.12)
|
89
|
-
daemons (1.0.10)
|
90
|
-
diff-lcs (1.1.2)
|
91
|
-
erubis (2.6.6)
|
92
|
-
abstract (>= 1.0.0)
|
93
|
-
fastthread (1.0.7)
|
94
|
-
ffi (0.6.3)
|
95
|
-
rake (>= 0.8.7)
|
96
|
-
gem_plugin (0.2.3)
|
97
|
-
i18n (0.4.1)
|
98
|
-
json_pure (1.4.6)
|
99
|
-
mail (2.2.6.1)
|
100
|
-
activesupport (>= 2.3.6)
|
101
|
-
mime-types
|
102
|
-
treetop (>= 1.4.5)
|
103
|
-
mime-types (1.16)
|
104
|
-
mongo (1.1)
|
105
|
-
bson (>= 1.0.5)
|
106
|
-
mongrel (1.2.0.pre2)
|
107
|
-
daemons (~> 1.0.10)
|
108
|
-
gem_plugin (~> 0.2.3)
|
109
|
-
nokogiri (1.4.3.1)
|
110
|
-
polyglot (0.3.1)
|
111
|
-
rack (1.2.1)
|
112
|
-
rack-mount (0.6.13)
|
113
|
-
rack (>= 1.0.0)
|
114
|
-
rack-test (0.5.6)
|
115
|
-
rack (>= 1.0)
|
116
|
-
rails (3.0.0)
|
117
|
-
actionmailer (= 3.0.0)
|
118
|
-
actionpack (= 3.0.0)
|
119
|
-
activerecord (= 3.0.0)
|
120
|
-
activeresource (= 3.0.0)
|
121
|
-
activesupport (= 3.0.0)
|
122
|
-
bundler (~> 1.0.0)
|
123
|
-
railties (= 3.0.0)
|
124
|
-
railties (3.0.0)
|
125
|
-
actionpack (= 3.0.0)
|
126
|
-
activesupport (= 3.0.0)
|
127
|
-
rake (>= 0.8.4)
|
128
|
-
thor (~> 0.14.0)
|
129
|
-
rake (0.8.7)
|
130
|
-
rubyzip (0.9.4)
|
131
|
-
selenium-webdriver (0.0.28)
|
132
|
-
ffi (>= 0.6.1)
|
133
|
-
json_pure
|
134
|
-
rubyzip
|
135
|
-
thor (0.14.2)
|
136
|
-
timecop (0.3.5)
|
137
|
-
treetop (1.4.8)
|
138
|
-
polyglot (>= 0.3.1)
|
139
|
-
tzinfo (0.3.23)
|
140
|
-
|
141
|
-
PLATFORMS
|
142
|
-
ruby
|
143
|
-
|
144
|
-
DEPENDENCIES
|
145
|
-
bson_ext (>= 1.0.5)
|
146
|
-
capybara (= 0.3.9)
|
147
|
-
cgi_multipart_eof_fix
|
148
|
-
diff-lcs (= 1.1.2)
|
149
|
-
fastthread
|
150
|
-
mongo (= 1.1)
|
151
|
-
mongrel (= 1.2.0.pre2)
|
152
|
-
rails (= 3.0.0)
|
153
|
-
rspec!
|
154
|
-
rspec-core!
|
155
|
-
rspec-expectations!
|
156
|
-
rspec-mocks!
|
157
|
-
rspec-rails!
|
158
|
-
steak!
|
159
|
-
timecop (= 0.3.5)
|
data/Rakefile
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
require 'rake'
|
3
|
-
require 'rake/rdoctask'
|
4
|
-
require 'rake/gempackagetask'
|
5
|
-
|
6
|
-
require 'rspec/core'
|
7
|
-
require 'rspec/core/rake_task'
|
8
|
-
|
9
|
-
Rspec::Core::RakeTask.new(:spec)
|
10
|
-
|
11
|
-
task :default => :spec
|
12
|
-
|
13
|
-
Rake::RDocTask.new(:rdoc) do |rdoc|
|
14
|
-
rdoc.rdoc_dir = 'rdoc'
|
15
|
-
rdoc.title = 'GoTranslateYourself'
|
16
|
-
rdoc.options << '--line-numbers' << '--inline-source'
|
17
|
-
rdoc.rdoc_files.include('README.rdoc')
|
18
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
19
|
-
end
|
20
|
-
|
21
|
-
spec = Gem::Specification.new do |s|
|
22
|
-
s.name = "go_translate_yourself"
|
23
|
-
s.summary = "Insert GoTranslateYourself summary."
|
24
|
-
s.description = "Insert GoTranslateYourself description."
|
25
|
-
s.files = FileList["[A-Z]*", "lib/**/*", "app/**/*", "config/routes.rb"]
|
26
|
-
s.version = "0.0.4"
|
27
|
-
end
|
28
|
-
|
29
|
-
Rake::GemPackageTask.new(spec) do |pkg|
|
30
|
-
end
|
31
|
-
|
32
|
-
desc "Install the gem #{spec.name}-#{spec.version}.gem"
|
33
|
-
task :install do
|
34
|
-
system("gem install pkg/#{spec.name}-#{spec.version}.gem --no-ri --no-rdoc")
|
35
|
-
end
|