voltron-translate 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +124 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/generators/voltron/translate/install_generator.rb +42 -0
- data/lib/voltron/config/translate.rb +27 -0
- data/lib/voltron/translate.rb +106 -0
- data/lib/voltron/translate/railtie.rb +14 -0
- data/lib/voltron/translate/version.rb +5 -0
- data/voltron-translate.gemspec +31 -0
- metadata +186 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a9f22fea96122996488662651bfa7c633845525b
|
4
|
+
data.tar.gz: c48a44d4d9b69eadfd354a84ee257a613c567f8a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2782a7f25f514aee929750704f9790fddf6788647e14cd450028fa594e8d650606dbf109e7c180700660ace9f9d3fead82d2458e287458192dec1156f5a780aa
|
7
|
+
data.tar.gz: 3ce6ab9f0d85a48083d2507cc70a3ad8b72ddadbaa0c1f3d3cc350c70bafb374874ea88e2658f4c452fb92fad42c214988052877fba7074e7ee66eee570d6d43
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at eric.hainer@gmail.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Eric Hainer
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/ehainer/voltron-translate.svg?branch=master)](https://travis-ci.org/ehainer/voltron-translate)
|
2
|
+
|
3
|
+
# Voltron::Translate
|
4
|
+
|
5
|
+
Voltron Translate is a different, in my mind more logical way of dealing with internationalization in rails, largely inspired by the Magento framework's __() method.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'voltron-translate'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install voltron-translate
|
22
|
+
|
23
|
+
Then run the following to create the voltron.rb initializer (if not exists already) and add the translate config:
|
24
|
+
|
25
|
+
$ rails g voltron:translate:install
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
Voltron Translate extends ActiveRecord::Base, ActionController::Base, ActionMailer::Base, and ActionView::Base with a __ (double underscore) method that makes internationalization and/or translating static phrases easier.
|
30
|
+
|
31
|
+
Once installed, from any class that extends from any of the three rails classes you can use the double underscore method to allow for real time text translation. For example:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
@user = User.new(user_params)
|
35
|
+
|
36
|
+
if @user.save
|
37
|
+
redirect_to @user, notice: __("User has been saved successfully.")
|
38
|
+
else
|
39
|
+
flash.now[:alert] = __("User could not be saved.")
|
40
|
+
render :new
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
or to use interpolation to support dynamic phrases:
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
@user = User.new(user_params)
|
48
|
+
|
49
|
+
if @user.save
|
50
|
+
redirect_to @user, notice: __("User with name %{person_name} has been saved successfully.", person_name: @user.name)
|
51
|
+
else
|
52
|
+
flash.now[:alert] = __("User with name %{person_name} could not be saved.", person_name: [user_params[:first_name], user_params[:last_name]].join(" "))
|
53
|
+
render :new
|
54
|
+
end
|
55
|
+
```
|
56
|
+
|
57
|
+
If the value of `Voltron.config.translate.enabled` is `true` and the code was running under one of the environments specified in `Voltron.config.translate.build_environment` (default: "development") then the line of text will be written to a each locale file you've configured. i.e. - If `Voltron.config.translate.locales == [:en, :es, :de]` then the phrase will be written to en.csv, es.csv, de.csv
|
58
|
+
|
59
|
+
## Translating
|
60
|
+
|
61
|
+
To translate a phrase, you only need to open the locale file you wish to translate the text for and change the value in the second column. For example, given en.csv with the following contents:
|
62
|
+
|
63
|
+
```
|
64
|
+
"User with name %{person_name} has been saved successfully.","User with name %{person_name} has been saved successfully."
|
65
|
+
```
|
66
|
+
|
67
|
+
Changing it to this:
|
68
|
+
|
69
|
+
```
|
70
|
+
"User with name %{person_name} has been saved successfully.","Welcome, %{person_name}! You're all ready to go."
|
71
|
+
```
|
72
|
+
|
73
|
+
Will cause any instance of `__("User with name %{person_name} has been saved successfully.", person_name: "Carl")` to output `Welcome, Carl! You're all ready to go.`
|
74
|
+
|
75
|
+
Note that if a phrase does not exist in the CSV, you can always add it manually just so long as it matches exactly the text contained within the first argument of a __("") method. Voltron Translate uses `Voltron.config.translate.build_environment` to determine what environments it's allowed to auto-generate translations for, but it only writes to locale files whenever a __() is actually reached. Consider:
|
76
|
+
|
77
|
+
```ruby
|
78
|
+
if 1 == 1
|
79
|
+
__("Hello World")
|
80
|
+
else
|
81
|
+
__("Goodbye World")
|
82
|
+
end
|
83
|
+
```
|
84
|
+
|
85
|
+
In a case like the above, "Goodbye World" will never be written to any locale file. If you still want to translate that phrase however you can just add the following to the csv:
|
86
|
+
|
87
|
+
```
|
88
|
+
"Goodbye World","Goodbye World, nice to know ya."
|
89
|
+
```
|
90
|
+
|
91
|
+
Then consider changing your if condition to something a little less absurd so that code could be reached.
|
92
|
+
|
93
|
+
## Choosing a translation locale
|
94
|
+
|
95
|
+
By default, the file Voltron Translate will pull the translations from is determined by the value of `I18n.locale` If you set the value to `:de` it will look for translations in de.csv
|
96
|
+
|
97
|
+
If you need a specific __() call to use a specific locale, you may specify it as the second argument:
|
98
|
+
|
99
|
+
```ruby
|
100
|
+
__("User with name %{person_name} has been saved successfully.", :de, person_name: @user.name)
|
101
|
+
```
|
102
|
+
|
103
|
+
Will always look for the above translation within de.csv
|
104
|
+
|
105
|
+
## Things to Note
|
106
|
+
|
107
|
+
Setting `Voltron.config.translate.enabled` to `false` will never break any __() call, it simply causes it to ignore the locale argument (if specified) and return the interpolated string using the latter arguments (again, if any)
|
108
|
+
|
109
|
+
Disabling translations simply disables any IO related actions that would occur normally, like building or looking up translations when __() methods are called.
|
110
|
+
|
111
|
+
## Development
|
112
|
+
|
113
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
114
|
+
|
115
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
116
|
+
|
117
|
+
## Contributing
|
118
|
+
|
119
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ehainer/voltron-translate. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
120
|
+
|
121
|
+
## License
|
122
|
+
|
123
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
124
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "voltron/translate"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
module Voltron
|
2
|
+
module Translate
|
3
|
+
module Generators
|
4
|
+
class InstallGenerator < Rails::Generators::Base
|
5
|
+
|
6
|
+
desc "Add Voltron Translate initializer"
|
7
|
+
|
8
|
+
def inject_initializer
|
9
|
+
|
10
|
+
voltron_initialzer_path = Rails.root.join("config", "initializers", "voltron.rb")
|
11
|
+
|
12
|
+
unless File.exist? voltron_initialzer_path
|
13
|
+
unless system("cd #{Rails.root.to_s} && rails generate voltron:install")
|
14
|
+
puts "Voltron initializer does not exist. Please ensure you have the 'voltron' gem installed and run `rails g voltron:install` to create it"
|
15
|
+
return false
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
current_initiailzer = File.read voltron_initialzer_path
|
20
|
+
|
21
|
+
unless current_initiailzer.match(Regexp.new(/^# === Voltron Translate Configuration ===/))
|
22
|
+
inject_into_file(voltron_initialzer_path, after: "Voltron.setup do |config|\n") do
|
23
|
+
<<-CONTENT
|
24
|
+
|
25
|
+
# === Voltron Translate Configuration ===
|
26
|
+
|
27
|
+
# Whether or not translation is enabled
|
28
|
+
# config.translate.enabled = true
|
29
|
+
|
30
|
+
# Which locales to build translation files for
|
31
|
+
# config.translate.locales << :en
|
32
|
+
|
33
|
+
# In what environments can translation generation occur. Recommended to keep this as development (default)
|
34
|
+
# config.translate.build_environment << :development
|
35
|
+
CONTENT
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Voltron
|
2
|
+
class Config
|
3
|
+
|
4
|
+
def translate
|
5
|
+
@translate ||= Translate.new
|
6
|
+
end
|
7
|
+
|
8
|
+
class Translate
|
9
|
+
|
10
|
+
attr_accessor :build_environment, :enabled, :locales
|
11
|
+
|
12
|
+
def initialize
|
13
|
+
@build_environment ||= [:development]
|
14
|
+
@enabled ||= true
|
15
|
+
@locales ||= [:en]
|
16
|
+
end
|
17
|
+
|
18
|
+
def enabled?
|
19
|
+
enabled == true
|
20
|
+
end
|
21
|
+
|
22
|
+
def buildable?
|
23
|
+
[build_environment].flatten.map(&:to_s).include?(Rails.env.to_s)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
require "voltron"
|
2
|
+
require "voltron/translate/version"
|
3
|
+
require "voltron/config/translate"
|
4
|
+
require "digest"
|
5
|
+
require "csv"
|
6
|
+
require "google_hash"
|
7
|
+
|
8
|
+
module Voltron
|
9
|
+
module Translate
|
10
|
+
|
11
|
+
def __(text, locale = I18n.locale, **args)
|
12
|
+
return (text % args) unless Voltron.config.translate.enabled?
|
13
|
+
|
14
|
+
begin
|
15
|
+
raise "Locale can only contain the characters A-Z, and _" unless locale.to_s =~ /^[A-Z_]+$/i
|
16
|
+
|
17
|
+
# If app is running in one of the environments where translations can be created
|
18
|
+
if Voltron.config.translate.buildable?
|
19
|
+
Voltron.config.translate.locales.each { |locale| translator(locale).write text }
|
20
|
+
end
|
21
|
+
|
22
|
+
# Translate the text and return it
|
23
|
+
translator(locale).translate text, **args
|
24
|
+
rescue => e
|
25
|
+
# If any errors occurred, log the error and just return the default interpolated text
|
26
|
+
Voltron.log e.message.to_s + " (Original Translation Text: #{text})", "Translate", :light_red
|
27
|
+
text % args
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def translator(locale = I18n.locale)
|
32
|
+
@translators ||= {}
|
33
|
+
@translators[locale.to_s] ||= Translation.new(locale)
|
34
|
+
@translators[locale.to_s]
|
35
|
+
end
|
36
|
+
|
37
|
+
class Translation
|
38
|
+
|
39
|
+
attr_accessor :locale, :list, :last_modified
|
40
|
+
|
41
|
+
def initialize(locale)
|
42
|
+
@locale = locale.to_s
|
43
|
+
load_list # Load the list of translations into a dense google hash object for retrieval
|
44
|
+
end
|
45
|
+
|
46
|
+
def translate(text, **args)
|
47
|
+
phrase(text, args) % args
|
48
|
+
end
|
49
|
+
|
50
|
+
def []=(text, translation)
|
51
|
+
unless list.has_key?(text)
|
52
|
+
CSV.open(path, "a", force_quotes: true) { |f| f.puts [text, translation] }
|
53
|
+
list[text] = translation
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def destroy
|
58
|
+
File.unlink(path) if File.exists?(path)
|
59
|
+
load_list
|
60
|
+
end
|
61
|
+
|
62
|
+
def path
|
63
|
+
@path ||= Rails.root.join("config", "locales", "#{locale}.csv")
|
64
|
+
end
|
65
|
+
|
66
|
+
def write(text)
|
67
|
+
unless list.has_key?(text)
|
68
|
+
CSV.open(path, "a", force_quotes: true) { |f| f.puts [text, text] }
|
69
|
+
list[text] = text
|
70
|
+
Voltron.log "Added translation for text '#{text}' (Locale: #{locale})", "Translate", :light_blue
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
private
|
75
|
+
|
76
|
+
def load_list
|
77
|
+
@list = ::GoogleHashDenseRubyToRuby.new
|
78
|
+
@last_modified = modified
|
79
|
+
Rails.cache.delete_matched("translations/phrase") if Rails.cache.respond_to?(:delete_matched)
|
80
|
+
CSV.foreach(path, force_quotes: true) { |row| list[row.first] = row.last unless list.has_key?(row.first) } if File.exists?(path)
|
81
|
+
end
|
82
|
+
|
83
|
+
def phrase(text, args)
|
84
|
+
load_list if modified > last_modified
|
85
|
+
write(text) if Voltron.config.translate.buildable?
|
86
|
+
key = phrase_key(text, args)
|
87
|
+
Rails.cache.fetch(key) { list[text] } || text
|
88
|
+
end
|
89
|
+
|
90
|
+
def modified
|
91
|
+
if File.exists? path
|
92
|
+
File.mtime(path).to_i
|
93
|
+
else
|
94
|
+
Time.now.to_i
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
def phrase_key(text, args)
|
99
|
+
key = Digest::SHA256.hexdigest [text, locale, modified].map(&:to_s).join + args.map { |k,v| "#{k}#{v}" }.join
|
100
|
+
"translations/phrase/#{key}"
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
require "voltron/translate/railtie" if defined?(Rails)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require "voltron"
|
2
|
+
|
3
|
+
module Voltron
|
4
|
+
module Translate
|
5
|
+
class Railtie < Rails::Railtie
|
6
|
+
initializer "voltron.translate.initialize" do
|
7
|
+
::ActionController::Base.send :include, ::Voltron::Translate
|
8
|
+
::ActiveRecord::Base.send :include, ::Voltron::Translate
|
9
|
+
::ActionView::Base.send :include, ::Voltron::Translate
|
10
|
+
::ActionMailer::Base.send :include, ::Voltron::Translate
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'voltron/translate/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "voltron-translate"
|
8
|
+
spec.version = Voltron::Translate::VERSION
|
9
|
+
spec.authors = ["Eric Hainer"]
|
10
|
+
spec.email = ["eric@commercekitchen.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Implements double underscore method for translating and interpolating phrases}
|
13
|
+
spec.homepage = "https://github.com/ehainer/voltron-translate"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = "exe"
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "rails", ">= 4.2"
|
22
|
+
spec.add_dependency "voltron", ">= 0.1.0"
|
23
|
+
spec.add_dependency "google_hash", ">= 0.9.0"
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", ">= 1.12"
|
26
|
+
spec.add_development_dependency "rake", ">= 10.0"
|
27
|
+
spec.add_development_dependency "rspec", ">= 3.0"
|
28
|
+
spec.add_development_dependency "rspec-rails", ">= 3.4"
|
29
|
+
spec.add_development_dependency "sqlite3", ">= 1.2"
|
30
|
+
spec.add_development_dependency "simplecov", "0.11.0"
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,186 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: voltron-translate
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Eric Hainer
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-09-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: voltron
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.1.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.1.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: google_hash
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.9.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.9.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.12'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.12'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec-rails
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.4'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.4'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: sqlite3
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.2'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.2'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.11.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.11.0
|
139
|
+
description:
|
140
|
+
email:
|
141
|
+
- eric@commercekitchen.com
|
142
|
+
executables: []
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- ".gitignore"
|
147
|
+
- ".rspec"
|
148
|
+
- ".travis.yml"
|
149
|
+
- CODE_OF_CONDUCT.md
|
150
|
+
- Gemfile
|
151
|
+
- LICENSE.txt
|
152
|
+
- README.md
|
153
|
+
- Rakefile
|
154
|
+
- bin/console
|
155
|
+
- bin/setup
|
156
|
+
- lib/generators/voltron/translate/install_generator.rb
|
157
|
+
- lib/voltron/config/translate.rb
|
158
|
+
- lib/voltron/translate.rb
|
159
|
+
- lib/voltron/translate/railtie.rb
|
160
|
+
- lib/voltron/translate/version.rb
|
161
|
+
- voltron-translate.gemspec
|
162
|
+
homepage: https://github.com/ehainer/voltron-translate
|
163
|
+
licenses:
|
164
|
+
- MIT
|
165
|
+
metadata: {}
|
166
|
+
post_install_message:
|
167
|
+
rdoc_options: []
|
168
|
+
require_paths:
|
169
|
+
- lib
|
170
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
requirements: []
|
181
|
+
rubyforge_project:
|
182
|
+
rubygems_version: 2.4.8
|
183
|
+
signing_key:
|
184
|
+
specification_version: 4
|
185
|
+
summary: Implements double underscore method for translating and interpolating phrases
|
186
|
+
test_files: []
|