interpret 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. data/.gitignore +11 -0
  2. data/Gemfile +4 -0
  3. data/Rakefile +2 -0
  4. data/app/controllers/interpret/base_controller.rb +10 -0
  5. data/app/controllers/interpret/search_controller.rb +7 -0
  6. data/app/controllers/interpret/tools_controller.rb +39 -0
  7. data/app/controllers/interpret/translations_controller.rb +47 -0
  8. data/app/models/interpret/translation.rb +257 -0
  9. data/app/sweepers/interpret/base_sweeper.rb +14 -0
  10. data/app/sweepers/interpret/translation_sweeper.rb +14 -0
  11. data/app/views/interpret/search/index.html.erb +29 -0
  12. data/app/views/interpret/search/perform.html.erb +38 -0
  13. data/app/views/interpret/tools/index.html.erb +38 -0
  14. data/app/views/interpret/translations/_form.html.erb +5 -0
  15. data/app/views/interpret/translations/_listing.html.erb +22 -0
  16. data/app/views/interpret/translations/edit.html.erb +5 -0
  17. data/app/views/interpret/translations/index.html.erb +28 -0
  18. data/app/views/layouts/interpret.html.erb +41 -0
  19. data/config/routes.rb +20 -0
  20. data/interpret.gemspec +30 -0
  21. data/lib/generators/interpret/migration_generator.rb +25 -0
  22. data/lib/generators/interpret/setup_generator.rb +21 -0
  23. data/lib/generators/interpret/templates/migration.rb +16 -0
  24. data/lib/generators/interpret/views_generator.rb +16 -0
  25. data/lib/interpret/capistrano.rb +15 -0
  26. data/lib/interpret/engine.rb +23 -0
  27. data/lib/interpret/helpers.rb +45 -0
  28. data/lib/interpret/lazy_hash.rb +21 -0
  29. data/lib/interpret/logger.rb +7 -0
  30. data/lib/interpret/version.rb +3 -0
  31. data/lib/interpret.rb +30 -0
  32. data/lib/tasks/interpret.rake +11 -0
  33. data/public/javascripts/jquery.purr.js +180 -0
  34. data/public/stylesheets/folder.png +0 -0
  35. data/public/stylesheets/interpret_style.css +542 -0
  36. data/test_app/Gemfile +11 -0
  37. data/test_app/README +256 -0
  38. data/test_app/Rakefile +7 -0
  39. data/test_app/app/controllers/application_controller.rb +3 -0
  40. data/test_app/app/controllers/pages_controller.rb +3 -0
  41. data/test_app/app/helpers/application_helper.rb +2 -0
  42. data/test_app/app/sweepers/page_sweeper.rb +12 -0
  43. data/test_app/app/views/layouts/application.html.erb +15 -0
  44. data/test_app/app/views/pages/contact.html.haml +8 -0
  45. data/test_app/app/views/pages/index.html.haml +9 -0
  46. data/test_app/config/application.rb +42 -0
  47. data/test_app/config/boot.rb +13 -0
  48. data/test_app/config/database.yml +23 -0
  49. data/test_app/config/environment.rb +5 -0
  50. data/test_app/config/environments/development.rb +27 -0
  51. data/test_app/config/environments/production.rb +51 -0
  52. data/test_app/config/environments/test.rb +35 -0
  53. data/test_app/config/initializers/backtrace_silencers.rb +7 -0
  54. data/test_app/config/initializers/inflections.rb +10 -0
  55. data/test_app/config/initializers/interpret.rb +2 -0
  56. data/test_app/config/initializers/mime_types.rb +5 -0
  57. data/test_app/config/initializers/secret_token.rb +7 -0
  58. data/test_app/config/initializers/session_store.rb +8 -0
  59. data/test_app/config/locales/ca.yml +6 -0
  60. data/test_app/config/locales/es.yml +48 -0
  61. data/test_app/config/routes.rb +4 -0
  62. data/test_app/config.ru +4 -0
  63. data/test_app/db/migrate/20110209185258_interpret_create_translations.rb +16 -0
  64. data/test_app/db/schema.rb +23 -0
  65. data/test_app/db/seeds.rb +0 -0
  66. data/test_app/lib/lazy_hash.rb +22 -0
  67. data/test_app/lib/tasks/.gitkeep +0 -0
  68. data/test_app/lib/tasks/setup.rake +19 -0
  69. data/test_app/public/404.html +26 -0
  70. data/test_app/public/422.html +26 -0
  71. data/test_app/public/500.html +26 -0
  72. data/test_app/public/favicon.ico +0 -0
  73. data/test_app/public/index.html +29 -0
  74. data/test_app/public/javascripts/application.js +2 -0
  75. data/test_app/public/javascripts/best_in_place.js +456 -0
  76. data/test_app/public/javascripts/controls.js +965 -0
  77. data/test_app/public/javascripts/dragdrop.js +974 -0
  78. data/test_app/public/javascripts/effects.js +1123 -0
  79. data/test_app/public/javascripts/jquery.purr.js +180 -0
  80. data/test_app/public/javascripts/prototype.js +6001 -0
  81. data/test_app/public/javascripts/rails.js +134 -0
  82. data/test_app/public/robots.txt +5 -0
  83. data/test_app/public/stylesheets/.gitkeep +0 -0
  84. data/test_app/public/stylesheets/folder.png +0 -0
  85. data/test_app/public/stylesheets/interpret_style.css +530 -0
  86. data/test_app/script/rails +6 -0
  87. data/test_app/vendor/plugins/.gitkeep +0 -0
  88. metadata +262 -0
