lit 0.2.6 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +5 -13
  2. data/README.md +93 -12
  3. data/Rakefile +1 -0
  4. data/app/assets/javascripts/lit/application.js +1 -2
  5. data/app/assets/javascripts/lit/{bootstrap.js.coffee → backend/bootstrap.js.coffee} +0 -0
  6. data/app/assets/javascripts/lit/{dashboard.js → backend/dashboard.js} +0 -0
  7. data/app/assets/javascripts/lit/{jquery-te-1.4.0.min.js → backend/jquery-te-1.4.0.min.js} +0 -0
  8. data/app/assets/javascripts/lit/{localizations.js.coffee → backend/localizations.js.coffee} +2 -0
  9. data/app/assets/javascripts/lit/backend/sources.js.coffee +24 -0
  10. data/app/assets/javascripts/lit/lit_frontend.js +103 -0
  11. data/app/assets/javascripts/lit/mousetrap.js +1044 -0
  12. data/app/assets/stylesheets/lit/application.css +7 -1
  13. data/app/assets/stylesheets/lit/{jquery-te-1.4.0.css.scss → backend/jquery-te-1.4.0.css.scss} +0 -0
  14. data/app/assets/stylesheets/lit/lit_frontend.css +86 -0
  15. data/app/controllers/lit/api/v1/base_controller.rb +1 -1
  16. data/app/controllers/lit/application_controller.rb +7 -3
  17. data/app/controllers/lit/concerns/request_info_store.rb +16 -0
  18. data/app/controllers/lit/concerns/request_keys_store.rb +16 -0
  19. data/app/controllers/lit/incomming_localizations_controller.rb +2 -2
  20. data/app/controllers/lit/locales_controller.rb +1 -1
  21. data/app/controllers/lit/localization_keys_controller.rb +22 -9
  22. data/app/controllers/lit/localizations_controller.rb +19 -6
  23. data/app/controllers/lit/sources_controller.rb +11 -1
  24. data/app/helpers/lit/frontend_helper.rb +71 -0
  25. data/app/helpers/lit/localization_keys_helper.rb +5 -0
  26. data/app/helpers/lit/sources_helper.rb +3 -0
  27. data/app/jobs/lit/synchronize_source_job.rb +11 -0
  28. data/app/models/lit/localization.rb +17 -10
  29. data/app/models/lit/localization_key.rb +6 -2
  30. data/app/models/lit/source.rb +4 -3
  31. data/app/views/layouts/lit/application.html.erb +6 -6
  32. data/app/views/lit/incomming_localizations/index.html.erb +22 -17
  33. data/app/views/lit/localization_keys/_localization_row.html.erb +1 -1
  34. data/app/views/lit/localization_keys/index.html.erb +27 -8
  35. data/app/views/lit/localizations/_form.html.erb +5 -5
  36. data/app/views/lit/localizations/_previous_versions_rows.html.erb +1 -1
  37. data/app/views/lit/localizations/edit.js.erb +2 -2
  38. data/app/views/lit/localizations/previous_versions.js.erb +1 -1
  39. data/app/views/lit/localizations/update.js.erb +2 -2
  40. data/config/routes.rb +12 -12
  41. data/db/migrate/20180101010101_lit_create_lit_locales.rb +16 -0
  42. data/db/migrate/20180101010102_lit_create_lit_localization_keys.rb +18 -0
  43. data/db/migrate/20180101010103_lit_create_lit_localizations.rb +24 -0
  44. data/db/migrate/20180101010104_lit_add_is_completed_and_is_starred_to_localization_keys.rb +17 -0
  45. data/db/migrate/20180101010105_lit_add_is_hidden_to_locales.rb +12 -0
  46. data/db/migrate/20180101010106_lit_create_lit_localization_versions.rb +20 -0
  47. data/db/migrate/20180101010107_lit_create_lit_sources.rb +19 -0
  48. data/db/migrate/20180101010108_lit_create_lit_incomming_localizations.rb +34 -0
  49. data/db/migrate/20180101010109_lit_add_sync_complete_to_lit_sources.rb +12 -0
  50. data/lib/generators/lit/install/templates/initializer.rb +17 -6
  51. data/lib/generators/lit/install_generator.rb +0 -7
  52. data/lib/lit.rb +15 -8
  53. data/lib/lit/adapters/hash_storage.rb +4 -0
  54. data/lib/lit/adapters/redis_storage.rb +9 -3
  55. data/lib/lit/cache.rb +126 -70
  56. data/lib/lit/engine.rb +20 -1
  57. data/lib/lit/i18n_backend.rb +66 -26
  58. data/lib/lit/version.rb +1 -1
  59. data/lib/tasks/lit_tasks.rake +21 -3
  60. metadata +67 -43
  61. data/app/assets/stylesheets/lit/dashboard.css +0 -4
  62. data/config/database.yml +0 -8
  63. data/db/migrate/20121103144612_create_lit_locales.rb +0 -9
  64. data/db/migrate/20121103174049_create_lit_localization_keys.rb +0 -10
  65. data/db/migrate/20121103182106_create_lit_localizations.rb +0 -15
  66. data/db/migrate/20121225112100_add_is_completed_and_is_starred_to_localization_keys.rb +0 -6
  67. data/db/migrate/20130511111904_add_is_hidden_to_locales.rb +0 -5
  68. data/db/migrate/20130921071304_create_lit_localization_versions.rb +0 -11
  69. data/db/migrate/20130923162141_create_lit_sources.rb +0 -12
  70. data/db/migrate/20130924151910_create_lit_incomming_localizations.rb +0 -21
