interpret 0.2.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -4
- data/Gemfile +2 -3
- data/README.md +1 -10
- data/{public/stylesheets → app/assets/images}/folder.png +0 -0
- data/{public → app/assets}/javascripts/interpret.js +0 -0
- data/{public/stylesheets/interpret_style.css → app/assets/stylesheets/interpret_style.css.erb} +1 -1
- data/app/controllers/interpret/base_controller.rb +1 -1
- data/app/controllers/interpret/search_controller.rb +8 -2
- data/app/controllers/interpret/tools_controller.rb +5 -5
- data/app/controllers/interpret/translations_controller.rb +59 -69
- data/app/models/interpret/translation.rb +1 -0
- data/app/views/interpret/missing_translations/blank.html.erb +1 -1
- data/app/views/interpret/missing_translations/index.html.erb +1 -1
- data/app/views/interpret/missing_translations/stale.html.erb +2 -2
- data/app/views/interpret/search/_blank_search.html.erb +1 -1
- data/app/views/interpret/search/_filled_search.html.erb +1 -1
- data/app/views/interpret/tools/index.html.erb +2 -2
- data/app/views/interpret/translations/_listing.html.erb +3 -3
- data/app/views/interpret/translations/new.html.erb +2 -2
- data/app/views/layouts/interpret/interpret.html.erb +55 -0
- data/app/views/layouts/{interpret_base.html.erb → interpret/interpret_base.html.erb} +0 -0
- data/config/routes.rb +19 -21
- data/{lib/generators/interpret/templates/migration.rb → db/migrate/20111108094329_create_translations.rb} +3 -4
- data/interpret.gemspec +3 -3
- data/lib/interpret/engine.rb +6 -4
- data/lib/interpret/helpers.rb +4 -53
- data/lib/interpret/version.rb +1 -1
- data/lib/interpret.rb +0 -4
- data/script/rails +5 -0
- data/spec/integration/missing_translations_spec.rb +8 -8
- data/spec/integration/search_spec.rb +8 -8
- data/spec/integration/stale_translations_spec.rb +5 -5
- data/spec/integration/tools_spec.rb +9 -9
- data/spec/integration/translations_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -9
- data/spec/support/load_routes.rb +6 -0
- data/test_app/Gemfile +11 -6
- data/test_app/{public → app/assets}/images/a1.gif +0 -0
- data/test_app/{public → app/assets}/images/a10.jpg +0 -0
- data/test_app/{public → app/assets}/images/a16.gif +0 -0
- data/test_app/{public → app/assets}/images/a18.gif +0 -0
- data/test_app/{public → app/assets}/images/a22.gif +0 -0
- data/test_app/{public → app/assets}/images/a26.gif +0 -0
- data/test_app/{public → app/assets}/images/a33.gif +0 -0
- data/test_app/{public → app/assets}/images/a36.gif +0 -0
- data/test_app/{public → app/assets}/images/a38.gif +0 -0
- data/test_app/{public → app/assets}/images/a41.gif +0 -0
- data/test_app/{public → app/assets}/images/a47.gif +0 -0
- data/test_app/{public → app/assets}/images/a50.gif +0 -0
- data/test_app/{public → app/assets}/images/a8.gif +0 -0
- data/test_app/{public → app/assets}/images/abg.gif +0 -0
- data/test_app/{public → app/assets}/images/pic1.jpg +0 -0
- data/test_app/{public → app/assets}/images/pic2.jpg +0 -0
- data/test_app/{public → app/assets}/images/spacer.gif +0 -0
- data/test_app/{public → app/assets}/images/upbg.gif +0 -0
- data/test_app/app/assets/javascripts/application.js +4 -0
- data/test_app/{public → app/assets}/stylesheets/.gitkeep +0 -0
- data/test_app/{public/stylesheets/default.css → app/assets/stylesheets/default.css.erb} +16 -16
- data/test_app/{public → app/assets}/stylesheets/private.css +0 -0
- data/test_app/app/controllers/admin/dashboard_controller.rb +6 -0
- data/test_app/app/views/admin/dashboard/index.html.erb +1 -0
- data/test_app/app/views/layouts/application.html.erb +3 -13
- data/test_app/app/views/layouts/backoffice.html.erb +3 -4
- data/test_app/app/views/pages/index.html.erb +2 -2
- data/test_app/config/application.rb +12 -3
- data/test_app/config/environments/development.rb +0 -1
- data/test_app/config/initializers/interpret.rb +0 -1
- data/test_app/config/routes.rb +10 -1
- data/test_app/db/migrate/{20111021100344_interpret_create_translations.rb → 20111108094455_create_translations.rb} +3 -4
- data/test_app/db/schema.rb +3 -0
- metadata +60 -78
- data/app/views/interpret/translations/live_edit.html.erb +0 -11
- data/app/views/layouts/interpret.html.erb +0 -56
- data/lib/generators/interpret/migration_generator.rb +0 -25
- data/lib/generators/interpret/setup_generator.rb +0 -21
- data/lib/interpret/capistrano.rb +0 -18
- data/lib/interpret/controller_filter.rb +0 -12
- data/public/javascripts/facebox-1.3/closelabel.png +0 -0
- data/public/javascripts/facebox-1.3/facebox.css +0 -80
- data/public/javascripts/facebox-1.3/facebox.js +0 -309
- data/public/javascripts/facebox-1.3/loading.gif +0 -0
- data/public/stylesheets/interpret_live_edit_style.css +0 -38
- data/test_app/config/deploy.rb +0 -24
- data/test_app/config/initializers/rack_patch.rb +0 -13
- data/test_app/public/javascripts/application.js +0 -2
- data/test_app/public/javascripts/best_in_place.js +0 -456
- data/test_app/public/javascripts/facebox-1.3/closelabel.png +0 -0
- data/test_app/public/javascripts/facebox-1.3/facebox.css +0 -80
- data/test_app/public/javascripts/facebox-1.3/facebox.js +0 -309
- data/test_app/public/javascripts/facebox-1.3/loading.gif +0 -0
- data/test_app/public/javascripts/interpret.js +0 -4
- data/test_app/public/javascripts/rails.js +0 -134
- data/test_app/public/stylesheets/folder.png +0 -0
- data/test_app/public/stylesheets/interpret_live_edit_style.css +0 -38
- data/test_app/public/stylesheets/interpret_style.css +0 -535
@@ -3,7 +3,7 @@
|
|
3
3
|
<head>
|
4
4
|
<title>Interpret Demo</title>
|
5
5
|
<%= stylesheet_link_tag "default" %>
|
6
|
-
<%= javascript_include_tag "
|
6
|
+
<%= javascript_include_tag "application" %>
|
7
7
|
<%= csrf_meta_tag %>
|
8
8
|
</head>
|
9
9
|
<body>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<p>
|
16
16
|
<ul>
|
17
17
|
<li>
|
18
|
-
<%= link_to "Login to interpret",
|
18
|
+
<%= link_to "Login to interpret", interpret.root_path %>
|
19
19
|
</li>
|
20
20
|
</ul>
|
21
21
|
</p>
|
@@ -28,16 +28,8 @@
|
|
28
28
|
You are not logged in
|
29
29
|
<% end %>
|
30
30
|
</p>
|
31
|
-
<p>
|
32
|
-
<% if current_user %>
|
33
|
-
<%= button_to Interpret.live_edit ? "Disable edition mode" : "Enable edition mode", toggle_edition_mode_path %>
|
34
|
-
<% else %>
|
35
|
-
Log in to use the live edition features!
|
36
|
-
<% end %>
|
37
|
-
</p>
|
38
31
|
|
39
32
|
<br/>
|
40
|
-
<p>You can reestore the original contents with the option "Dump", inside the backoffice > Tools section.</p>
|
41
33
|
<p>
|
42
34
|
Thanks to <a href="http://nodethirtythree.com">NodeThirtyThree</a> to provide this template in order to demostrate a real website.
|
43
35
|
</p>
|
@@ -84,7 +76,7 @@
|
|
84
76
|
|
85
77
|
<h3><%= t "about_me" %></h3>
|
86
78
|
<div class="content">
|
87
|
-
|
79
|
+
<%= image_tag "pic2.jpg", :class => "picB" %>
|
88
80
|
<p><%= t "about_me_text_html" %></p>
|
89
81
|
</div>
|
90
82
|
|
@@ -115,8 +107,6 @@
|
|
115
107
|
</div>
|
116
108
|
|
117
109
|
</div>
|
118
|
-
|
119
|
-
<%= interpret_live_edition %>
|
120
110
|
</body>
|
121
111
|
</html>
|
122
112
|
|
@@ -3,8 +3,7 @@
|
|
3
3
|
<head>
|
4
4
|
<title>Interpret Demo - Backoffice</title>
|
5
5
|
<%= stylesheet_link_tag "private", "interpret_style" %>
|
6
|
-
<%= javascript_include_tag "
|
7
|
-
<%= javascript_include_tag :all %>
|
6
|
+
<%= javascript_include_tag "application" %>
|
8
7
|
<%= csrf_meta_tag %>
|
9
8
|
</head>
|
10
9
|
<body>
|
@@ -15,8 +14,8 @@
|
|
15
14
|
<div id="backoffice_menu">
|
16
15
|
<ul>
|
17
16
|
<li><%= link_to "Public page", "/" %></li>
|
18
|
-
<li><%= link_to "Other backoffice section",
|
19
|
-
<li><%= link_to "Translations",
|
17
|
+
<li><%= link_to "Other backoffice section", main_app.admin_dashboard_path %></li>
|
18
|
+
<li><%= link_to "Translations", interpret.root_path %></li>
|
20
19
|
</ul>
|
21
20
|
</div>
|
22
21
|
<div id="page">
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<div class="
|
1
|
+
<div class="application">
|
2
2
|
<div class="header">
|
3
3
|
<h3><%= t ".title1_html" %></h3>
|
4
4
|
<div class="date"><%= t ".date1" %></div>
|
5
5
|
</div>
|
6
6
|
<div class="content">
|
7
|
-
|
7
|
+
<%= image_tag "pic1.jpg", :class => "picA floatleft" %>
|
8
8
|
<p><%= t ".post_1_1_html" %></p>
|
9
9
|
<p><%= t ".post_1_2_html" %></p>
|
10
10
|
</div>
|
@@ -2,9 +2,12 @@ require File.expand_path('../boot', __FILE__)
|
|
2
2
|
|
3
3
|
require 'rails/all'
|
4
4
|
|
5
|
-
|
6
|
-
# you
|
7
|
-
Bundler.require(
|
5
|
+
if defined?(Bundler)
|
6
|
+
# If you precompile assets before deploying to production, use this line
|
7
|
+
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
8
|
+
# If you want your assets lazily compiled in production, use this line
|
9
|
+
# Bundler.require(:default, :assets, Rails.env)
|
10
|
+
end
|
8
11
|
|
9
12
|
module InterpretApp
|
10
13
|
class Application < Rails::Application
|
@@ -38,5 +41,11 @@ module InterpretApp
|
|
38
41
|
|
39
42
|
# Configure sensitive parameters which will be filtered from the log file.
|
40
43
|
config.filter_parameters += [:password, :password_confirmation]
|
44
|
+
|
45
|
+
# Enable the asset pipeline
|
46
|
+
config.assets.enabled = true
|
47
|
+
|
48
|
+
# Version of your assets, change this if you want to expire all your assets
|
49
|
+
config.assets.version = '1.0'
|
41
50
|
end
|
42
51
|
end
|
@@ -11,7 +11,6 @@ InterpretApp::Application.configure do
|
|
11
11
|
|
12
12
|
# Show full error reports and disable caching
|
13
13
|
config.consider_all_requests_local = true
|
14
|
-
config.action_view.debug_rjs = true
|
15
14
|
config.action_controller.perform_caching = false
|
16
15
|
#config.action_controller.perform_caching = true
|
17
16
|
|
@@ -2,7 +2,6 @@ Interpret.configure do |config|
|
|
2
2
|
config.registered_envs << :development
|
3
3
|
config.parent_controller = "application_controller"
|
4
4
|
config.layout = "backoffice"
|
5
|
-
config.scope = "(:locale)"
|
6
5
|
config.ability = "interpret_ability"
|
7
6
|
config.black_list = ["blacklist.*", "missings.black"]
|
8
7
|
end
|
data/test_app/config/routes.rb
CHANGED
@@ -1,11 +1,20 @@
|
|
1
1
|
InterpretApp::Application.routes.draw do
|
2
|
-
|
2
|
+
root :to => redirect("/es")
|
3
|
+
|
4
|
+
mount Interpret::Engine => "/interpret"
|
5
|
+
|
6
|
+
scope ":locale" do
|
3
7
|
get "archives", :to => "pages#archives"
|
4
8
|
get "links", :to => "pages#links"
|
5
9
|
get "resources", :to => "pages#resources"
|
6
10
|
get "contact", :to => "pages#contact"
|
7
11
|
|
8
12
|
post "toggle_edition_mode", :to => "application#toggle_edition_mode"
|
13
|
+
|
14
|
+
namespace :admin do
|
15
|
+
get 'dashboard', :to => "dashboard#index"
|
16
|
+
end
|
17
|
+
|
9
18
|
root :to => "pages#index"
|
10
19
|
end
|
11
20
|
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
class
|
2
|
-
def
|
1
|
+
class CreateTranslations < ActiveRecord::Migration
|
2
|
+
def up
|
3
3
|
create_table :translations do |t|
|
4
4
|
t.string :locale
|
5
5
|
t.string :key
|
@@ -10,8 +10,7 @@ class InterpretCreateTranslations < ActiveRecord::Migration
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
13
|
+
def down
|
14
14
|
drop_table :translations
|
15
15
|
end
|
16
16
|
end
|
17
|
-
|
data/test_app/db/schema.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: UTF-8
|
1
2
|
# This file is auto-generated from the current state of the database. Instead
|
2
3
|
# of editing this file, please use the migrations feature of Active Record to
|
3
4
|
# incrementally modify your database, and then regenerate this schema definition.
|
@@ -18,10 +19,12 @@ ActiveRecord::Schema.define(:version => 20111021100344) do
|
|
18
19
|
t.text "value"
|
19
20
|
t.text "interpolations"
|
20
21
|
t.boolean "is_proc", :default => false
|
22
|
+
t.boolean "protected", :default => false
|
21
23
|
t.boolean "stale", :default => false
|
22
24
|
end
|
23
25
|
|
24
26
|
create_table "users", :force => true do |t|
|
27
|
+
t.boolean "admin", :default => false, :null => false
|
25
28
|
t.datetime "created_at"
|
26
29
|
t.datetime "updated_at"
|
27
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: interpret
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,33 +9,33 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-11-
|
12
|
+
date: 2011-11-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &75487960 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.0
|
21
|
+
version: 3.1.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *75487960
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: i18n
|
27
|
-
requirement: &
|
27
|
+
requirement: &75487620 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
32
|
+
version: 0.6.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *75487620
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: i18n-active_record
|
38
|
-
requirement: &
|
38
|
+
requirement: &75487310 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *75487310
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: ya2yaml
|
49
|
-
requirement: &
|
49
|
+
requirement: &75486920 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,21 +54,21 @@ dependencies:
|
|
54
54
|
version: 0.30.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *75486920
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: best_in_place
|
60
|
-
requirement: &
|
60
|
+
requirement: &75486540 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.
|
65
|
+
version: 1.0.0
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *75486540
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: lazyhash
|
71
|
-
requirement: &
|
71
|
+
requirement: &75486210 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.1.1
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *75486210
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: cancan
|
82
|
-
requirement: &
|
82
|
+
requirement: &75485870 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 1.6.0
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *75485870
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rspec-rails
|
93
|
-
requirement: &
|
93
|
+
requirement: &75485460 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ~>
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '2.5'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *75485460
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: capybara
|
104
|
-
requirement: &
|
104
|
+
requirement: &75485080 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: 1.0.1
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *75485080
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: launchy
|
115
|
-
requirement: &
|
115
|
+
requirement: &75484720 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,7 +120,7 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *75484720
|
124
124
|
description: Manage your app translations with an i18n active_record backend
|
125
125
|
email:
|
126
126
|
- roger@itnig.net
|
@@ -134,6 +134,9 @@ files:
|
|
134
134
|
- Gemfile
|
135
135
|
- README.md
|
136
136
|
- Rakefile
|
137
|
+
- app/assets/images/folder.png
|
138
|
+
- app/assets/javascripts/interpret.js
|
139
|
+
- app/assets/stylesheets/interpret_style.css.erb
|
137
140
|
- app/controllers/interpret/base_controller.rb
|
138
141
|
- app/controllers/interpret/missing_translations_controller.rb
|
139
142
|
- app/controllers/interpret/search_controller.rb
|
@@ -152,32 +155,20 @@ files:
|
|
152
155
|
- app/views/interpret/tools/index.html.erb
|
153
156
|
- app/views/interpret/translations/_listing.html.erb
|
154
157
|
- app/views/interpret/translations/index.html.erb
|
155
|
-
- app/views/interpret/translations/live_edit.html.erb
|
156
158
|
- app/views/interpret/translations/new.html.erb
|
157
|
-
- app/views/layouts/interpret.html.erb
|
158
|
-
- app/views/layouts/interpret_base.html.erb
|
159
|
+
- app/views/layouts/interpret/interpret.html.erb
|
160
|
+
- app/views/layouts/interpret/interpret_base.html.erb
|
159
161
|
- config/environment.rb
|
160
162
|
- config/routes.rb
|
163
|
+
- db/migrate/20111108094329_create_translations.rb
|
161
164
|
- interpret.gemspec
|
162
|
-
- lib/generators/interpret/migration_generator.rb
|
163
|
-
- lib/generators/interpret/setup_generator.rb
|
164
|
-
- lib/generators/interpret/templates/migration.rb
|
165
165
|
- lib/interpret.rb
|
166
|
-
- lib/interpret/capistrano.rb
|
167
|
-
- lib/interpret/controller_filter.rb
|
168
166
|
- lib/interpret/engine.rb
|
169
167
|
- lib/interpret/helpers.rb
|
170
168
|
- lib/interpret/logger.rb
|
171
169
|
- lib/interpret/version.rb
|
172
170
|
- lib/tasks/interpret.rake
|
173
|
-
-
|
174
|
-
- public/javascripts/facebox-1.3/facebox.css
|
175
|
-
- public/javascripts/facebox-1.3/facebox.js
|
176
|
-
- public/javascripts/facebox-1.3/loading.gif
|
177
|
-
- public/javascripts/interpret.js
|
178
|
-
- public/stylesheets/folder.png
|
179
|
-
- public/stylesheets/interpret_live_edit_style.css
|
180
|
-
- public/stylesheets/interpret_style.css
|
171
|
+
- script/rails
|
181
172
|
- spec/integration/missing_translations_spec.rb
|
182
173
|
- spec/integration/search_spec.rb
|
183
174
|
- spec/integration/stale_translations_spec.rb
|
@@ -186,18 +177,43 @@ files:
|
|
186
177
|
- spec/models/translation_spec.rb
|
187
178
|
- spec/observers/expiration_observer_spec.rb
|
188
179
|
- spec/spec_helper.rb
|
180
|
+
- spec/support/load_routes.rb
|
189
181
|
- spec/support/selenium_db_hack.rb
|
190
182
|
- spec/support/utils.rb
|
191
183
|
- test_app/Capfile
|
192
184
|
- test_app/Gemfile
|
193
185
|
- test_app/README
|
194
186
|
- test_app/Rakefile
|
187
|
+
- test_app/app/assets/images/a1.gif
|
188
|
+
- test_app/app/assets/images/a10.jpg
|
189
|
+
- test_app/app/assets/images/a16.gif
|
190
|
+
- test_app/app/assets/images/a18.gif
|
191
|
+
- test_app/app/assets/images/a22.gif
|
192
|
+
- test_app/app/assets/images/a26.gif
|
193
|
+
- test_app/app/assets/images/a33.gif
|
194
|
+
- test_app/app/assets/images/a36.gif
|
195
|
+
- test_app/app/assets/images/a38.gif
|
196
|
+
- test_app/app/assets/images/a41.gif
|
197
|
+
- test_app/app/assets/images/a47.gif
|
198
|
+
- test_app/app/assets/images/a50.gif
|
199
|
+
- test_app/app/assets/images/a8.gif
|
200
|
+
- test_app/app/assets/images/abg.gif
|
201
|
+
- test_app/app/assets/images/pic1.jpg
|
202
|
+
- test_app/app/assets/images/pic2.jpg
|
203
|
+
- test_app/app/assets/images/spacer.gif
|
204
|
+
- test_app/app/assets/images/upbg.gif
|
205
|
+
- test_app/app/assets/javascripts/application.js
|
206
|
+
- test_app/app/assets/stylesheets/.gitkeep
|
207
|
+
- test_app/app/assets/stylesheets/default.css.erb
|
208
|
+
- test_app/app/assets/stylesheets/private.css
|
209
|
+
- test_app/app/controllers/admin/dashboard_controller.rb
|
195
210
|
- test_app/app/controllers/application_controller.rb
|
196
211
|
- test_app/app/controllers/pages_controller.rb
|
197
212
|
- test_app/app/helpers/application_helper.rb
|
198
213
|
- test_app/app/models/interpret_ability.rb
|
199
214
|
- test_app/app/models/my_sweeper.rb
|
200
215
|
- test_app/app/models/user.rb
|
216
|
+
- test_app/app/views/admin/dashboard/index.html.erb
|
201
217
|
- test_app/app/views/layouts/application.html.erb
|
202
218
|
- test_app/app/views/layouts/backoffice.html.erb
|
203
219
|
- test_app/app/views/pages/archives.html.erb
|
@@ -209,7 +225,6 @@ files:
|
|
209
225
|
- test_app/config/application.rb
|
210
226
|
- test_app/config/boot.rb
|
211
227
|
- test_app/config/database.yml
|
212
|
-
- test_app/config/deploy.rb
|
213
228
|
- test_app/config/environment.rb
|
214
229
|
- test_app/config/environments/development.rb
|
215
230
|
- test_app/config/environments/production.rb
|
@@ -218,14 +233,13 @@ files:
|
|
218
233
|
- test_app/config/initializers/inflections.rb
|
219
234
|
- test_app/config/initializers/interpret.rb
|
220
235
|
- test_app/config/initializers/mime_types.rb
|
221
|
-
- test_app/config/initializers/rack_patch.rb
|
222
236
|
- test_app/config/initializers/secret_token.rb
|
223
237
|
- test_app/config/initializers/session_store.rb
|
224
238
|
- test_app/config/locales/en.yml
|
225
239
|
- test_app/config/locales/es.yml
|
226
240
|
- test_app/config/routes.rb
|
227
241
|
- test_app/db/migrate/20110219173536_create_users.rb
|
228
|
-
- test_app/db/migrate/
|
242
|
+
- test_app/db/migrate/20111108094455_create_translations.rb
|
229
243
|
- test_app/db/schema.rb
|
230
244
|
- test_app/db/seeds.rb
|
231
245
|
- test_app/lib/lazy_hash.rb
|
@@ -235,39 +249,7 @@ files:
|
|
235
249
|
- test_app/public/422.html
|
236
250
|
- test_app/public/500.html
|
237
251
|
- test_app/public/favicon.ico
|
238
|
-
- test_app/public/images/a1.gif
|
239
|
-
- test_app/public/images/a10.jpg
|
240
|
-
- test_app/public/images/a16.gif
|
241
|
-
- test_app/public/images/a18.gif
|
242
|
-
- test_app/public/images/a22.gif
|
243
|
-
- test_app/public/images/a26.gif
|
244
|
-
- test_app/public/images/a33.gif
|
245
|
-
- test_app/public/images/a36.gif
|
246
|
-
- test_app/public/images/a38.gif
|
247
|
-
- test_app/public/images/a41.gif
|
248
|
-
- test_app/public/images/a47.gif
|
249
|
-
- test_app/public/images/a50.gif
|
250
|
-
- test_app/public/images/a8.gif
|
251
|
-
- test_app/public/images/abg.gif
|
252
|
-
- test_app/public/images/pic1.jpg
|
253
|
-
- test_app/public/images/pic2.jpg
|
254
|
-
- test_app/public/images/spacer.gif
|
255
|
-
- test_app/public/images/upbg.gif
|
256
|
-
- test_app/public/javascripts/application.js
|
257
|
-
- test_app/public/javascripts/best_in_place.js
|
258
|
-
- test_app/public/javascripts/facebox-1.3/closelabel.png
|
259
|
-
- test_app/public/javascripts/facebox-1.3/facebox.css
|
260
|
-
- test_app/public/javascripts/facebox-1.3/facebox.js
|
261
|
-
- test_app/public/javascripts/facebox-1.3/loading.gif
|
262
|
-
- test_app/public/javascripts/interpret.js
|
263
|
-
- test_app/public/javascripts/rails.js
|
264
252
|
- test_app/public/robots.txt
|
265
|
-
- test_app/public/stylesheets/.gitkeep
|
266
|
-
- test_app/public/stylesheets/default.css
|
267
|
-
- test_app/public/stylesheets/folder.png
|
268
|
-
- test_app/public/stylesheets/interpret_live_edit_style.css
|
269
|
-
- test_app/public/stylesheets/interpret_style.css
|
270
|
-
- test_app/public/stylesheets/private.css
|
271
253
|
- test_app/script/rails
|
272
254
|
- test_app/vendor/plugins/.gitkeep
|
273
255
|
homepage: https://github.com/rogercampos/interpret
|
@@ -284,7 +266,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
284
266
|
version: '0'
|
285
267
|
segments:
|
286
268
|
- 0
|
287
|
-
hash:
|
269
|
+
hash: 980844497
|
288
270
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
289
271
|
none: false
|
290
272
|
requirements:
|
@@ -293,7 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
293
275
|
version: '0'
|
294
276
|
segments:
|
295
277
|
- 0
|
296
|
-
hash:
|
278
|
+
hash: 980844497
|
297
279
|
requirements: []
|
298
280
|
rubyforge_project: interpret
|
299
281
|
rubygems_version: 1.8.10
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<div id="interpret_live_edit">
|
2
|
-
<% if @translation %>
|
3
|
-
<%= form_for @translation, :url => interpret_translation_path(@translation) do |f| %>
|
4
|
-
<%= f.text_area :value, :value => @translation.value %>
|
5
|
-
<br/>
|
6
|
-
<%= f.submit %>
|
7
|
-
<% end %>
|
8
|
-
<% else %>
|
9
|
-
This translation does not exists yet. You should go to the interpret backoffice interaface and create it from there, this functionality is not yet supported by this live edition feature
|
10
|
-
<% end %>
|
11
|
-
</div>
|
@@ -1,56 +0,0 @@
|
|
1
|
-
|
2
|
-
<div id="interpret_container">
|
3
|
-
<% if flash.any? %>
|
4
|
-
<div class="interpret_flash grid_16 <%= flash.keys.first %>">
|
5
|
-
<%= flash[:notice] || flash[:alert] %>
|
6
|
-
</div>
|
7
|
-
<% end %>
|
8
|
-
<div class="menu grid_12">
|
9
|
-
<%= interpret_section_link_to "Overview", interpret_root_path %>
|
10
|
-
|
11
|
-
<% if can? :use, :tools %>
|
12
|
-
| <%= interpret_section_link_to "Tools", interpret_tools_path %>
|
13
|
-
<% end %>
|
14
|
-
|
15
|
-
<% if can? :use, :search %>
|
16
|
-
| <%= interpret_section_link_to "Search", interpret_search_path %>
|
17
|
-
<% end %>
|
18
|
-
|
19
|
-
<% if can? :read, :missing_translations %>
|
20
|
-
| <%= link_to "Missing translations", interpret_missing_translations_path, :class => controller_name == "missing_translations" && action_name == "index" ? "current" : "" %>
|
21
|
-
<% end %>
|
22
|
-
|
23
|
-
<% if can? :read, :stale_translations %>
|
24
|
-
| <%= link_to "Stale translations", interpret_stale_translations_path, :class => controller_name == "missing_translations" && action_name == "stale" ? "current" : "" %>
|
25
|
-
<% end %>
|
26
|
-
|
27
|
-
<% if can? :read, :blank_translations %>
|
28
|
-
| <%= link_to "Blank translations", interpret_blank_translations_path, :class => controller_name == "missing_translations" && action_name == "blank" ? "current" : "" %>
|
29
|
-
<% end %>
|
30
|
-
|
31
|
-
<% if can? :read, :unused_translations %>
|
32
|
-
| <%= link_to "Unused translations", interpret_unused_translations_path, :class => controller_name == "missing_translations" && action_name == "unused" ? "current" : "" %>
|
33
|
-
<% end %>
|
34
|
-
<hr />
|
35
|
-
</div>
|
36
|
-
<div class="menu grid_4" id='languages_nav'>
|
37
|
-
Languages:
|
38
|
-
<% Interpret::Translation.available_locales.each do |locale| %>
|
39
|
-
<% next unless can? :use, :"interpret_in_#{locale}" %>
|
40
|
-
<% opts = {:locale => locale} %>
|
41
|
-
<% opts[:key] = params[:key] if params[:key] %>
|
42
|
-
<% opts[:value] = params[:value] if params[:value] %>
|
43
|
-
<%= link_to locale, opts %>
|
44
|
-
<% end %>
|
45
|
-
<hr />
|
46
|
-
</div>
|
47
|
-
<div class="clearfix"></div>
|
48
|
-
<div id="sidebar" class="grid_3">
|
49
|
-
<%= yield :sidebar %>
|
50
|
-
</div>
|
51
|
-
<div id="main" class="grid_13">
|
52
|
-
<%= yield %>
|
53
|
-
</div>
|
54
|
-
</div>
|
55
|
-
|
56
|
-
<% interpret_parent_layout Interpret.layout %>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'rails/generators/migration'
|
2
|
-
|
3
|
-
module Interpret
|
4
|
-
|
5
|
-
class MigrationGenerator < Rails::Generators::Base
|
6
|
-
include Rails::Generators::Migration
|
7
|
-
source_root File.expand_path("../templates", __FILE__)
|
8
|
-
|
9
|
-
desc "Creates the migration for i18n activerecord backend translations table"
|
10
|
-
|
11
|
-
def self.next_migration_number(dirname)
|
12
|
-
if ActiveRecord::Base.timestamped_migrations
|
13
|
-
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
14
|
-
else
|
15
|
-
"%.3d" % (current_migration_number(dirname) + 1)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def copy_translations_migration
|
20
|
-
migration_template "migration.rb", "db/migrate/interpret_create_translations.rb"
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module Interpret
|
2
|
-
|
3
|
-
class SetupGenerator < Rails::Generators::Base
|
4
|
-
source_root File.expand_path("../../../../public", __FILE__)
|
5
|
-
desc "Copies needed css and js files into your app's public folders"
|
6
|
-
|
7
|
-
def copy_css
|
8
|
-
copy_file "stylesheets/interpret_style.css", "public/stylesheets/interpret_style.css"
|
9
|
-
copy_file "stylesheets/interpret_live_edit_style.css", "public/stylesheets/interpret_live_edit_style.css"
|
10
|
-
end
|
11
|
-
|
12
|
-
def copy_js
|
13
|
-
copy_file "javascripts/interpret.js", "public/javascripts/interpret.js"
|
14
|
-
directory "javascripts/facebox-1.3", "public/javascripts/facebox-1.3"
|
15
|
-
end
|
16
|
-
|
17
|
-
def copy_images
|
18
|
-
copy_file "stylesheets/folder.png", "public/stylesheets/folder.png"
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
data/lib/interpret/capistrano.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
-
namespace :interpret do
|
3
|
-
def rails_env
|
4
|
-
fetch(:rails_env, false) ? "RAILS_ENV=#{fetch(:rails_env)}" : ''
|
5
|
-
end
|
6
|
-
|
7
|
-
def roles
|
8
|
-
fetch(:delayed_job_server_role, :app)
|
9
|
-
end
|
10
|
-
|
11
|
-
desc "Update translations keys in database"
|
12
|
-
task :update, :roles => lambda {roles} do
|
13
|
-
run "cd #{current_path};#{rails_env} rake interpret:update"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
after "deploy:update_code", "interpret:update"
|
18
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class ActionController::Base
|
2
|
-
before_filter :set_interpret_user
|
3
|
-
|
4
|
-
private
|
5
|
-
def set_interpret_user
|
6
|
-
return unless Interpret.live_edit
|
7
|
-
|
8
|
-
if Interpret.current_user && defined?(Interpret.current_user.to_sym)
|
9
|
-
@interpret_user = eval(Interpret.current_user)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
Binary file
|