lit 1.1.0 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +47 -31
- data/app/assets/javascripts/lit/backend/localizations.js.coffee +13 -6
- data/app/assets/stylesheets/lit/application.css +16 -13
- data/app/assets/stylesheets/lit/lit_frontend.css +16 -15
- data/app/controllers/lit/api/v1/localizations_controller.rb +9 -17
- data/app/controllers/lit/cloud_translations_controller.rb +1 -1
- data/app/controllers/lit/concerns/request_info_store.rb +5 -14
- data/app/controllers/lit/concerns/request_keys_store.rb +5 -13
- data/app/controllers/lit/localization_keys_controller.rb +38 -38
- data/app/controllers/lit/request_info_store.rb +10 -0
- data/app/controllers/lit/request_keys_store.rb +10 -0
- data/app/helpers/lit/frontend_helper.rb +65 -65
- data/app/models/lit/base.rb +1 -1
- data/app/models/lit/incomming_localization.rb +13 -27
- data/app/models/lit/localization.rb +6 -14
- data/app/services/remote_interactor_service.rb +2 -1
- data/app/services/synchronize_source_service.rb +4 -8
- data/app/views/lit/localization_keys/_localizations_list.html.erb +18 -10
- data/app/views/lit/localization_keys/batch_touch.js.erb +1 -0
- data/app/views/lit/localizations/update.js.erb +1 -1
- data/config/routes.rb +1 -0
- data/lib/generators/lit/install/templates/{initializer.rb → initializer.erb} +6 -1
- data/lib/generators/lit/install_generator.rb +8 -10
- data/lib/lit/adapters/hash_storage.rb +2 -2
- data/lib/lit/adapters/redis_storage.rb +8 -11
- data/lib/lit/adapters.rb +2 -0
- data/lib/lit/cache.rb +23 -2
- data/lib/lit/cloud_translation/providers/google.rb +25 -7
- data/lib/lit/engine.rb +4 -6
- data/lib/lit/export.rb +5 -11
- data/lib/lit/i18n_backend.rb +24 -0
- data/lib/lit/import.rb +4 -4
- data/lib/lit/middleware.rb +29 -0
- data/lib/lit/rails.rb +1 -0
- data/lib/lit/railtie.rb +6 -7
- data/lib/lit/services/localization_keys_to_hash_service.rb +18 -15
- data/lib/lit/version.rb +15 -1
- data/lib/lit.rb +11 -11
- metadata +13 -22
@@ -45,13 +45,10 @@ module Lit::CloudTranslation::Providers
|
|
45
45
|
# end
|
46
46
|
class Google < Base
|
47
47
|
def translate(text:, from: nil, to:, **opts)
|
48
|
-
|
49
|
-
::Google::Cloud::Translate.new(project_id: config.keyfile_hash['project_id'],
|
50
|
-
credentials: config.keyfile_hash)
|
51
|
-
result = @client.translate(sanitize_text(text), from: from, to: to, **opts)
|
48
|
+
result = client.translate(sanitize_text(text), from: from, to: to, **opts)
|
52
49
|
unsanitize_text(
|
53
50
|
case result
|
54
|
-
when
|
51
|
+
when translation_class then result.text
|
55
52
|
when Array then result.map(&:text)
|
56
53
|
end
|
57
54
|
)
|
@@ -67,6 +64,27 @@ module Lit::CloudTranslation::Providers
|
|
67
64
|
|
68
65
|
private
|
69
66
|
|
67
|
+
def client
|
68
|
+
@client ||= begin
|
69
|
+
args = {
|
70
|
+
project_id: config.keyfile_hash['project_id'], credentials: config.keyfile_hash,
|
71
|
+
version: :v2
|
72
|
+
}
|
73
|
+
if Gem.loaded_specs['google-cloud-translate'].version < Gem::Version.create('2.0')
|
74
|
+
args = args.tap { |hs| hs.delete(:version) }
|
75
|
+
end
|
76
|
+
::Google::Cloud::Translate.new(**args)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def translation_class
|
81
|
+
if Gem.loaded_specs['google-cloud-translate'].version < Gem::Version.create('2.0')
|
82
|
+
::Google::Cloud::Translate::Translation
|
83
|
+
else
|
84
|
+
::Google::Cloud::Translate::V2::Translation
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
70
88
|
def default_config
|
71
89
|
if ENV['GOOGLE_TRANSLATE_API_KEYFILE'].blank?
|
72
90
|
env_keys = ENV.keys.grep(/\AGOOGLE_TRANSLATE_API_/)
|
@@ -93,7 +111,7 @@ module Lit::CloudTranslation::Providers
|
|
93
111
|
def sanitize_text(text_or_array)
|
94
112
|
case text_or_array
|
95
113
|
when String
|
96
|
-
text_or_array.gsub(/%{(.+?)}/, '<code>__LIT__\1__LIT__</code>')
|
114
|
+
text_or_array.gsub(/%{(.+?)}/, '<code>__LIT__\1__LIT__</code>').gsub(/\r\n/, '<code>0</code>')
|
97
115
|
when Array
|
98
116
|
text_or_array.map { |s| sanitize_text(s) }
|
99
117
|
when nil
|
@@ -106,7 +124,7 @@ module Lit::CloudTranslation::Providers
|
|
106
124
|
def unsanitize_text(text_or_array)
|
107
125
|
case text_or_array
|
108
126
|
when String
|
109
|
-
text_or_array.gsub(
|
127
|
+
text_or_array.gsub(%r{<code>0</code>}, "\r\n").gsub(%r{<code>__LIT__(.+?)__LIT__</code>}, '%{\1}')
|
110
128
|
when Array
|
111
129
|
text_or_array.map { |s| unsanitize_text(s) }
|
112
130
|
else
|
data/lib/lit/engine.rb
CHANGED
@@ -4,6 +4,8 @@ module Lit
|
|
4
4
|
|
5
5
|
config.autoload_paths += %W[#{Lit::Engine.root}/app/controllers/lit/concerns]
|
6
6
|
|
7
|
+
paths.add 'lib'
|
8
|
+
|
7
9
|
isolate_namespace Lit
|
8
10
|
|
9
11
|
initializer 'lit.assets.precompile' do |app|
|
@@ -12,16 +14,12 @@ module Lit
|
|
12
14
|
end
|
13
15
|
|
14
16
|
initializer 'lit.reloader' do |app|
|
15
|
-
config.to_prepare
|
16
|
-
Lit.loader.cache.reset_local_cache if Lit.loader
|
17
|
-
end
|
17
|
+
config.to_prepare { Lit.loader.cache.reset_local_cache if Lit.loader }
|
18
18
|
end
|
19
19
|
|
20
20
|
initializer 'lit.migrations.append' do |app|
|
21
21
|
unless app.root.to_s.include?(root.to_s)
|
22
|
-
config.paths['db/migrate'].expanded.each
|
23
|
-
app.config.paths['db/migrate'] << expanded_path
|
24
|
-
end
|
22
|
+
config.paths['db/migrate'].expanded.each { |expanded_path| app.config.paths['db/migrate'] << expanded_path }
|
25
23
|
end
|
26
24
|
end
|
27
25
|
|
data/lib/lit/export.rb
CHANGED
@@ -4,7 +4,7 @@ require 'lit/services/localization_keys_to_hash_service'
|
|
4
4
|
module Lit
|
5
5
|
class Export
|
6
6
|
def self.call(locale_keys:, format:, include_hits_count: false)
|
7
|
-
raise ArgumentError,
|
7
|
+
raise ArgumentError, 'format must be yaml or csv' if %i[yaml csv].exclude?(format)
|
8
8
|
Lit.loader.cache.load_all_translations
|
9
9
|
localizations_scope = Lit::Localization.active
|
10
10
|
if locale_keys.present?
|
@@ -12,13 +12,11 @@ module Lit
|
|
12
12
|
localizations_scope = localizations_scope.where(locale_id: locale_ids) unless locale_ids.empty?
|
13
13
|
end
|
14
14
|
db_localizations = {}
|
15
|
-
localizations_scope.find_each
|
16
|
-
db_localizations[l.full_key] = l.translation
|
17
|
-
end
|
15
|
+
localizations_scope.find_each { |l| db_localizations[l.full_key] = l.translation }
|
18
16
|
|
19
17
|
case format
|
20
18
|
when :yaml
|
21
|
-
exported_keys = Lit::LocalizationKeysToHashService.call(db_localizations)
|
19
|
+
exported_keys = Lit::Services::LocalizationKeysToHashService.call(db_localizations)
|
22
20
|
exported_keys.to_yaml
|
23
21
|
when :csv
|
24
22
|
relevant_locales = locale_keys.presence || I18n.available_locales.map(&:to_s)
|
@@ -46,9 +44,7 @@ module Lit
|
|
46
44
|
relevant_locales.map { |l| Array.wrap(db_localizations["#{l}.#{key_without_locale}"]) }
|
47
45
|
transpose(key_localizations_per_locale).each do |translation_series|
|
48
46
|
csv_row = [key_without_locale, *translation_series]
|
49
|
-
if include_hits_count
|
50
|
-
csv_row << (Lit.init.cache.get_global_hits_counter(key_without_locale) || 0)
|
51
|
-
end
|
47
|
+
csv_row << (Lit.init.cache.get_global_hits_counter(key_without_locale) || 0) if include_hits_count
|
52
48
|
csv << csv_row
|
53
49
|
end
|
54
50
|
end
|
@@ -59,9 +55,7 @@ module Lit
|
|
59
55
|
# This is like Array#transpose but ignores size differences between inner arrays.
|
60
56
|
private_class_method def self.transpose(matrix)
|
61
57
|
maxlen = matrix.max { |x| x.length }.length
|
62
|
-
matrix.each
|
63
|
-
array[maxlen - 1] = nil if array.length < maxlen
|
64
|
-
end
|
58
|
+
matrix.each { |array| array[maxlen - 1] = nil if array.length < maxlen }
|
65
59
|
matrix.transpose
|
66
60
|
end
|
67
61
|
end
|
data/lib/lit/i18n_backend.rb
CHANGED
@@ -16,9 +16,22 @@ module Lit
|
|
16
16
|
I18n.const_set(:RESERVED_KEYS, reserved_keys.freeze)
|
17
17
|
end
|
18
18
|
|
19
|
+
## DOC
|
20
|
+
## Translation flow starts with Rails-provided ActionView::Helpers::TranslationHelper `translate` method
|
21
|
+
## In that method any calls to `I18n.translate` are catched by this method below (because Lit acts as I18 backend)
|
22
|
+
## Any calls in Lit to `super` go straight to I18n
|
19
23
|
def translate(locale, key, options = {})
|
20
24
|
options[:lit_default_copy] = options[:default].dup if can_dup_default(options)
|
21
25
|
content = super(locale, key, options)
|
26
|
+
|
27
|
+
if on_rails_6_1_or_higher?
|
28
|
+
@untranslated_key = key if key.present? && options[:default].instance_of?(Object)
|
29
|
+
|
30
|
+
if key.nil? && options[:lit_default_copy].present?
|
31
|
+
update_default_localization(locale, content, options)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
22
35
|
if Lit.all_translations_are_html_safe && content.respond_to?(:html_safe)
|
23
36
|
content.html_safe
|
24
37
|
else
|
@@ -54,6 +67,17 @@ module Lit
|
|
54
67
|
|
55
68
|
private
|
56
69
|
|
70
|
+
def on_rails_6_1_or_higher?
|
71
|
+
"#{::Rails::VERSION::MAJOR}#{::Rails::VERSION::MINOR}".to_i == 61 ||
|
72
|
+
::Rails::VERSION::MAJOR >= 7
|
73
|
+
end
|
74
|
+
|
75
|
+
def update_default_localization(locale, content, options)
|
76
|
+
parts = I18n.normalize_keys(locale, @untranslated_key, options[:scope], options[:separator])
|
77
|
+
key_with_locale = parts.join('.')
|
78
|
+
@cache.update_locale(key_with_locale, content, content.is_a?(Array))
|
79
|
+
end
|
80
|
+
|
57
81
|
def can_dup_default(options = {})
|
58
82
|
return false unless options.key?(:default)
|
59
83
|
return true if options[:default].is_a?(String)
|
data/lib/lit/import.rb
CHANGED
@@ -3,14 +3,14 @@ require 'csv'
|
|
3
3
|
module Lit
|
4
4
|
class Import
|
5
5
|
class << self
|
6
|
-
def call(
|
7
|
-
new(
|
6
|
+
def call(**kwargs)
|
7
|
+
new(**kwargs).perform
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
11
|
attr_reader :input, :locale_keys, :format, :skip_nil
|
12
12
|
|
13
|
-
def initialize(input:, locale_keys: [],
|
13
|
+
def initialize(input:, format:, locale_keys: [], skip_nil: true, dry_run: false, raw: false)
|
14
14
|
raise ArgumentError, 'format must be yaml or csv' if %i[yaml csv].exclude?(format.to_sym)
|
15
15
|
@input = input
|
16
16
|
@locale_keys = locale_keys.presence || I18n.available_locales
|
@@ -143,7 +143,7 @@ module Lit
|
|
143
143
|
.find_by('localization_key = ? and locale = ?', key, locale)
|
144
144
|
|
145
145
|
return unless existing_translation
|
146
|
-
|
146
|
+
|
147
147
|
if @raw
|
148
148
|
existing_translation.update(default_value: value)
|
149
149
|
else
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'rack/body_proxy'
|
2
|
+
|
3
|
+
# A middleware that ensures the lit thread value is cleared after
|
4
|
+
# the last part of the body is rendered. This is useful when
|
5
|
+
# using streaming.j
|
6
|
+
#
|
7
|
+
# Uses Rack::BodyProxy, adapted from Rack::Lock's usage of the
|
8
|
+
# same pattern.
|
9
|
+
#
|
10
|
+
|
11
|
+
module Lit
|
12
|
+
class Middleware
|
13
|
+
def initialize(app)
|
14
|
+
@app = app
|
15
|
+
end
|
16
|
+
|
17
|
+
def call(env)
|
18
|
+
Thread.current[:localization_cache_valid] = false
|
19
|
+
response = @app.call(env)
|
20
|
+
|
21
|
+
# for streaming support wrap request in Rack::BodyProxy
|
22
|
+
response << Rack::BodyProxy.new(response.pop) do
|
23
|
+
Thread.current[:localization_cache_valid] = false
|
24
|
+
end
|
25
|
+
ensure
|
26
|
+
Thread.current[:localization_cache_valid] = false
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/lit/rails.rb
CHANGED
data/lib/lit/railtie.rb
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
module Lit
|
2
2
|
class Railtie < ::Rails::Railtie
|
3
|
-
|
4
|
-
|
5
|
-
# Lit::Rails.initialize
|
6
|
-
end
|
3
|
+
initializer :lit_middleware do |app|
|
4
|
+
app.config.middleware.insert_after ActionDispatch::RequestId, Lit::Middleware
|
7
5
|
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
ActiveSupport::Reloader.to_complete do
|
7
|
+
Thread.current[:localization_cache_valid] = false
|
8
|
+
end
|
9
|
+
end
|
11
10
|
end
|
12
11
|
end
|
@@ -1,23 +1,26 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Lit
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
module Services
|
5
|
+
# Converts flat hash with localization_keys as keys and translations as values to nested hash
|
6
|
+
# by nesting on '.' localization key dots
|
7
|
+
class LocalizationKeysToHashService
|
8
|
+
# http://subtech.g.hatena.ne.jp/cho45/20061122
|
9
|
+
def self.call(db_localizations)
|
10
|
+
deep_proc =
|
11
|
+
proc do |_k, s, o|
|
12
|
+
next s.merge(o, &deep_proc) if s.is_a?(Hash) && o.is_a?(Hash)
|
11
13
|
|
12
|
-
|
14
|
+
next o
|
15
|
+
end
|
16
|
+
nested_keys = {}
|
17
|
+
db_localizations.sort.each do |k, v|
|
18
|
+
key_parts = k.to_s.split('.')
|
19
|
+
converted = key_parts.reverse.reduce(v) { |a, n| { n => a } }
|
20
|
+
nested_keys.merge!(converted, &deep_proc)
|
21
|
+
end
|
22
|
+
nested_keys
|
13
23
|
end
|
14
|
-
nested_keys = {}
|
15
|
-
db_localizations.sort.each do |k, v|
|
16
|
-
key_parts = k.to_s.split('.')
|
17
|
-
converted = key_parts.reverse.reduce(v) { |a, n| { n => a } }
|
18
|
-
nested_keys.merge!(converted, &deep_proc)
|
19
|
-
end
|
20
|
-
nested_keys
|
21
24
|
end
|
22
25
|
end
|
23
26
|
end
|
data/lib/lit/version.rb
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Lit
|
2
|
-
|
4
|
+
module_function
|
5
|
+
|
6
|
+
def version
|
7
|
+
Gem::Version.new Version::STRING
|
8
|
+
end
|
9
|
+
|
10
|
+
module Version
|
11
|
+
MAJOR = 1
|
12
|
+
MINOR = 1
|
13
|
+
TINY = 5
|
14
|
+
|
15
|
+
STRING = [MAJOR, MINOR, TINY].compact.join('.')
|
16
|
+
end
|
3
17
|
end
|
data/lib/lit.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'lit/engine'
|
2
2
|
require 'lit/loader'
|
3
|
+
require 'lit/adapters'
|
3
4
|
|
4
5
|
module Lit
|
5
6
|
mattr_accessor :authentication_function
|
@@ -30,7 +31,7 @@ module Lit
|
|
30
31
|
self.loader ||= Loader.new
|
31
32
|
Lit.humanize_key = false if Lit.humanize_key.nil?
|
32
33
|
Lit.humanize_key_ignored_keys = [] if Lit.humanize_key_ignored_keys.nil?
|
33
|
-
Lit.humanize_key_ignored = %w[i18n date datetime number time support
|
34
|
+
Lit.humanize_key_ignored = %w[i18n date datetime number time support]
|
34
35
|
Lit.humanize_key_ignored |= Lit.humanize_key_ignored_keys
|
35
36
|
Lit.humanize_key_ignored = Regexp.new("(#{Lit.humanize_key_ignored.join('|')}).*")
|
36
37
|
Lit.ignore_yaml_on_startup = true if Lit.ignore_yaml_on_startup.nil?
|
@@ -42,6 +43,7 @@ module Lit
|
|
42
43
|
Lit.hits_counter_enabled = false if Lit.hits_counter_enabled.nil?
|
43
44
|
Lit.store_request_info = false if Lit.store_request_info.nil?
|
44
45
|
Lit.store_request_keys = false if Lit.store_request_keys.nil?
|
46
|
+
|
45
47
|
# if loading all translations on start, migrations have to be already
|
46
48
|
# performed, fails on first deploy
|
47
49
|
# self.loader.cache.load_all_translations
|
@@ -55,10 +57,10 @@ module Lit
|
|
55
57
|
rescue ActiveRecord::ActiveRecordError => e
|
56
58
|
log_txt =
|
57
59
|
"An #{e.class} error has been raised during Lit initialization. " \
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
60
|
+
"Lit assumes that database tables do not exist.\n\n" \
|
61
|
+
"Error: #{e.message}\n\n" \
|
62
|
+
"Backtrace:\n" \
|
63
|
+
"#{e.backtrace.join("\n")}"
|
62
64
|
Logger.new(STDOUT).error(log_txt) if ::Rails.env.test? # ensure this is logged to stdout in test
|
63
65
|
::Rails.logger.error(log_txt)
|
64
66
|
false
|
@@ -68,18 +70,16 @@ module Lit
|
|
68
70
|
case Lit.key_value_engine
|
69
71
|
when 'redis'
|
70
72
|
require 'lit/adapters/redis_storage'
|
71
|
-
return RedisStorage.new
|
73
|
+
return ::Lit::Adapters::RedisStorage.new
|
72
74
|
else
|
73
75
|
require 'lit/adapters/hash_storage'
|
74
|
-
return HashStorage.new
|
76
|
+
return ::Lit::Adapters::HashStorage.new
|
75
77
|
end
|
76
78
|
end
|
77
79
|
|
78
80
|
def self.fallback=(_value)
|
79
|
-
::Rails.logger.error
|
81
|
+
::Rails.logger.error '[DEPRECATION] Lit.fallback= has been deprecated, please use `config.i18n.fallbacks` instead'
|
80
82
|
end
|
81
83
|
end
|
82
84
|
|
83
|
-
if defined?
|
84
|
-
require 'lit/rails'
|
85
|
-
end
|
85
|
+
require 'lit/rails' if defined?(Rails)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Litwiniuk
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2021-12-23 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -19,14 +19,14 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 5.2.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 5.2.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: jquery-rails
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,14 +89,14 @@ dependencies:
|
|
89
89
|
requirements:
|
90
90
|
- - "~>"
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: 2.
|
92
|
+
version: 2.4.0
|
93
93
|
type: :development
|
94
94
|
prerelease: false
|
95
95
|
version_requirements: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
97
|
- - "~>"
|
98
98
|
- !ruby/object:Gem::Version
|
99
|
-
version: 2.
|
99
|
+
version: 2.4.0
|
100
100
|
- !ruby/object:Gem::Dependency
|
101
101
|
name: devise
|
102
102
|
requirement: !ruby/object:Gem::Requirement
|
@@ -111,20 +111,6 @@ dependencies:
|
|
111
111
|
- - "~>"
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: 4.7.1
|
114
|
-
- !ruby/object:Gem::Dependency
|
115
|
-
name: google-cloud-translate
|
116
|
-
requirement: !ruby/object:Gem::Requirement
|
117
|
-
requirements:
|
118
|
-
- - "~>"
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: 1.2.4
|
121
|
-
type: :development
|
122
|
-
prerelease: false
|
123
|
-
version_requirements: !ruby/object:Gem::Requirement
|
124
|
-
requirements:
|
125
|
-
- - "~>"
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
version: 1.2.4
|
128
114
|
- !ruby/object:Gem::Dependency
|
129
115
|
name: minitest
|
130
116
|
requirement: !ruby/object:Gem::Requirement
|
@@ -233,6 +219,8 @@ files:
|
|
233
219
|
- app/controllers/lit/locales_controller.rb
|
234
220
|
- app/controllers/lit/localization_keys_controller.rb
|
235
221
|
- app/controllers/lit/localizations_controller.rb
|
222
|
+
- app/controllers/lit/request_info_store.rb
|
223
|
+
- app/controllers/lit/request_keys_store.rb
|
236
224
|
- app/controllers/lit/sources_controller.rb
|
237
225
|
- app/helpers/lit/application_helper.rb
|
238
226
|
- app/helpers/lit/dashboard_helper.rb
|
@@ -272,6 +260,7 @@ files:
|
|
272
260
|
- app/views/lit/localization_keys/_localization_row.html.erb
|
273
261
|
- app/views/lit/localization_keys/_localizations_list.html.erb
|
274
262
|
- app/views/lit/localization_keys/_sidebar.html.erb
|
263
|
+
- app/views/lit/localization_keys/batch_touch.js.erb
|
275
264
|
- app/views/lit/localization_keys/change_completed.js.erb
|
276
265
|
- app/views/lit/localization_keys/destroy.js.erb
|
277
266
|
- app/views/lit/localization_keys/index.html.erb
|
@@ -304,9 +293,10 @@ files:
|
|
304
293
|
- db/migrate/20181018075955_lit_add_localization_key_is_deleted_to_localization_keys.rb
|
305
294
|
- db/migrate/20181030111522_lit_add_is_visited_again_to_localization_keys.rb
|
306
295
|
- db/migrate/20181129103819_lit_add_localization_key_locale_unique_index_to_localizations.rb
|
307
|
-
- lib/generators/lit/install/templates/initializer.
|
296
|
+
- lib/generators/lit/install/templates/initializer.erb
|
308
297
|
- lib/generators/lit/install_generator.rb
|
309
298
|
- lib/lit.rb
|
299
|
+
- lib/lit/adapters.rb
|
310
300
|
- lib/lit/adapters/hash_storage.rb
|
311
301
|
- lib/lit/adapters/redis_storage.rb
|
312
302
|
- lib/lit/cache.rb
|
@@ -319,6 +309,7 @@ files:
|
|
319
309
|
- lib/lit/i18n_backend.rb
|
320
310
|
- lib/lit/import.rb
|
321
311
|
- lib/lit/loader.rb
|
312
|
+
- lib/lit/middleware.rb
|
322
313
|
- lib/lit/rails.rb
|
323
314
|
- lib/lit/railtie.rb
|
324
315
|
- lib/lit/services/localization_keys_to_hash_service.rb
|
@@ -343,7 +334,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
343
334
|
- !ruby/object:Gem::Version
|
344
335
|
version: '0'
|
345
336
|
requirements: []
|
346
|
-
rubygems_version: 3.1.
|
337
|
+
rubygems_version: 3.1.6
|
347
338
|
signing_key:
|
348
339
|
specification_version: 4
|
349
340
|
summary: Database powered i18n backend with web gui
|