@@ -1,9 +0,0 @@
1
- class CreateLitLocales < ActiveRecord::Migration
2
- def change
3
- create_table :lit_locales do |t|
4
- t.string :locale
5
-
6
- t.timestamps
7
- end
8
- end
9
- end
@@ -1,10 +0,0 @@
1
- class CreateLitLocalizationKeys < ActiveRecord::Migration
2
- def change
3
- create_table :lit_localization_keys do |t|
4
- t.string :localization_key
5
-
6
- t.timestamps
7
- end
8
- add_index :lit_localization_keys, :localization_key, :unique=>true
9
- end
10
- end
@@ -1,15 +0,0 @@
1
- class CreateLitLocalizations < ActiveRecord::Migration
2
- def change
3
- create_table :lit_localizations do |t|
4
- t.references :locale
5
- t.references :localization_key
6
- t.text :default_value
7
- t.text :translated_value
8
- t.boolean :is_changed, :default=>false
9
-
10
- t.timestamps
11
- end
12
- add_index :lit_localizations, :locale_id
13
- add_index :lit_localizations, :localization_key_id
14
- end
15
- end
@@ -1,6 +0,0 @@
1
- class AddIsCompletedAndIsStarredToLocalizationKeys < ActiveRecord::Migration
2
- def change
3
- add_column :lit_localization_keys, :is_completed, :boolean, :default=>false
4
- add_column :lit_localization_keys, :is_starred, :boolean, :default=>false
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- class AddIsHiddenToLocales < ActiveRecord::Migration
2
- def change
3
- add_column :lit_locales, :is_hidden, :boolean, :default=>false
4
- end
5
- end
@@ -1,11 +0,0 @@
1
- class CreateLitLocalizationVersions < ActiveRecord::Migration
2
- def change
3
- create_table :lit_localization_versions do |t|
4
- t.text :translated_value
5
- t.references :localization
6
-
7
- t.timestamps
8
- end
9
- add_index :lit_localization_versions, :localization_id
10
- end
11
- end
@@ -1,12 +0,0 @@
1
- class CreateLitSources < ActiveRecord::Migration
2
- def change
3
- create_table :lit_sources do |t|
4
- t.string :identifier
5
- t.string :url
6
- t.string :api_key
7
- t.datetime :last_updated_at
8
-
9
- t.timestamps
10
- end
11
- end
12
- end
@@ -1,21 +0,0 @@
1
- class CreateLitIncommingLocalizations < ActiveRecord::Migration
2
- def change
3
- create_table :lit_incomming_localizations do |t|
4
- t.text :translated_value
5
- t.references :locale
6
- t.references :localization_key
7
- t.references :localization
8
- t.string :locale_str
9
- t.string :localization_key_str
10
- t.references :source
11
- t.integer :incomming_id
12
-
13
- t.timestamps
14
- end
15
- add_index :lit_incomming_localizations, :locale_id
16
- add_index :lit_incomming_localizations, :localization_key_id
17
- add_index :lit_incomming_localizations, :localization_id
18
- add_index :lit_incomming_localizations, :source_id
19
- add_index :lit_incomming_localizations, :incomming_id
20
- end
21
- end