tolk 3.0.2 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/tolk/actions.js +1 -1
- data/app/assets/javascripts/tolk/layout.js +1 -1
- data/app/assets/stylesheets/tolk/screen.scss +432 -0
- data/app/controllers/tolk/application_controller.rb +1 -1
- data/app/views/layouts/tolk/application.html.erb +16 -7
- data/app/views/tolk/_blank_canva.svg +1 -0
- data/app/views/tolk/_empty.svg +1 -0
- data/app/views/tolk/_houra.svg +1 -0
- data/app/views/tolk/_nav.html.erb +26 -0
- data/app/views/tolk/_no_data.svg +1 -0
- data/app/views/tolk/locales/all.html.erb +76 -57
- data/app/views/tolk/locales/index.html.erb +40 -23
- data/app/views/tolk/locales/show.html.erb +58 -45
- data/app/views/tolk/searches/_form.html.erb +1 -1
- data/app/views/tolk/searches/show.html.erb +57 -51
- data/lib/generators/tolk/templates/initializer.erb +1 -0
- data/lib/tolk/config.rb +6 -0
- data/lib/tolk/version.rb +1 -1
- metadata +23 -4
- data/app/assets/stylesheets/tolk/screen.css +0 -401
data/lib/tolk/config.rb
CHANGED
@@ -26,6 +26,10 @@ module Tolk
|
|
26
26
|
# specify line width which Yaml.dump will use to break lines. -1 for not breaking
|
27
27
|
attr_accessor :yaml_line_width
|
28
28
|
|
29
|
+
# specify controller to inherit from to keep Tolk controllers
|
30
|
+
# in the same context than the rest of your app
|
31
|
+
attr_accessor :base_controller
|
32
|
+
|
29
33
|
def reset
|
30
34
|
@exclude_gems_token = false
|
31
35
|
|
@@ -83,6 +87,8 @@ module Tolk
|
|
83
87
|
}
|
84
88
|
|
85
89
|
@yaml_line_width = Psych::Handler::OPTIONS.line_width # Psych::Handler::DumperOptions uses 0 as "default" for unset
|
90
|
+
|
91
|
+
@base_controller = 'ActionController::Base'
|
86
92
|
end
|
87
93
|
end
|
88
94
|
|
data/lib/tolk/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tolk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2018-
|
15
|
+
date: 2018-09-12 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|
@@ -42,6 +42,20 @@ dependencies:
|
|
42
42
|
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: 0.8.6
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: sass
|
47
|
+
requirement: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
type: :runtime
|
53
|
+
prerelease: false
|
54
|
+
version_requirements: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '0'
|
45
59
|
- !ruby/object:Gem::Dependency
|
46
60
|
name: capybara
|
47
61
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,7 +142,7 @@ files:
|
|
128
142
|
- app/assets/javascripts/tolk/libraries.js
|
129
143
|
- app/assets/stylesheets/tolk/application.css
|
130
144
|
- app/assets/stylesheets/tolk/reset.css
|
131
|
-
- app/assets/stylesheets/tolk/screen.
|
145
|
+
- app/assets/stylesheets/tolk/screen.scss
|
132
146
|
- app/controllers/tolk/application_controller.rb
|
133
147
|
- app/controllers/tolk/locales_controller.rb
|
134
148
|
- app/controllers/tolk/searches_controller.rb
|
@@ -137,6 +151,11 @@ files:
|
|
137
151
|
- app/models/tolk/phrase.rb
|
138
152
|
- app/models/tolk/translation.rb
|
139
153
|
- app/views/layouts/tolk/application.html.erb
|
154
|
+
- app/views/tolk/_blank_canva.svg
|
155
|
+
- app/views/tolk/_empty.svg
|
156
|
+
- app/views/tolk/_houra.svg
|
157
|
+
- app/views/tolk/_nav.html.erb
|
158
|
+
- app/views/tolk/_no_data.svg
|
140
159
|
- app/views/tolk/locales/all.html.erb
|
141
160
|
- app/views/tolk/locales/index.html.erb
|
142
161
|
- app/views/tolk/locales/show.atom.builder
|
@@ -179,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
198
|
version: '0'
|
180
199
|
requirements: []
|
181
200
|
rubyforge_project:
|
182
|
-
rubygems_version: 2.7.
|
201
|
+
rubygems_version: 2.7.7
|
183
202
|
signing_key:
|
184
203
|
specification_version: 4
|
185
204
|
summary: Rails engine providing web interface for managing i18n yaml files
|
@@ -1,401 +0,0 @@
|
|
1
|
-
/*-------------------------------------------------
|
2
|
-
Defaults
|
3
|
-
-------------------------------------------------*/
|
4
|
-
|
5
|
-
acronym, abbr {
|
6
|
-
font-variant: small-caps;
|
7
|
-
text-transform: lowercase;
|
8
|
-
font-weight: bold;
|
9
|
-
}
|
10
|
-
|
11
|
-
.center {text-align: center;}
|
12
|
-
.large {font-size: larger;}
|
13
|
-
.small {font-size: smaller;}
|
14
|
-
strong {font-weight: bold;}
|
15
|
-
em {font-style: italic;}
|
16
|
-
|
17
|
-
.clear {clear: both;}
|
18
|
-
.clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
19
|
-
.clearfix { display: inline-block; }
|
20
|
-
.clearfix{ display: block; }
|
21
|
-
|
22
|
-
a {color: #888;}
|
23
|
-
a:hover {color: #000;}
|
24
|
-
|
25
|
-
/*-------------------------------------------------
|
26
|
-
Layout
|
27
|
-
-------------------------------------------------*/
|
28
|
-
|
29
|
-
body {
|
30
|
-
font-family: "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
|
31
|
-
background: #e5e5e5;
|
32
|
-
color: #333;
|
33
|
-
margin: 0;
|
34
|
-
padding: 0;
|
35
|
-
font-size: 14px;
|
36
|
-
line-height: 21px;
|
37
|
-
text-align: left;
|
38
|
-
}
|
39
|
-
|
40
|
-
div#container {
|
41
|
-
margin: 2% 4%;
|
42
|
-
padding: 25px;
|
43
|
-
background: #fff;
|
44
|
-
-webkit-border-radius: 20px;
|
45
|
-
-moz-border-radius: 20px;
|
46
|
-
border-radius: 20px;
|
47
|
-
box-shadow: 0px 0px 15px rgba(00,00,00,0.5);
|
48
|
-
-moz-box-shadow: 0px 0px 15px rgba(00,00,00,0.5);
|
49
|
-
-webkit-box-shadow: 0px 0px 15px rgba(00,00,00,0.5);
|
50
|
-
}
|
51
|
-
|
52
|
-
div#head {
|
53
|
-
margin: -25px -25px 0;
|
54
|
-
background: #111;
|
55
|
-
color: #999;
|
56
|
-
padding: 25px 25px 20px 15px;
|
57
|
-
-webkit-border-top-left-radius: 20px;
|
58
|
-
-webkit-border-top-right-radius: 20px;
|
59
|
-
-moz-border-radius-topleft: 20px;
|
60
|
-
-moz-border-radius-topright: 20px;
|
61
|
-
border-top-left-radius: 20px;
|
62
|
-
border-top-right-radius: 20px;
|
63
|
-
font-size: 18px;
|
64
|
-
}
|
65
|
-
|
66
|
-
div#head a {
|
67
|
-
color: #2fadcf;
|
68
|
-
font-weight: bold;
|
69
|
-
text-decoration: none;
|
70
|
-
}
|
71
|
-
|
72
|
-
div#head span {
|
73
|
-
padding: 8px 6px;
|
74
|
-
margin-right: 1px;
|
75
|
-
}
|
76
|
-
|
77
|
-
div#head span.home {
|
78
|
-
background: #333;
|
79
|
-
}
|
80
|
-
|
81
|
-
div#head span.locale {
|
82
|
-
background: #444;
|
83
|
-
}
|
84
|
-
|
85
|
-
div#head span.locale a {
|
86
|
-
color: #fff;
|
87
|
-
}
|
88
|
-
|
89
|
-
div#head span.locale form.button_to {
|
90
|
-
display: inline;
|
91
|
-
}
|
92
|
-
|
93
|
-
div#head span.locale form.button_to div {
|
94
|
-
display: inline;
|
95
|
-
}
|
96
|
-
|
97
|
-
div#head span.locale form.button_to div input {
|
98
|
-
color: #fff;
|
99
|
-
background: none;
|
100
|
-
border: 0;
|
101
|
-
font-weight: bold;
|
102
|
-
text-decoration: none;
|
103
|
-
font-size: 18px;
|
104
|
-
color: #2fadcf;
|
105
|
-
cursor: pointer;
|
106
|
-
}
|
107
|
-
|
108
|
-
div#head span:first-child {
|
109
|
-
padding-left: 12px;
|
110
|
-
-webkit-border-top-left-radius: 10px;
|
111
|
-
-webkit-border-bottom-left-radius: 10px;
|
112
|
-
-moz-border-radius-topleft: 10px;
|
113
|
-
-moz-border-radius-bottomleft: 10px;
|
114
|
-
border-top-left-radius: 10px;
|
115
|
-
border-bottom-left-radius: 10px;
|
116
|
-
}
|
117
|
-
|
118
|
-
div#head span:last-child {
|
119
|
-
padding-right: 12px;
|
120
|
-
-webkit-border-top-right-radius: 10px;
|
121
|
-
-webkit-border-bottom-right-radius: 10px;
|
122
|
-
-moz-border-radius-topright: 10px;
|
123
|
-
-moz-border-radius-bottomright: 10px;
|
124
|
-
border-top-right-radius: 10px;
|
125
|
-
border-bottom-right-radius: 10px;
|
126
|
-
}
|
127
|
-
|
128
|
-
h2,
|
129
|
-
h3 {
|
130
|
-
font-size: 18px;
|
131
|
-
color: #2fadcf;
|
132
|
-
margin: 25px 0 10px;
|
133
|
-
}
|
134
|
-
|
135
|
-
h2 span,
|
136
|
-
h3 span {
|
137
|
-
font-size: 13px;
|
138
|
-
color: #888;
|
139
|
-
}
|
140
|
-
|
141
|
-
ul.locales {
|
142
|
-
margin: 25px 0;
|
143
|
-
}
|
144
|
-
|
145
|
-
ul.locales li {
|
146
|
-
width: 300px;
|
147
|
-
display: block;
|
148
|
-
float: left;
|
149
|
-
margin: 0 10px 10px 0;
|
150
|
-
/* background: #fff;
|
151
|
-
-webkit-border-radius: 5px;
|
152
|
-
-moz-border-radius: 5px;
|
153
|
-
border-radius: 5px;
|
154
|
-
border: 1px solid #e5e5e5;
|
155
|
-
padding: 5px 10px;*/
|
156
|
-
}
|
157
|
-
|
158
|
-
ul.locales a {
|
159
|
-
font-weight: bold;
|
160
|
-
text-decoration: underline;
|
161
|
-
color: #2fadcf;
|
162
|
-
}
|
163
|
-
|
164
|
-
/*ul.locales li:hover {
|
165
|
-
background: #f5f5f5;
|
166
|
-
border-color: #ccc;
|
167
|
-
}*/
|
168
|
-
|
169
|
-
ul.locales span.missing_translations {
|
170
|
-
color: #fff;
|
171
|
-
font-weight: bold;
|
172
|
-
background: #c00;
|
173
|
-
font-size: 9px;
|
174
|
-
padding: 3px;
|
175
|
-
-webkit-border-radius: 3px;
|
176
|
-
-moz-border-radius: 3px;
|
177
|
-
border-radius: 3px;
|
178
|
-
line-height: 9px;
|
179
|
-
vertical-align: top;
|
180
|
-
display: inline-block;
|
181
|
-
}
|
182
|
-
|
183
|
-
ul.locales span {
|
184
|
-
font-size: 13px;
|
185
|
-
color: #666;
|
186
|
-
}
|
187
|
-
|
188
|
-
div.submit {
|
189
|
-
background: #f5f5f5;
|
190
|
-
margin: 25px -25px -25px;
|
191
|
-
padding: 15px 25px;
|
192
|
-
border-top: 1px dashed #ccc;
|
193
|
-
-webkit-border-bottom-right-radius: 20px;
|
194
|
-
-webkit-border-bottom-left-radius: 20px;
|
195
|
-
-moz-border-radius-bottomright: 20px;
|
196
|
-
-moz-border-radius-bottomleft: 20px;
|
197
|
-
border-bottom-right-radius: 20px;
|
198
|
-
border-bottom-left-radius: 20px;
|
199
|
-
}
|
200
|
-
|
201
|
-
span.updated {
|
202
|
-
font-size: 11px;
|
203
|
-
padding: 1px;
|
204
|
-
background: #ffc;
|
205
|
-
color: #777;
|
206
|
-
margin-bottom: 10px;
|
207
|
-
float: right;
|
208
|
-
}
|
209
|
-
|
210
|
-
div.table_submit {
|
211
|
-
background: #f5f5f5;
|
212
|
-
margin: -25px 0 0;
|
213
|
-
padding: 12px 15px 15px;
|
214
|
-
text-align: left;
|
215
|
-
}
|
216
|
-
|
217
|
-
div.table_submit input.save {
|
218
|
-
border: 0;
|
219
|
-
font-weight: bold;
|
220
|
-
text-decoration: none;
|
221
|
-
font-size: 18px;
|
222
|
-
color: #fff;
|
223
|
-
cursor: pointer;
|
224
|
-
border-radius: 10px;
|
225
|
-
padding: 8px 10px;
|
226
|
-
background: #444;
|
227
|
-
}
|
228
|
-
|
229
|
-
|
230
|
-
div.translations {
|
231
|
-
width: 96%;
|
232
|
-
text-align: center;
|
233
|
-
}
|
234
|
-
|
235
|
-
span.notice {
|
236
|
-
background: #ffc;
|
237
|
-
color: #666;
|
238
|
-
font-size: 12px;
|
239
|
-
padding: 2px 5px;
|
240
|
-
margin: -5px 0 15px;
|
241
|
-
display: inline-block;
|
242
|
-
}
|
243
|
-
|
244
|
-
div.previous {
|
245
|
-
color: #999;
|
246
|
-
margin: 5px 0;
|
247
|
-
padding: 1px 8px 4px;
|
248
|
-
}
|
249
|
-
|
250
|
-
div.updated {
|
251
|
-
background: #ffc;
|
252
|
-
padding: 1px 8px 4px;
|
253
|
-
}
|
254
|
-
|
255
|
-
table.translations div.previous span.key {
|
256
|
-
margin: 0 0 -2px;
|
257
|
-
padding: 0;
|
258
|
-
}
|
259
|
-
|
260
|
-
table.translations div.updated span.key {
|
261
|
-
margin: 0 0 -2px;
|
262
|
-
color: orange !important;
|
263
|
-
padding: 0;
|
264
|
-
}
|
265
|
-
|
266
|
-
/*-------------------------------------------------
|
267
|
-
Translation tables
|
268
|
-
-------------------------------------------------*/
|
269
|
-
|
270
|
-
table.translations {
|
271
|
-
margin: 0 0 25px;
|
272
|
-
width: 100%;
|
273
|
-
text-align: left;
|
274
|
-
}
|
275
|
-
|
276
|
-
table.translations td,
|
277
|
-
table.translations th {
|
278
|
-
font-size: 14px;
|
279
|
-
color: #222;
|
280
|
-
padding: 12px 8px;
|
281
|
-
border-bottom: 1px solid #e5e5e5;
|
282
|
-
vertical-align: top;
|
283
|
-
width: 48%;
|
284
|
-
}
|
285
|
-
|
286
|
-
table.translations th {
|
287
|
-
border-bottom-color: #bbb;
|
288
|
-
font-size: 11px;
|
289
|
-
font-weight: bold;
|
290
|
-
text-transform: uppercase;
|
291
|
-
color: #999;
|
292
|
-
padding-bottom: 2px;
|
293
|
-
}
|
294
|
-
|
295
|
-
table.translations th.actions {
|
296
|
-
width: 50px;
|
297
|
-
}
|
298
|
-
|
299
|
-
table.translations textarea.locale {
|
300
|
-
font-family: "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
|
301
|
-
font-size: 14px;
|
302
|
-
line-height: 21px;
|
303
|
-
color: #222;
|
304
|
-
padding: 1px;
|
305
|
-
width: 100%;
|
306
|
-
height: 42px;
|
307
|
-
}
|
308
|
-
|
309
|
-
table.translations span.key {
|
310
|
-
color: #aaa;
|
311
|
-
font-size: 9px;
|
312
|
-
display: block;
|
313
|
-
}
|
314
|
-
|
315
|
-
table.translations td.translation {
|
316
|
-
padding: 10px 8px;
|
317
|
-
}
|
318
|
-
|
319
|
-
table.translations td.actions {
|
320
|
-
width: 50px;
|
321
|
-
text-align: center;
|
322
|
-
}
|
323
|
-
|
324
|
-
table.translations td.actions a {
|
325
|
-
font-weight: bold;
|
326
|
-
text-decoration: none;
|
327
|
-
}
|
328
|
-
|
329
|
-
table.translations td.actions .warning {
|
330
|
-
font-weight: bold;
|
331
|
-
font-size: 25px;
|
332
|
-
color: orange;
|
333
|
-
padding: 2px 4px;
|
334
|
-
display: none;
|
335
|
-
cursor: help;
|
336
|
-
}
|
337
|
-
|
338
|
-
table.translations tr.active td {
|
339
|
-
background: #edf9fe;
|
340
|
-
}
|
341
|
-
|
342
|
-
table.translations .highlight {
|
343
|
-
background-color: yellow;
|
344
|
-
}
|
345
|
-
|
346
|
-
table.translations .original textarea {
|
347
|
-
display: none;
|
348
|
-
}
|
349
|
-
|
350
|
-
table.translations .original .interpolation,
|
351
|
-
table.translations .original .carriage_return,
|
352
|
-
table.translations .original .boolean {
|
353
|
-
color: #2fadcf;
|
354
|
-
font-family: Courier, monospace;
|
355
|
-
font-weight: bold;
|
356
|
-
cursor: help;
|
357
|
-
}
|
358
|
-
|
359
|
-
table.translations .original .carriage_return:before {
|
360
|
-
content: "¶";
|
361
|
-
}
|
362
|
-
|
363
|
-
/*-------------------------------------------------
|
364
|
-
Pagination
|
365
|
-
-------------------------------------------------*/
|
366
|
-
|
367
|
-
div.paginate {
|
368
|
-
margin: 15px auto 20px;
|
369
|
-
font-size: 12px;
|
370
|
-
color: #777;
|
371
|
-
}
|
372
|
-
|
373
|
-
div.paginate a,
|
374
|
-
div.paginate span {
|
375
|
-
padding: 2px 6px;
|
376
|
-
text-decoration: none;
|
377
|
-
}
|
378
|
-
|
379
|
-
div.paginate a:hover,
|
380
|
-
div.paginate span.current {
|
381
|
-
-webkit-border-radius: 5px;
|
382
|
-
-moz-border-radius: 5px;
|
383
|
-
border-radius: 5px;
|
384
|
-
background: #eee;
|
385
|
-
color: #333;
|
386
|
-
}
|
387
|
-
|
388
|
-
div.paginate .next_page,
|
389
|
-
div.paginate .prev_page {
|
390
|
-
margin: 0 15px;
|
391
|
-
-webkit-border-radius: 5px;
|
392
|
-
-moz-border-radius: 5px;
|
393
|
-
border-radius: 5px;
|
394
|
-
border: 1px solid #bbb;
|
395
|
-
padding: 4px 8px;
|
396
|
-
}
|
397
|
-
|
398
|
-
div.paginate .disabled {
|
399
|
-
color: #ccc;
|
400
|
-
border-color: #eee;
|
401
|
-
}
|