i18nline 0.0.2.alpha

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.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +34 -0
  3. data/app/assets/javascripts/i18nline/application.js +15 -0
  4. data/app/assets/javascripts/i18nline_to_host.js +7 -0
  5. data/app/assets/stylesheets/i18nline/_base.css +15 -0
  6. data/app/assets/stylesheets/i18nline/application.css +13 -0
  7. data/app/assets/stylesheets/i18nline_to_host.css +3 -0
  8. data/app/controllers/i18nline/application_controller.rb +13 -0
  9. data/app/controllers/i18nline/translations_controller.rb +95 -0
  10. data/app/helpers/i18nline/application_helper.rb +4 -0
  11. data/app/helpers/i18nline/translations_helper.rb +4 -0
  12. data/app/models/i18nline/translation.rb +55 -0
  13. data/app/views/i18nline/translations/_search_form.html.erb +26 -0
  14. data/app/views/i18nline/translations/edit_key.html.erb +56 -0
  15. data/app/views/i18nline/translations/index.html.erb +31 -0
  16. data/app/views/layouts/i18nline/application.html.erb +18 -0
  17. data/config/initializers/kaminari_config.rb +10 -0
  18. data/config/initializers/locale.rb +25 -0
  19. data/config/routes.rb +6 -0
  20. data/db/migrate/20131112155848_create_i18nline_translations.rb +18 -0
  21. data/lib/generators/i18nline/install_generator.rb +12 -0
  22. data/lib/generators/i18nline/templates/config/initializers/i18nline.rb +21 -0
  23. data/lib/i18nline/action_view_extension.rb +40 -0
  24. data/lib/i18nline/engine.rb +5 -0
  25. data/lib/i18nline/railtie.rb +10 -0
  26. data/lib/i18nline/version.rb +3 -0
  27. data/lib/i18nline.rb +28 -0
  28. data/lib/tasks/i18nline_tasks.rake +4 -0
  29. data/test/dummy/README.rdoc +28 -0
  30. data/test/dummy/Rakefile +6 -0
  31. data/test/dummy/app/assets/javascripts/application.js +15 -0
  32. data/test/dummy/app/assets/javascripts/hello.js +2 -0
  33. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  34. data/test/dummy/app/assets/stylesheets/hello.css +4 -0
  35. data/test/dummy/app/controllers/application_controller.rb +26 -0
  36. data/test/dummy/app/controllers/hello_controller.rb +11 -0
  37. data/test/dummy/app/helpers/application_helper.rb +2 -0
  38. data/test/dummy/app/helpers/hello_helper.rb +2 -0
  39. data/test/dummy/app/views/hello/hello.html.erb +11 -0
  40. data/test/dummy/app/views/layouts/application.html.erb +15 -0
  41. data/test/dummy/bin/bundle +3 -0
  42. data/test/dummy/bin/rails +4 -0
  43. data/test/dummy/bin/rake +4 -0
  44. data/test/dummy/config/application.rb +23 -0
  45. data/test/dummy/config/boot.rb +5 -0
  46. data/test/dummy/config/database.yml +25 -0
  47. data/test/dummy/config/environment.rb +5 -0
  48. data/test/dummy/config/environments/development.rb +29 -0
  49. data/test/dummy/config/environments/production.rb +80 -0
  50. data/test/dummy/config/environments/test.rb +36 -0
  51. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  52. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  53. data/test/dummy/config/initializers/i18nline.rb +21 -0
  54. data/test/dummy/config/initializers/inflections.rb +16 -0
  55. data/test/dummy/config/initializers/mime_types.rb +5 -0
  56. data/test/dummy/config/initializers/secret_token.rb +12 -0
  57. data/test/dummy/config/initializers/session_store.rb +3 -0
  58. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  59. data/test/dummy/config/locales/en.yml +29 -0
  60. data/test/dummy/config/routes.rb +9 -0
  61. data/test/dummy/config.ru +4 -0
  62. data/test/dummy/db/development.sqlite3 +0 -0
  63. data/test/dummy/db/schema.rb +28 -0
  64. data/test/dummy/db/test.sqlite3 +0 -0
  65. data/test/dummy/log/development.log +30443 -0
  66. data/test/dummy/log/test.log +17 -0
  67. data/test/dummy/public/404.html +58 -0
  68. data/test/dummy/public/422.html +58 -0
  69. data/test/dummy/public/500.html +57 -0
  70. data/test/dummy/public/favicon.ico +0 -0
  71. data/test/dummy/test/helpers/hello_helper_test.rb +4 -0
  72. data/test/dummy/tmp/cache/assets/development/sprockets/0f717e3c4863aa83b5ef697e89d0efa0 +0 -0
  73. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  74. data/test/dummy/tmp/cache/assets/development/sprockets/14a79238d484a545d971e3d941fe86e4 +0 -0
  75. data/test/dummy/tmp/cache/assets/development/sprockets/1fed974ece9b46e9543a13bd2cfd39c6 +0 -0
  76. data/test/dummy/tmp/cache/assets/development/sprockets/219e4ef52e71a2dd3142d36271626492 +0 -0
  77. data/test/dummy/tmp/cache/assets/development/sprockets/28cbea362ca86359d6a456435223469f +0 -0
  78. data/test/dummy/tmp/cache/assets/development/sprockets/29331726baea36717bf28565c0be1881 +0 -0
  79. data/test/dummy/tmp/cache/assets/development/sprockets/29b9855933ef5ef7acb1d219e791dc2a +0 -0
  80. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  81. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  82. data/test/dummy/tmp/cache/assets/development/sprockets/3c733f688711d6713374183251bc756e +0 -0
  83. data/test/dummy/tmp/cache/assets/development/sprockets/4584795e7f513db14ffca10dab44759e +0 -0
  84. data/test/dummy/tmp/cache/assets/development/sprockets/54cc037ce34a10f6cb709215e938d464 +0 -0
  85. data/test/dummy/tmp/cache/assets/development/sprockets/628fc32a4e0873a940ebf8a823e19ff7 +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sprockets/637e3c52efb900d9d1a7e9be4606c8e0 +0 -0
  87. data/test/dummy/tmp/cache/assets/development/sprockets/68dc686a51587b32dfe7df0ed46af6e5 +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sprockets/68ec19b2e986f843a7153c1c4e947469 +0 -0
  89. data/test/dummy/tmp/cache/assets/development/sprockets/72a227156d935c44e2aad8718b3952fb +0 -0
  90. data/test/dummy/tmp/cache/assets/development/sprockets/75609286c4c1330bd547dae66258418b +0 -0
  91. data/test/dummy/tmp/cache/assets/development/sprockets/8b4ee98cc6fbdab0922b4e98c2f95b4b +0 -0
  92. data/test/dummy/tmp/cache/assets/development/sprockets/8c166e9c73eb969d1fffacccbebb7a28 +0 -0
  93. data/test/dummy/tmp/cache/assets/development/sprockets/8d41b05a7a0374a80a66fecb003b19fa +0 -0
  94. data/test/dummy/tmp/cache/assets/development/sprockets/90b42249c96ca020cc4d4e5d209e3662 +0 -0
  95. data/test/dummy/tmp/cache/assets/development/sprockets/98cb4932cde5ab6aac080dfe2c1a666c +0 -0
  96. data/test/dummy/tmp/cache/assets/development/sprockets/9bdaf3e65b045b8b71837f5662d72c5a +0 -0
  97. data/test/dummy/tmp/cache/assets/development/sprockets/af81f90be8ad8a467e0198c5dae0bce6 +0 -0
  98. data/test/dummy/tmp/cache/assets/development/sprockets/b009f80f9687a780c4fab949cb1bcc60 +0 -0
  99. data/test/dummy/tmp/cache/assets/development/sprockets/bd646ad5989b27aa4beddd353406e7c2 +0 -0
  100. data/test/dummy/tmp/cache/assets/development/sprockets/c4f0ac344bd4304d32c569c9d1b50912 +0 -0
  101. data/test/dummy/tmp/cache/assets/development/sprockets/c50a18c681d1e0b8bdc1d2f4569776ca +0 -0
  102. data/test/dummy/tmp/cache/assets/development/sprockets/c5d518b12d9d712aa81c6c98a57ad3b5 +0 -0
  103. data/test/dummy/tmp/cache/assets/development/sprockets/cfea650552ed221f83ea2c8fc3198c53 +0 -0
  104. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  105. data/test/dummy/tmp/cache/assets/development/sprockets/d3db0fcbbd3e669299cb370b3eba8a3f +0 -0
  106. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  107. data/test/dummy/tmp/cache/assets/development/sprockets/e27275f4020fd1fc40de79a1e5db4c96 +0 -0
  108. data/test/dummy/tmp/cache/assets/development/sprockets/e5eea083daff4fcf6e9167de82c0ee77 +0 -0
  109. data/test/dummy/tmp/cache/assets/development/sprockets/f0bca3bde3594952f22b26df6fea76a8 +0 -0
  110. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  111. data/test/helpers/i18nline/translations_helper_test.rb +6 -0
  112. data/test/i18nline_test.rb +7 -0
  113. data/test/integration/navigation_test.rb +10 -0
  114. data/test/test_helper.rb +15 -0
  115. metadata +313 -0