@@ -0,0 +1,542 @@
1
+ /*
2
+ 960 Grid System ~ Core CSS.
3
+ Learn more ~ http://960.gs/
4
+
5
+ Licensed under GPL and MIT.
6
+ */
7
+
8
+ /* =Containers
9
+ --------------------------------------------------------------------------------*/
10
+
11
+ #container
12
+ {
13
+ width: 92%;
14
+ margin-left: 4%;
15
+ margin-right: 4%;
16
+ }
17
+
18
+ /* =Grid >> Global
19
+ --------------------------------------------------------------------------------*/
20
+
21
+ .grid_1,
22
+ .grid_2,
23
+ .grid_3,
24
+ .grid_4,
25
+ .grid_5,
26
+ .grid_6,
27
+ .grid_7,
28
+ .grid_8,
29
+ .grid_9,
30
+ .grid_10,
31
+ .grid_11,
32
+ .grid_12,
33
+ .grid_13,
34
+ .grid_14,
35
+ .grid_15,
36
+ .grid_16
37
+ {
38
+ display: inline;
39
+ float: left;
40
+ margin-left: 1%;
41
+ margin-right: 1%;
42
+ }
43
+
44
+ #container .grid_4
45
+ {
46
+ width: 23%;
47
+ }
48
+
49
+ #container .grid_8
50
+ {
51
+ width: 48%;
52
+ }
53
+
54
+ #container .grid_12
55
+ {
56
+ width: 73%;
57
+ }
58
+
59
+ #container .grid_16
60
+ {
61
+ width: 98%;
62
+ }
63
+
64
+ /* =Grid >> Children (Alpha ~ First, Omega ~ Last)
65
+ --------------------------------------------------------------------------------*/
66
+
67
+ .alpha
68
+ {
69
+ margin-left: 0;
70
+ }
71
+
72
+ .omega
73
+ {
74
+ margin-right: 0;
75
+ }
76
+
77
+
78
+ /* =Grid >> 16 Columns
79
+ --------------------------------------------------------------------------------*/
80
+
81
+ #container .grid_1
82
+ {
83
+ width: 4.25%;
84
+ }
85
+
86
+ #container .grid_2
87
+ {
88
+ width: 10.5%;
89
+ }
90
+
91
+ #container .grid_3
92
+ {
93
+ width: 16.75%;
94
+ }
95
+
96
+ #container .grid_5
97
+ {
98
+ width: 29.25%;
99
+ }
100
+
101
+ #container .grid_6
102
+ {
103
+ width: 35.5%;
104
+ }
105
+
106
+ #container .grid_7
107
+ {
108
+ width: 41.75%;
109
+ }
110
+
111
+ #container .grid_9
112
+ {
113
+ width: 54.25%;
114
+ }
115
+
116
+ #container .grid_10
117
+ {
118
+ width: 60.5%;
119
+ }
120
+
121
+ #container .grid_11
122
+ {
123
+ width: 66.75%;
124
+ }
125
+
126
+ #container .grid_13
127
+ {
128
+ width: 79.25%;
129
+ }
130
+
131
+ #container .grid_14
132
+ {
133
+ width: 85.5%;
134
+ }
135
+
136
+ #container .grid_15
137
+ {
138
+ width: 91.75%;
139
+ }
140
+
141
+ /* =Prefix Extra Space >> Global
142
+ --------------------------------------------------------------------------------*/
143
+
144
+ #container .prefix_4
145
+ {
146
+ padding-left: 25%;
147
+ }
148
+
149
+ #container .prefix_8
150
+ {
151
+ padding-left: 50%;
152
+ }
153
+
154
+ #container .prefix_12
155
+ {
156
+ padding-left: 75%;
157
+ }
158
+
159
+ /* =Prefix Extra Space >> 16 Columns
160
+ --------------------------------------------------------------------------------*/
161
+
162
+ #container .prefix_1
163
+ {
164
+ padding-left: 6.25%;
165
+ }
166
+
167
+ #container .prefix_2
168
+ {
169
+ padding-left: 12.5%;
170
+ }
171
+
172
+ #container .prefix_3
173
+ {
174
+ padding-left: 18.75%;
175
+ }
176
+
177
+ #container .prefix_5
178
+ {
179
+ padding-left: 31.25%;
180
+ }
181
+
182
+ #container .prefix_6
183
+ {
184
+ padding-left: 37.5%;
185
+ }
186
+
187
+ #container .prefix_7
188
+ {
189
+ padding-left: 43.75%;
190
+ }
191
+
192
+ #container .prefix_9
193
+ {
194
+ padding-left: 56.25%;
195
+ }
196
+
197
+ #container .prefix_10
198
+ {
199
+ padding-left: 62.5%;
200
+ }
201
+
202
+ #container .prefix_11
203
+ {
204
+ padding-left: 68.75%;
205
+ }
206
+
207
+ #container .prefix_13
208
+ {
209
+ padding-left: 81.25%;
210
+ }
211
+
212
+ #container .prefix_14
213
+ {
214
+ padding-left: 87.5%;
215
+ }
216
+
217
+ #container .prefix_15
218
+ {
219
+ padding-left: 93.75%;
220
+ }
221
+
222
+ /* =Suffix Extra Space >> Global
223
+ --------------------------------------------------------------------------------*/
224
+
225
+ #container .suffix_4
226
+ {
227
+ padding-right: 25%;
228
+ }
229
+
230
+ #container .suffix_8
231
+ {
232
+ padding-right: 50%;
233
+ }
234
+
235
+ #container .suffix_12
236
+ {
237
+ padding-right: 75%;
238
+ }
239
+
240
+
241
+ /* =Suffix Extra Space >> 16 Columns
242
+ --------------------------------------------------------------------------------*/
243
+
244
+ #container .suffix_1
245
+ {
246
+ padding-right: 6.25%;
247
+ }
248
+
249
+ #container .suffix_2
250
+ {
251
+ padding-right: 16.5%;
252
+ }
253
+
254
+ #container .suffix_3
255
+ {
256
+ padding-right: 18.75%;
257
+ }
258
+
259
+ #container .suffix_5
260
+ {
261
+ padding-right: 31.25%;
262
+ }
263
+
264
+ #container .suffix_6
265
+ {
266
+ padding-right: 37.5%;
267
+ }
268
+
269
+ #container .suffix_7
270
+ {
271
+ padding-right: 43.75%;
272
+ }
273
+
274
+ #container .suffix_9
275
+ {
276
+ padding-right: 56.25%;
277
+ }
278
+
279
+ #container .suffix_10
280
+ {
281
+ padding-right: 62.5%;
282
+ }
283
+
284
+ #container .suffix_11
285
+ {
286
+ padding-right: 68.75%;
287
+ }
288
+
289
+ #container .suffix_13
290
+ {
291
+ padding-right: 81.25%;
292
+ }
293
+
294
+ #container .suffix_14
295
+ {
296
+ padding-right: 87.5%;
297
+ }
298
+
299
+ #container .suffix_15
300
+ {
301
+ padding-right: 93.75%;
302
+ }
303
+
304
+ /* =Clear Floated Elements
305
+ --------------------------------------------------------------------------------*/
306
+
307
+ /* http://sonspring.com/journal/clearing-floats */
308
+
309
+ html body * span.clear,
310
+ html body * div.clear,
311
+ html body * li.clear,
312
+ html body * dd.clear
313
+ {
314
+ background: none;
315
+ border: 0;
316
+ clear: both;
317
+ display: block;
318
+ float: none;
319
+ font-size: 0;
320
+ list-style: none;
321
+ margin: 0;
322
+ padding: 0;
323
+ overflow: hidden;
324
+ visibility: hidden;
325
+ width: 0;
326
+ height: 0;
327
+ }
328
+
329
+ /* http://www.positioniseverything.net/easyclearing.html */
330
+
331
+ .clearfix:after
332
+ {
333
+ clear: both;
334
+ content: '.';
335
+ display: block;
336
+ visibility: hidden;
337
+ height: 0;
338
+ }
339
+
340
+ .clearfix
341
+ {
342
+ display: inline-block;
343
+ }
344
+
345
+ * html .clearfix
346
+ {
347
+ height: 1%;
348
+ }
349
+
350
+ .clearfix
351
+ {
352
+ display: block;
353
+ }
354
+
355
+ body {
356
+ font-family: Helvetica;
357
+ }
358
+
359
+ #container {
360
+ border: .3em solid #333;
361
+ }
362
+
363
+ #header {
364
+ padding: 0 1em;
365
+ margin-top: 1em;
366
+ color: #FFF;
367
+ background-color: #666;
368
+ }
369
+
370
+ table {
371
+ border-collapse:collapse;
372
+ width: 100%;
373
+ border-right: 1px solid #444;
374
+ border-left: 1px solid #444;
375
+ }
376
+
377
+ td, th {
378
+ color: #363636;
379
+ padding: .4em;
380
+ }
381
+
382
+ td:first-child, td:first-child {
383
+ width: 50%;
384
+ }
385
+
386
+ td:last-child, td:last-child {
387
+ width: 50%;
388
+ }
389
+
390
+ tr {
391
+ border-bottom:1px solid gray;
392
+ cursor: hand;
393
+ cursor: pointer;
394
+ }
395
+
396
+
397
+ tr:hover {
398
+ background-color: #DDD;
399
+ height: 6.5em;
400
+ -moz-transition: background .4s linear;
401
+ -o-transition: background .4s linear;
402
+ -webkit-transition: background .4s linear;
403
+ }
404
+
405
+ tr.header {
406
+ background-color: #555;
407
+ color: white;
408
+ height: 2em;
409
+ cursor: default;
410
+ }
411
+ tr.header:hover {
412
+ background: #555;
413
+ -moz-transition: none;
414
+ -o-transition: none;
415
+ -webkit-transition: none;
416
+ height: 2em;
417
+ }
418
+ tr.header th {
419
+ color: #EEE;
420
+ }
421
+
422
+ tbody td a {
423
+ color:#363636;
424
+ text-decoration:none;
425
+ }
426
+
427
+ .menu {
428
+ margin-top: 10px;
429
+ }
430
+
431
+ .menu a.current {
432
+ font-weight: bold;
433
+ }
434
+
435
+ /* Search Page */
436
+
437
+ #search {
438
+ border: 1px solid #CCC;
439
+ padding-left: 3em;
440
+ }
441
+ #search label {
442
+ font-size: 1.4em;
443
+ }
444
+
445
+ #search input {
446
+ width: 40%;
447
+ font-size: 1.2em;
448
+ height: 2em;
449
+ margin: 1em 0;
450
+ border: .2em solid #CCC;
451
+ padding-left: .4em;
452
+ }
453
+
454
+ #search input:focus {
455
+ border: .2em solid #555;
456
+ }
457
+
458
+ #search input[type="submit"] {
459
+ width: 15em;
460
+ margin-top: 2em;
461
+ margin-left: 4%;
462
+ }
463
+
464
+ #search input[type="submit"]:hover {
465
+ background-color: #444;
466
+ color: #FFF;
467
+ cursor: hand;
468
+ cursor: pointer;
469
+ }
470
+
471
+ /* Sidebar for Search page */
472
+
473
+ #side_search {
474
+ border: 1px solid #CCC;
475
+ padding: .4em 0 .4em .8em;
476
+ }
477
+ #side_search label {
478
+ font-size: .8em;
479
+ }
480
+
481
+ #side_search input {
482
+ width: 90%;
483
+ font-size: .9em;
484
+ height: 1.5em;
485
+ margin: .5em 0;
486
+ border: .2em solid #CCC;
487
+ padding: .2em;
488
+ }
489
+
490
+ #side_search input:focus {
491
+ border: .2em solid #555;
492
+ }
493
+
494
+ #side_search input[type="submit"] {
495
+ width: 94%;
496
+ margin-top: 1.2em;
497
+ height: 2em;
498
+ }
499
+
500
+ #side_search input[type="submit"]:hover {
501
+ background-color: #444;
502
+ color: #FFF;
503
+ cursor: hand;
504
+ cursor: pointer;
505
+ }
506
+
507
+ .best_in_place textarea {
508
+ width: 100%;
509
+ height: 6em;
510
+ border: transparent;
511
+ font-size: .9em;
512
+ }
513
+
514
+ #tree_sidebar ul{
515
+ margin: 0;
516
+ padding: .4em;
517
+ }
518
+ #tree_sidebar li {
519
+ list-style-image: url("/stylesheets/plus_icon.gif");
520
+ font-weight: normal;
521
+ }
522
+
523
+
524
+ #tree_sidebar li.current {
525
+ list-style-image: url("/stylesheets/minus_icon.gif");
526
+ }
527
+
528
+ #tree_sidebar li.current {
529
+ font-weight: bold;
530
+ }
531
+
532
+ #tree_sidebar a {
533
+ text-decoration: none;
534
+ color: #222;
535
+ }
536
+ #tree_sidebar a:hover {
537
+ text-decoration: underline;
538
+ }
539
+
540
+ #loading_sidebar {
541
+ display: none;
542
+ }
data/test_app/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'rails', '~> 3.0.0'
4
+ gem 'interpret', :path => ".."
5
+ gem 'haml-rails'
6
+
7
+ group :development, :test do
8
+ gem 'sqlite3-ruby', :require => 'sqlite3'
9
+ end
10
+
11
+