i18n-csv_translation 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +10 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +114 -0
- data/Rakefile +6 -0
- data/certs/swelther.pem +21 -0
- data/i18n-csv_translation.gemspec +34 -0
- data/lib/i18n/csv_translation.rb +9 -0
- data/lib/i18n/csv_translation/exporter.rb +83 -0
- data/lib/i18n/csv_translation/importer.rb +63 -0
- data/lib/i18n/csv_translation/version.rb +5 -0
- metadata +155 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: aa5a41cfc85d0e28282efed2cd3620e18f04e2bb
|
4
|
+
data.tar.gz: 83cf14dcd473a54aeb010eb880ca992e67295eba
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6fa68089c774d3d0392aa8fa86ac08c74365e398865158b1bce108367d3659d18bb75dab98f7a296fa87edf46028032ba556c80699c78c3b4f4b3349e7f5beeb
|
7
|
+
data.tar.gz: 2e6f6d9011c0a11a3c577603cac50b74e62a9c5a742f35da303e2450d7ef384115de60e4f5a2c31a31002f3355a743c605c40d5f00f0c0d5580e1b3e794f7bad
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
ADDED
Binary file
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Sebastian Welther
|
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,114 @@
|
|
1
|
+
# I18n::CsvTranslation
|
2
|
+
|
3
|
+
Ever needed to add a new locale to an existing (Rails) project with dozens of .yml files? Too afraid to give all files to the customer or translation service and hope they do not mess up the YAML format?
|
4
|
+
|
5
|
+
This gem allows you to export all i18n keys and values to one CSV file. With this the values can be easily translated and later reimported into your project. The new translations are saved in a filename similar to the original one (only the locale is replaced).
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile in the development group because you will need it only locally:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
group :development do
|
13
|
+
gem "i18n_csv", require: false
|
14
|
+
end
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install i18n-csv_translation
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
### Export translations into one csv file
|
28
|
+
|
29
|
+
Write in a (Rails) console or script:
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
require "i18n/csv-translation"
|
33
|
+
|
34
|
+
exporter = I18n::CsvTranslation::Exporter.new
|
35
|
+
exporter.export(path: "path-to-your-locales-directory", output: "my_translations.csv", files: "*.yml")
|
36
|
+
```
|
37
|
+
|
38
|
+
Note: The gem expects only one locale in each file. If you want to export only English to have it translated you can either
|
39
|
+
give a files param like `files: "en.*.yml"` or use a block (see below) to determine if the files content should be processed.
|
40
|
+
|
41
|
+
If you wish a different csv column separator give it as option:
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
I18n::CsvTranslation::Exporter.new(col_sep: "\t")
|
45
|
+
```
|
46
|
+
|
47
|
+
With a block you can decide if the translation file should be processed
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
exporter.export(path: "path-to-your-locales-directory", output: "my_translations.csv") do |file|
|
51
|
+
!file.include? "admin"
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
55
|
+
Ignores all files with "admin" in the name.
|
56
|
+
|
57
|
+
### Import translations from csv
|
58
|
+
|
59
|
+
Given you got a csv with translated values for a new locale, lets say German.
|
60
|
+
|
61
|
+
The import process works only if the first two columns on the csv file haven't been
|
62
|
+
touched by the translaters. The first column holds the file name of the original
|
63
|
+
translation file, without the locale. The second one is the translation key,
|
64
|
+
again without locale.
|
65
|
+
|
66
|
+
Creating new translation files can be done like this:
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
require "i18n/csv-translation"
|
70
|
+
|
71
|
+
importer = I18n::CsvTranslation::Importer.new
|
72
|
+
importer.import input: "path_to_translated_csv_file", path: "path_for_new_translation_files", new_locale: "de"
|
73
|
+
```
|
74
|
+
|
75
|
+
Given you had two English translation files:
|
76
|
+
|
77
|
+
```
|
78
|
+
config/locales/en.users.yml
|
79
|
+
config/locales/en.addresses.yml
|
80
|
+
```
|
81
|
+
|
82
|
+
After the import you would have these two new German translation files:
|
83
|
+
|
84
|
+
```
|
85
|
+
de.users.yml
|
86
|
+
de.addresses.yml
|
87
|
+
```
|
88
|
+
|
89
|
+
With all keys and values in their respective files, e.g. "de.users.name" in de.users.yml,
|
90
|
+
"de.addresses.street" in de.addresses.yml.
|
91
|
+
|
92
|
+
The translated csv file has a custom col sep?
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
importer = I18n::CsvTranslation::Importer.new(col_sep: "\t")
|
96
|
+
```
|
97
|
+
|
98
|
+
## TODO
|
99
|
+
|
100
|
+
- Option for the locale to be exported instead of files param. Would load all yml files but process only thos with a distinct locale.
|
101
|
+
- Remove YAML header from new translation files (optionally)
|
102
|
+
- Option for verbose output (which file processed, which keys, etc...)
|
103
|
+
|
104
|
+
## Development
|
105
|
+
|
106
|
+
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.
|
107
|
+
|
108
|
+
## Contributing
|
109
|
+
|
110
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/swelther/i18n-csv_translation.
|
111
|
+
|
112
|
+
## License
|
113
|
+
|
114
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/certs/swelther.pem
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMRIwEAYDVQQDDAlzZWJh
|
3
|
+
c3RpYW4xFzAVBgoJkiaJk/IsZAEZFgd3ZWx0aGVyMRIwEAYKCZImiZPyLGQBGRYC
|
4
|
+
ZGUwHhcNMTYwOTI3MDgzMzIyWhcNMTcwOTI3MDgzMzIyWjBBMRIwEAYDVQQDDAlz
|
5
|
+
ZWJhc3RpYW4xFzAVBgoJkiaJk/IsZAEZFgd3ZWx0aGVyMRIwEAYKCZImiZPyLGQB
|
6
|
+
GRYCZGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDNjCSKEQmOCsrJ
|
7
|
+
MqFRLEi3OQ7l8qTtf0IeIi/BIdA4Pwb/jgsQzwoY2yW2NwNYKC0AaHZVtAqZ5sCH
|
8
|
+
Xj3OVKHVK7beWptHCljs+kDuHM1cGl3h4VXAano+VrXCy0TwaiJ0dzDFfPhkvfPq
|
9
|
+
CmzNRDJvb3RRYx5H/v/+0pZZCaZ+5shncaiBS8UmLYD27BdsNE45nHZkiuCe/7Kt
|
10
|
+
rGqRpX/+ZgHZlZxSSYuUp1pdGCNUgLe91qjV1SAgeXub4mmR3e1+s/lATClqPspv
|
11
|
+
WD3CLnxYdAxLHtfiOhfId4DF5E65rYM5pLg2Zp/QSOHQyxbhfCQ1R1zv1HJULVs6
|
12
|
+
V4EJ29FvAgMBAAGjezB5MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
|
13
|
+
BBQhYVZ9gH8Io+1u5dpWwsS5qvlzPjAfBgNVHREEGDAWgRRzZWJhc3RpYW5Ad2Vs
|
14
|
+
dGhlci5kZTAfBgNVHRIEGDAWgRRzZWJhc3RpYW5Ad2VsdGhlci5kZTANBgkqhkiG
|
15
|
+
9w0BAQUFAAOCAQEAQ4mn273uhDc5ZSZtcPJ6FbxtvHt2G3pzup30fJqrMyOsNi7P
|
16
|
+
B1QHLsTlbxvtGGbTARl6gsoADzTIaDY99jbwBK2iHsWxiMcfFw7qintddtwHPEfP
|
17
|
+
CyLELS8TGdA0aWXu+jLgk/22Az+irx6qhlZLrwoQgTOqst/2FcvWoeQvSwT3vSxH
|
18
|
+
WoA2XFqw2ewJw2SJmpcVwY8wN4AUqn5fieu0lO3fZE8BTcxLK15DljWlFhVg0zrh
|
19
|
+
4Q9DVxGADMOl4uvvg4JHeLVYzenzkP3z1vhkCd5ZaOjd4fFSBlXW0Ewl8KMVRNL+
|
20
|
+
rQQ/uL3CcurQ/cyMOz/xeLTkXo80XtfgYUDOyw==
|
21
|
+
-----END CERTIFICATE-----
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
require 'i18n/csv_translation/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = "i18n-csv_translation"
|
9
|
+
spec.version = I18n::CsvTranslation::VERSION
|
10
|
+
spec.authors = ["Sebastian Welther"]
|
11
|
+
spec.email = ["sebastian@welther.de"]
|
12
|
+
|
13
|
+
spec.summary = %q{Exports all i18n keys and values of one locale into one CSV and imports it back as new locale.}
|
14
|
+
spec.description = %q{Ever needed to add a new locale to an existing (Rails) project with dozens of .yml files? Too afraid to give all files to the customer or translation service and hope they do not mess up the YAML format? This gem allows you to export all i18n keys and values to one CSV file. With this the values can be easily translated and later reimported into your project. The new translations are saved in a filename similar to the original one (only the locale is replaced).}
|
15
|
+
spec.homepage = "https://github.com/swelther/i18n-csv_translation"
|
16
|
+
spec.license = "MIT"
|
17
|
+
|
18
|
+
spec.cert_chain = ["certs/swelther.pem"]
|
19
|
+
spec.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
|
20
|
+
|
21
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
22
|
+
f.match(%r{^(test|spec|features)/})
|
23
|
+
end
|
24
|
+
spec.executables = []
|
25
|
+
spec.require_paths = ["lib"]
|
26
|
+
|
27
|
+
spec.add_dependency "deep_merge", "~> 1.1"
|
28
|
+
|
29
|
+
spec.add_development_dependency "bundler", "~> 1.13"
|
30
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
31
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
32
|
+
|
33
|
+
spec.add_development_dependency "pry", "~> 0.10"
|
34
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
require "yaml"
|
2
|
+
require "csv"
|
3
|
+
|
4
|
+
module I18n::CsvTranslation
|
5
|
+
class Exporter
|
6
|
+
def initialize col_sep: ";"
|
7
|
+
@col_sep = col_sep
|
8
|
+
end
|
9
|
+
|
10
|
+
def export path:, files: "*.yml", output:, &block
|
11
|
+
@path = path
|
12
|
+
@files = files
|
13
|
+
@output = output
|
14
|
+
|
15
|
+
translations = load_translations_into_hash &block
|
16
|
+
save_translations_to_csv translations
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def load_translations_into_hash
|
22
|
+
translations = {}
|
23
|
+
|
24
|
+
Dir[current_path.join(@path, "**", @files)].sort.each do |file|
|
25
|
+
process_file = if block_given?
|
26
|
+
yield(file)
|
27
|
+
else
|
28
|
+
true
|
29
|
+
end
|
30
|
+
|
31
|
+
if process_file
|
32
|
+
ymls = YAML.load_file file
|
33
|
+
translations.merge! output_filename(file, yml_locale(ymls)) => flat_translation_hash(ymls.values.first)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
translations
|
38
|
+
end
|
39
|
+
|
40
|
+
def save_translations_to_csv translations
|
41
|
+
CSV.open(@output, "w", col_sep: @col_sep) do |csv|
|
42
|
+
translations.each do |key, value|
|
43
|
+
if value.is_a?(Hash)
|
44
|
+
value.each do |inner_key, inner_value|
|
45
|
+
csv << [key, inner_key, inner_value]
|
46
|
+
end
|
47
|
+
else
|
48
|
+
csv << [key, value]
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def flat_translation_hash translations, parent=[]
|
55
|
+
result = {}
|
56
|
+
|
57
|
+
translations.each do |key, values|
|
58
|
+
current_key = parent.dup << key
|
59
|
+
|
60
|
+
if values.is_a?(Hash)
|
61
|
+
result.merge! flat_translation_hash(values, current_key)
|
62
|
+
else
|
63
|
+
result[current_key.join(".")] = values
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
result
|
68
|
+
end
|
69
|
+
|
70
|
+
def current_path
|
71
|
+
Pathname.new(File.dirname(__FILE__))
|
72
|
+
end
|
73
|
+
|
74
|
+
def output_filename file, old_locale
|
75
|
+
File.basename(file).gsub("#{old_locale}.", "")
|
76
|
+
end
|
77
|
+
|
78
|
+
def yml_locale yml
|
79
|
+
yml.keys.first
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require "csv"
|
2
|
+
require "deep_merge"
|
3
|
+
|
4
|
+
module I18n::CsvTranslation
|
5
|
+
class Importer
|
6
|
+
def initialize col_sep: ";"
|
7
|
+
@col_sep = col_sep
|
8
|
+
end
|
9
|
+
|
10
|
+
def import input:, path:, new_locale:
|
11
|
+
@input = input
|
12
|
+
@path = path
|
13
|
+
@new_locale = new_locale
|
14
|
+
|
15
|
+
translations = load_translations_from_csv
|
16
|
+
save_translations_as_yaml translations
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def load_translations_from_csv
|
22
|
+
translations = {}
|
23
|
+
|
24
|
+
CSV.foreach(@input, col_sep: @col_sep) do |csv|
|
25
|
+
unless csv[1].nil? && csv[2].nil?
|
26
|
+
if translations[csv[0]].nil?
|
27
|
+
translations[csv[0]] = { key_with_locale(csv[1]) => csv[2] }
|
28
|
+
else
|
29
|
+
translations[csv[0]].merge!({ key_with_locale(csv[1]) => csv[2] })
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
translations
|
35
|
+
end
|
36
|
+
|
37
|
+
def save_translations_as_yaml translations
|
38
|
+
translations.each do |key, value|
|
39
|
+
unless key.nil?
|
40
|
+
filename = Pathname.new(@path).join("#{@new_locale}." + Pathname.new(key).basename.to_s)
|
41
|
+
file = File.open(filename, "w")
|
42
|
+
|
43
|
+
hash = {}
|
44
|
+
|
45
|
+
value.each do |inner_key, inner_value|
|
46
|
+
a = inner_key.split(".").reverse.inject(inner_value) { |a, n| { n => a } }
|
47
|
+
hash.deep_merge! a
|
48
|
+
end
|
49
|
+
|
50
|
+
# TODO Add option to omit "header"
|
51
|
+
file.write(hash.to_yaml)
|
52
|
+
|
53
|
+
file.close
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def key_with_locale key
|
59
|
+
"#{@new_locale}.#{key}"
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
end
|
metadata
ADDED
@@ -0,0 +1,155 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: i18n-csv_translation
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sebastian Welther
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMRIwEAYDVQQDDAlzZWJh
|
14
|
+
c3RpYW4xFzAVBgoJkiaJk/IsZAEZFgd3ZWx0aGVyMRIwEAYKCZImiZPyLGQBGRYC
|
15
|
+
ZGUwHhcNMTYwOTI3MDgzMzIyWhcNMTcwOTI3MDgzMzIyWjBBMRIwEAYDVQQDDAlz
|
16
|
+
ZWJhc3RpYW4xFzAVBgoJkiaJk/IsZAEZFgd3ZWx0aGVyMRIwEAYKCZImiZPyLGQB
|
17
|
+
GRYCZGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDNjCSKEQmOCsrJ
|
18
|
+
MqFRLEi3OQ7l8qTtf0IeIi/BIdA4Pwb/jgsQzwoY2yW2NwNYKC0AaHZVtAqZ5sCH
|
19
|
+
Xj3OVKHVK7beWptHCljs+kDuHM1cGl3h4VXAano+VrXCy0TwaiJ0dzDFfPhkvfPq
|
20
|
+
CmzNRDJvb3RRYx5H/v/+0pZZCaZ+5shncaiBS8UmLYD27BdsNE45nHZkiuCe/7Kt
|
21
|
+
rGqRpX/+ZgHZlZxSSYuUp1pdGCNUgLe91qjV1SAgeXub4mmR3e1+s/lATClqPspv
|
22
|
+
WD3CLnxYdAxLHtfiOhfId4DF5E65rYM5pLg2Zp/QSOHQyxbhfCQ1R1zv1HJULVs6
|
23
|
+
V4EJ29FvAgMBAAGjezB5MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
|
24
|
+
BBQhYVZ9gH8Io+1u5dpWwsS5qvlzPjAfBgNVHREEGDAWgRRzZWJhc3RpYW5Ad2Vs
|
25
|
+
dGhlci5kZTAfBgNVHRIEGDAWgRRzZWJhc3RpYW5Ad2VsdGhlci5kZTANBgkqhkiG
|
26
|
+
9w0BAQUFAAOCAQEAQ4mn273uhDc5ZSZtcPJ6FbxtvHt2G3pzup30fJqrMyOsNi7P
|
27
|
+
B1QHLsTlbxvtGGbTARl6gsoADzTIaDY99jbwBK2iHsWxiMcfFw7qintddtwHPEfP
|
28
|
+
CyLELS8TGdA0aWXu+jLgk/22Az+irx6qhlZLrwoQgTOqst/2FcvWoeQvSwT3vSxH
|
29
|
+
WoA2XFqw2ewJw2SJmpcVwY8wN4AUqn5fieu0lO3fZE8BTcxLK15DljWlFhVg0zrh
|
30
|
+
4Q9DVxGADMOl4uvvg4JHeLVYzenzkP3z1vhkCd5ZaOjd4fFSBlXW0Ewl8KMVRNL+
|
31
|
+
rQQ/uL3CcurQ/cyMOz/xeLTkXo80XtfgYUDOyw==
|
32
|
+
-----END CERTIFICATE-----
|
33
|
+
date: 2016-09-27 00:00:00.000000000 Z
|
34
|
+
dependencies:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: deep_merge
|
37
|
+
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '1.1'
|
42
|
+
type: :runtime
|
43
|
+
prerelease: false
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.1'
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: bundler
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.13'
|
56
|
+
type: :development
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.13'
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: rake
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '10.0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '10.0'
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
name: rspec
|
79
|
+
requirement: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '3.0'
|
84
|
+
type: :development
|
85
|
+
prerelease: false
|
86
|
+
version_requirements: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '3.0'
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: pry
|
93
|
+
requirement: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0.10'
|
98
|
+
type: :development
|
99
|
+
prerelease: false
|
100
|
+
version_requirements: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0.10'
|
105
|
+
description: Ever needed to add a new locale to an existing (Rails) project with dozens
|
106
|
+
of .yml files? Too afraid to give all files to the customer or translation service
|
107
|
+
and hope they do not mess up the YAML format? This gem allows you to export all
|
108
|
+
i18n keys and values to one CSV file. With this the values can be easily translated
|
109
|
+
and later reimported into your project. The new translations are saved in a filename
|
110
|
+
similar to the original one (only the locale is replaced).
|
111
|
+
email:
|
112
|
+
- sebastian@welther.de
|
113
|
+
executables: []
|
114
|
+
extensions: []
|
115
|
+
extra_rdoc_files: []
|
116
|
+
files:
|
117
|
+
- ".gitignore"
|
118
|
+
- ".rspec"
|
119
|
+
- ".travis.yml"
|
120
|
+
- Gemfile
|
121
|
+
- LICENSE.txt
|
122
|
+
- README.md
|
123
|
+
- Rakefile
|
124
|
+
- certs/swelther.pem
|
125
|
+
- i18n-csv_translation.gemspec
|
126
|
+
- lib/i18n/csv_translation.rb
|
127
|
+
- lib/i18n/csv_translation/exporter.rb
|
128
|
+
- lib/i18n/csv_translation/importer.rb
|
129
|
+
- lib/i18n/csv_translation/version.rb
|
130
|
+
homepage: https://github.com/swelther/i18n-csv_translation
|
131
|
+
licenses:
|
132
|
+
- MIT
|
133
|
+
metadata: {}
|
134
|
+
post_install_message:
|
135
|
+
rdoc_options: []
|
136
|
+
require_paths:
|
137
|
+
- lib
|
138
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
|
+
requirements:
|
145
|
+
- - ">="
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '0'
|
148
|
+
requirements: []
|
149
|
+
rubyforge_project:
|
150
|
+
rubygems_version: 2.4.8
|
151
|
+
signing_key:
|
152
|
+
specification_version: 4
|
153
|
+
summary: Exports all i18n keys and values of one locale into one CSV and imports it
|
154
|
+
back as new locale.
|
155
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|