@@ -0,0 +1,17 @@
1
+  (0.4ms) begin transaction
2
+ ------------------------
3
+ I18nlineTest: test_truth
4
+ ------------------------
5
+  (0.1ms) rollback transaction
6
+  (145.7ms) CREATE TABLE "i18nline_translations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "locale" varchar(255), "key" varchar(255), "value" text, "interpolations" text, "is_proc" boolean DEFAULT 'f', "created_at" datetime, "updated_at" datetime) 
7
+  (148.6ms) CREATE UNIQUE INDEX "index_i18nline_translations_on_locale_and_key" ON "i18nline_translations" ("locale", "key")
8
+  (148.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
9
+  (148.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
10
+  (0.1ms) SELECT version FROM "schema_migrations"
11
+  (137.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20131112155848')
12
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
13
+  (0.4ms) begin transaction
14
+ ------------------------
15
+ I18nlineTest: test_truth
16
+ ------------------------
17
+  (0.1ms) rollback transaction
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/404.html -->
52
+ <div class="dialog">
53
+ <h1>The page you were looking for doesn't exist.</h1>
54
+ <p>You may have mistyped the address or the page may have moved.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/422.html -->
52
+ <div class="dialog">
53
+ <h1>The change you wanted was rejected.</h1>
54
+ <p>Maybe you tried to change something you didn't have access to.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -0,0 +1,57 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/500.html -->
52
+ <div class="dialog">
53
+ <h1>We're sorry, but something went wrong.</h1>
54
+ </div>
55
+ <p>If you are the application owner check the logs for more information.</p>
56
+ </body>
57
+ </html>
File without changes
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class HelloHelperTest < ActionView::TestCase
4
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module I18nline
4
+ class TranslationsHelperTest < ActionView::TestCase
5
+ end
6
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class I18nlineTest < ActiveSupport::TestCase
4
+ test "truth" do
5
+ assert_kind_of Module, I18nline
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ require 'test_helper'
2
+
3
+ class NavigationTest < ActionDispatch::IntegrationTest
4
+ fixtures :all
5
+
6
+ # test "the truth" do
7
+ # assert true
8
+ # end
9
+ end
10
+
@@ -0,0 +1,15 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
+ end