gettext-setup 0.18 → 0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gettext-setup/gettext_setup.rb +25 -24
- data/lib/gettext_setup.rb +1 -0
- data/lib/tasks/gettext.rake +19 -24
- data/spec/lib/gettext_setup_spec.rb +25 -23
- data/spec/spec_helper.rb +2 -2
- metadata +64 -65
- data/lib/gettext-setup.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37b01acc031b90d76e9682592cd03c3b2026b273
|
4
|
+
data.tar.gz: a473f0e5260a3546d48fdf11850c6d540a0321fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b5496fe67a82255937ef93aa41122a97d8c8fba66dc320d093c4bc8e8cf70ac4f1bea67368bb47d69752eff637476a78c511e22ea980df2b2173a6a9997f65d
|
7
|
+
data.tar.gz: bbe45933b1ae4d9be41f174d46bdf4580aa58a8351c86d6b9eba353fb655a1238ea3f5e324ff4ba1c7315f0e5b64676a3244441f87c3759ceb0e57de713840c8
|
@@ -1,11 +1,12 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
|
2
3
|
require 'fast_gettext'
|
3
4
|
require 'yaml'
|
4
5
|
require 'locale'
|
5
6
|
|
6
7
|
module GettextSetup
|
7
|
-
|
8
|
-
|
8
|
+
@config = nil
|
9
|
+
@translation_repositories = {}
|
9
10
|
FastGettext.default_available_locales = []
|
10
11
|
|
11
12
|
# `locales_path` should include:
|
@@ -17,8 +18,8 @@ module GettextSetup
|
|
17
18
|
# :file_format - one of the supported backends for fast_gettext (e.g. :po, :mo, :yaml, etc.)
|
18
19
|
def self.initialize(locales_path, options = {})
|
19
20
|
config_path = File.absolute_path('config.yaml', locales_path)
|
20
|
-
|
21
|
-
|
21
|
+
@config = YAML.load_file(config_path)['gettext']
|
22
|
+
@locales_path = locales_path
|
22
23
|
|
23
24
|
# Make the translation methods available everywhere
|
24
25
|
Object.send(:include, FastGettext::Translation)
|
@@ -30,7 +31,7 @@ module GettextSetup
|
|
30
31
|
|
31
32
|
# 'chain' is the only available multi-domain type in fast_gettext 1.1.0 We should consider
|
32
33
|
# investigating 'merge' once we can bump our dependency
|
33
|
-
FastGettext.add_text_domain('master_domain', type: :chain, chain:
|
34
|
+
FastGettext.add_text_domain('master_domain', type: :chain, chain: @translation_repositories.values)
|
34
35
|
FastGettext.default_text_domain = 'master_domain'
|
35
36
|
|
36
37
|
# Likewise, be explicit in our default language choice.
|
@@ -40,31 +41,31 @@ module GettextSetup
|
|
40
41
|
Locale.set_default(default_locale)
|
41
42
|
end
|
42
43
|
|
43
|
-
def self.add_repository_to_chain(project_name,options)
|
44
|
+
def self.add_repository_to_chain(project_name, options)
|
44
45
|
repository = FastGettext::TranslationRepository.build(project_name,
|
45
|
-
:
|
46
|
-
:
|
47
|
-
:
|
48
|
-
|
46
|
+
path: locales_path,
|
47
|
+
type: options[:file_format] || :po,
|
48
|
+
ignore_fuzzy: false)
|
49
|
+
@translation_repositories[project_name] = repository unless @translation_repositories.key? project_name
|
49
50
|
end
|
50
51
|
|
51
52
|
def self.locales_path
|
52
|
-
|
53
|
+
@locales_path
|
53
54
|
end
|
54
55
|
|
55
56
|
def self.config
|
56
|
-
|
57
|
+
@config ||= {}
|
57
58
|
end
|
58
59
|
|
59
60
|
def self.translation_repositories
|
60
|
-
|
61
|
+
@translation_repositories
|
61
62
|
end
|
62
63
|
|
63
64
|
def self.default_locale
|
64
|
-
config['default_locale'] ||
|
65
|
+
config['default_locale'] || 'en'
|
65
66
|
end
|
66
67
|
|
67
|
-
def self.
|
68
|
+
def self.default_locale=(new_locale)
|
68
69
|
FastGettext.default_locale = new_locale
|
69
70
|
Locale.set_default(new_locale)
|
70
71
|
config['default_locale'] = new_locale
|
@@ -81,31 +82,31 @@ module GettextSetup
|
|
81
82
|
end
|
82
83
|
|
83
84
|
def self.locales
|
84
|
-
explicit = Dir.glob(File
|
85
|
-
File
|
85
|
+
explicit = Dir.glob(File.absolute_path('*/*.po', locales_path)).map do |x|
|
86
|
+
File.basename(File.dirname(x))
|
86
87
|
end
|
87
|
-
(explicit + [
|
88
|
+
(explicit + [default_locale]).uniq
|
88
89
|
end
|
89
90
|
|
90
91
|
# Given an HTTP Accept-Language header return the locale with the highest
|
91
92
|
# priority from it for which we have a locale available. If none exists,
|
92
93
|
# return the default locale
|
93
94
|
def self.negotiate_locale(accept_header)
|
94
|
-
unless
|
95
|
-
raise ArgumentError,
|
95
|
+
unless @config
|
96
|
+
raise ArgumentError, 'No config.yaml found! Use `GettextSetup.initialize(locales_path)` to locate your config.yaml'
|
96
97
|
end
|
97
98
|
return FastGettext.default_locale if accept_header.nil?
|
98
|
-
available_locales = accept_header.split(
|
99
|
+
available_locales = accept_header.split(',').map do |locale|
|
99
100
|
pair = locale.strip.split(';q=')
|
100
101
|
pair << '1.0' unless pair.size == 2
|
101
102
|
pair[0] = FastGettext.default_locale if pair[0] == '*'
|
102
103
|
pair
|
103
|
-
end.sort_by do |(
|
104
|
+
end.sort_by do |(_, qvalue)|
|
104
105
|
-1 * qvalue.to_f
|
105
|
-
end.select do |(locale,_)|
|
106
|
+
end.select do |(locale, _)|
|
106
107
|
FastGettext.available_locales.include?(locale)
|
107
108
|
end
|
108
|
-
if available_locales
|
109
|
+
if available_locales && available_locales.first
|
109
110
|
available_locales.first.first
|
110
111
|
else
|
111
112
|
# We can't satisfy the request preference. Just use the default locale.
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'gettext-setup/gettext_setup'
|
data/lib/tasks/gettext.rake
CHANGED
@@ -8,7 +8,6 @@ require_relative '../gettext-setup/gettext_setup'
|
|
8
8
|
# GettextSetup.initialize(File.absolute_path('locales', Dir.pwd))
|
9
9
|
|
10
10
|
namespace :gettext do
|
11
|
-
|
12
11
|
def locale_path
|
13
12
|
GettextSetup.locales_path
|
14
13
|
end
|
@@ -33,7 +32,7 @@ namespace :gettext do
|
|
33
32
|
end
|
34
33
|
|
35
34
|
def pot_file_path
|
36
|
-
File.join(locale_path, GettextSetup.config['project_name'] +
|
35
|
+
File.join(locale_path, GettextSetup.config['project_name'] + '.pot')
|
37
36
|
end
|
38
37
|
|
39
38
|
def generate_new_pot
|
@@ -43,36 +42,32 @@ namespace :gettext do
|
|
43
42
|
bugs_address = config['bugs_address']
|
44
43
|
copyright_holder = config['copyright_holder']
|
45
44
|
# Done this way to allow the user to enter an empty string in the config.
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
system("rxgettext -o locales/#{project_name}.pot --no-wrap --sort-by-file " +
|
53
|
-
"--no-location --add-comments#{comments_tag.to_s == '' ? '' : '=' + comments_tag} --msgid-bugs-address '#{bugs_address}' " +
|
54
|
-
"--package-name '#{package_name}' " +
|
55
|
-
"--package-version '#{version}' " +
|
45
|
+
comments_tag = config.key?('comments_tag') ? config['comments_tag'] : 'TRANSLATORS'
|
46
|
+
version = `git describe`
|
47
|
+
system("rxgettext -o locales/#{project_name}.pot --no-wrap --sort-by-file " \
|
48
|
+
"--add-comments#{comments_tag.to_s == '' ? '' : '=' + comments_tag} --msgid-bugs-address '#{bugs_address}' " \
|
49
|
+
"--package-name '#{package_name}' " \
|
50
|
+
"--package-version '#{version}' " \
|
56
51
|
"--copyright-holder='#{copyright_holder}' --copyright-year=#{Time.now.year} " +
|
57
|
-
|
52
|
+
files_to_translate.join(' '))
|
58
53
|
end
|
59
54
|
|
60
|
-
desc
|
55
|
+
desc 'Generate a new POT file and replace old if strings changed'
|
61
56
|
task :update_pot do
|
62
|
-
if !File.
|
63
|
-
puts
|
57
|
+
if !File.exist? pot_file_path
|
58
|
+
puts 'No existing POT file, generating new'
|
64
59
|
generate_new_pot
|
65
60
|
else
|
66
|
-
old_pot = pot_file_path +
|
61
|
+
old_pot = pot_file_path + '.old'
|
67
62
|
File.rename(pot_file_path, old_pot)
|
68
63
|
generate_new_pot
|
69
64
|
begin
|
70
65
|
_, stderr, status = Open3.capture3("msgcmp --use-untranslated '#{old_pot}' '#{pot_file_path}'")
|
71
66
|
if status == 1 || /this message is not used/.match(stderr)
|
72
67
|
File.delete(old_pot)
|
73
|
-
puts
|
68
|
+
puts 'String changes detected, replacing with updated POT file'
|
74
69
|
else
|
75
|
-
puts
|
70
|
+
puts 'No string changes detected, keeping old POT file'
|
76
71
|
File.rename(old_pot, pot_file_path)
|
77
72
|
end
|
78
73
|
rescue IOError
|
@@ -82,15 +77,15 @@ namespace :gettext do
|
|
82
77
|
end
|
83
78
|
end
|
84
79
|
|
85
|
-
desc
|
80
|
+
desc 'Generate POT file'
|
86
81
|
task :pot do
|
87
82
|
generate_new_pot
|
88
83
|
puts "POT file #{pot_file_path} has been generated"
|
89
84
|
end
|
90
85
|
|
91
|
-
desc
|
86
|
+
desc 'Update PO file for a specific language'
|
92
87
|
task :po, [:language] do |_, args|
|
93
|
-
language = args.language || ENV[
|
88
|
+
language = args.language || ENV['LANGUAGE']
|
94
89
|
|
95
90
|
# Let's do some pre-verification of the environment.
|
96
91
|
if language.nil?
|
@@ -102,8 +97,8 @@ namespace :gettext do
|
|
102
97
|
mkdir_p(language_path)
|
103
98
|
|
104
99
|
po_file_path = File.join(language_path,
|
105
|
-
GettextSetup.config['project_name'] +
|
106
|
-
if File.
|
100
|
+
GettextSetup.config['project_name'] + '.po')
|
101
|
+
if File.exist?(po_file_path)
|
107
102
|
system("msgmerge -U #{po_file_path} #{pot_file_path}")
|
108
103
|
else
|
109
104
|
system("msginit --no-translator -l #{language} -o #{po_file_path} -i #{pot_file_path}")
|
@@ -1,16 +1,16 @@
|
|
1
|
-
require
|
1
|
+
require 'rspec/expectations'
|
2
2
|
require_relative '../spec_helper'
|
3
3
|
|
4
4
|
describe GettextSetup do
|
5
5
|
before(:each) do
|
6
|
-
GettextSetup.initialize(File
|
6
|
+
GettextSetup.initialize(File.join(File.dirname(File.dirname(__FILE__)), 'fixtures', 'locales'))
|
7
7
|
end
|
8
8
|
let(:config) do
|
9
9
|
GettextSetup.config
|
10
10
|
end
|
11
11
|
context 'initialize' do
|
12
|
-
it
|
13
|
-
# GettextSetup.initialize(File
|
12
|
+
it 'sets up correctly' do
|
13
|
+
# GettextSetup.initialize(File.join(File.dirname(File.dirname(__FILE__)), 'fixtures'))
|
14
14
|
expect(GettextSetup.locales_path).to match(/\/spec\/fixtures/)
|
15
15
|
expect(config['project_name']).to eq('sinatra-i18n')
|
16
16
|
expect(config['package_name']).to eq('Sinatra i18n demo')
|
@@ -19,34 +19,34 @@ describe GettextSetup do
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
context 'negotiate_locale' do
|
22
|
-
it
|
22
|
+
it 'negotiates correctly' do
|
23
23
|
FastGettext.locale = GettextSetup.negotiate_locale('de')
|
24
24
|
expect(FastGettext.locale).to eq('de')
|
25
25
|
expect(_('Hello, world!')).to eq('Hallo, Welt!')
|
26
26
|
end
|
27
|
-
it
|
27
|
+
it 'chooses the default locale when no match is found' do
|
28
28
|
expect(GettextSetup.negotiate_locale('no-match')).to eq(config['default_locale'])
|
29
29
|
end
|
30
|
-
it
|
30
|
+
it 'chooses the language with the highest q value' do
|
31
31
|
expect(GettextSetup.negotiate_locale('en;q=1, de;q=2')).to eq('de')
|
32
32
|
expect(GettextSetup.negotiate_locale('en;q=1, de;q=0')).to eq('en')
|
33
33
|
end
|
34
|
-
it
|
34
|
+
it 'chooses the first value when q values are equal' do
|
35
35
|
expect(GettextSetup.negotiate_locale('de;q=1, en;q=1')).to eq('de')
|
36
36
|
end
|
37
37
|
end
|
38
|
-
context '
|
38
|
+
context 'setting default_locale' do
|
39
39
|
before :each do
|
40
|
-
GettextSetup.
|
40
|
+
GettextSetup.default_locale = 'en'
|
41
41
|
end
|
42
42
|
it 'allows setting the default locale' do
|
43
43
|
expect(GettextSetup.default_locale).to eq('en')
|
44
|
-
GettextSetup.
|
44
|
+
GettextSetup.default_locale = 'de'
|
45
45
|
expect(GettextSetup.default_locale).to eq('de')
|
46
46
|
end
|
47
47
|
end
|
48
48
|
context 'clear' do
|
49
|
-
it
|
49
|
+
it 'can clear the locale' do
|
50
50
|
expect(GettextSetup.default_locale).to eq('en')
|
51
51
|
expect(GettextSetup.candidate_locales).to include('en')
|
52
52
|
GettextSetup.clear
|
@@ -57,10 +57,12 @@ describe GettextSetup do
|
|
57
57
|
context 'multiple locales' do
|
58
58
|
# locales/ loads the de locale and alt_locales/ loads the jp locale
|
59
59
|
before(:all) do
|
60
|
-
GettextSetup.initialize(File
|
60
|
+
GettextSetup.initialize(File.join(File.dirname(File.dirname(__FILE__)), 'fixtures', 'alt_locales'))
|
61
61
|
end
|
62
62
|
it 'can aggregate locales across projects' do
|
63
|
-
expect(FastGettext.default_available_locales).to include('en'
|
63
|
+
expect(FastGettext.default_available_locales).to include('en')
|
64
|
+
expect(FastGettext.default_available_locales).to include('de')
|
65
|
+
expect(FastGettext.default_available_locales).to include('jp')
|
64
66
|
end
|
65
67
|
it 'can switch to loaded locale' do
|
66
68
|
FastGettext.locale = GettextSetup.negotiate_locale('de,en')
|
@@ -71,28 +73,28 @@ describe GettextSetup do
|
|
71
73
|
end
|
72
74
|
context 'translation repository chain' do
|
73
75
|
before(:all) do
|
74
|
-
GettextSetup.initialize(File
|
76
|
+
GettextSetup.initialize(File.join(File.dirname(File.dirname(__FILE__)), 'fixtures', 'alt_locales'))
|
75
77
|
end
|
76
78
|
it 'chain is not nil' do
|
77
79
|
expect(GettextSetup.translation_repositories).not_to be_nil
|
78
80
|
end
|
79
81
|
it 'can translate without switching text domains' do
|
80
|
-
FastGettext.locale =
|
82
|
+
FastGettext.locale = 'de'
|
81
83
|
expect(_('Hello, world!')).to eq('Hallo, Welt!')
|
82
|
-
FastGettext.locale =
|
84
|
+
FastGettext.locale = 'jp'
|
83
85
|
expect(_('Hello, world!')).to eq('こんにちは世界')
|
84
86
|
end
|
85
87
|
it 'does not allow duplicate repositories' do
|
86
|
-
GettextSetup.initialize(File
|
88
|
+
GettextSetup.initialize(File.join(File.dirname(File.dirname(__FILE__)), 'fixtures', 'alt_locales'))
|
87
89
|
repos = GettextSetup.translation_repositories
|
88
|
-
expect(repos.select { |k,
|
90
|
+
expect(repos.select { |k, _| k == 'alt_locales' }.size).to eq(1)
|
89
91
|
end
|
90
92
|
it 'does allow multiple unique domains' do
|
91
|
-
GettextSetup.initialize(File
|
93
|
+
GettextSetup.initialize(File.join(File.dirname(File.dirname(__FILE__)), 'fixtures', 'locales'))
|
92
94
|
repos = GettextSetup.translation_repositories
|
93
|
-
expect(repos.size
|
94
|
-
expect(repos.select { |k,
|
95
|
-
expect(repos.select { |k,
|
95
|
+
expect(repos.size == 2)
|
96
|
+
expect(repos.select { |k, _| k == 'alt_locales' }.size).to eq(1)
|
97
|
+
expect(repos.select { |k, _| k == 'sinatra-i18n' }.size).to eq(1)
|
96
98
|
end
|
97
99
|
end
|
98
100
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,195 +1,195 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gettext-setup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.19'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: fast_gettext
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
|
-
- -
|
16
|
+
- - ~>
|
18
17
|
- !ruby/object:Gem::Version
|
19
18
|
version: 1.1.0
|
20
|
-
|
19
|
+
name: fast_gettext
|
21
20
|
prerelease: false
|
21
|
+
type: :runtime
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: gettext
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
|
-
- -
|
30
|
+
- - '>='
|
32
31
|
- !ruby/object:Gem::Version
|
33
32
|
version: 3.0.2
|
34
|
-
|
33
|
+
name: gettext
|
35
34
|
prerelease: false
|
35
|
+
type: :runtime
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 3.0.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: locale
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
44
43
|
requirements:
|
45
|
-
- -
|
44
|
+
- - '>='
|
46
45
|
- !ruby/object:Gem::Version
|
47
46
|
version: '0'
|
48
|
-
|
47
|
+
name: locale
|
49
48
|
prerelease: false
|
49
|
+
type: :runtime
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name: bundler
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
|
-
- -
|
58
|
+
- - ~>
|
60
59
|
- !ruby/object:Gem::Version
|
61
60
|
version: '1.3'
|
62
|
-
|
61
|
+
name: bundler
|
63
62
|
prerelease: false
|
63
|
+
type: :development
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.3'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: rake
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
72
71
|
requirements:
|
73
|
-
- -
|
72
|
+
- - '>='
|
74
73
|
- !ruby/object:Gem::Version
|
75
74
|
version: '0'
|
76
|
-
|
75
|
+
name: rake
|
77
76
|
prerelease: false
|
77
|
+
type: :development
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: rack-test
|
85
84
|
requirement: !ruby/object:Gem::Requirement
|
86
85
|
requirements:
|
87
|
-
- -
|
86
|
+
- - '>='
|
88
87
|
- !ruby/object:Gem::Version
|
89
88
|
version: '0'
|
90
|
-
|
89
|
+
name: rack-test
|
91
90
|
prerelease: false
|
91
|
+
type: :development
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name: rspec
|
99
98
|
requirement: !ruby/object:Gem::Requirement
|
100
99
|
requirements:
|
101
|
-
- -
|
100
|
+
- - ~>
|
102
101
|
- !ruby/object:Gem::Version
|
103
102
|
version: '3.1'
|
104
|
-
|
103
|
+
name: rspec
|
105
104
|
prerelease: false
|
105
|
+
type: :development
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '3.1'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name: rspec-core
|
113
112
|
requirement: !ruby/object:Gem::Requirement
|
114
113
|
requirements:
|
115
|
-
- -
|
114
|
+
- - ~>
|
116
115
|
- !ruby/object:Gem::Version
|
117
116
|
version: '3.1'
|
118
|
-
|
117
|
+
name: rspec-core
|
119
118
|
prerelease: false
|
119
|
+
type: :development
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '3.1'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name: rspec-expectations
|
127
126
|
requirement: !ruby/object:Gem::Requirement
|
128
127
|
requirements:
|
129
|
-
- -
|
128
|
+
- - ~>
|
130
129
|
- !ruby/object:Gem::Version
|
131
130
|
version: '3.1'
|
132
|
-
|
131
|
+
name: rspec-expectations
|
133
132
|
prerelease: false
|
133
|
+
type: :development
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ~>
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '3.1'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name: rspec-mocks
|
141
140
|
requirement: !ruby/object:Gem::Requirement
|
142
141
|
requirements:
|
143
|
-
- -
|
142
|
+
- - ~>
|
144
143
|
- !ruby/object:Gem::Version
|
145
144
|
version: '3.1'
|
146
|
-
|
145
|
+
name: rspec-mocks
|
147
146
|
prerelease: false
|
147
|
+
type: :development
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ~>
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '3.1'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name: simplecov
|
155
154
|
requirement: !ruby/object:Gem::Requirement
|
156
155
|
requirements:
|
157
|
-
- -
|
156
|
+
- - '>='
|
158
157
|
- !ruby/object:Gem::Version
|
159
158
|
version: '0'
|
160
|
-
|
159
|
+
name: simplecov
|
161
160
|
prerelease: false
|
161
|
+
type: :development
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- -
|
164
|
+
- - '>='
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
|
-
name: webmock
|
169
168
|
requirement: !ruby/object:Gem::Requirement
|
170
169
|
requirements:
|
171
|
-
- -
|
170
|
+
- - '>='
|
172
171
|
- !ruby/object:Gem::Version
|
173
172
|
version: '0'
|
174
|
-
|
173
|
+
name: webmock
|
175
174
|
prerelease: false
|
175
|
+
type: :development
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- -
|
178
|
+
- - '>='
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
|
-
name: rubocop
|
183
182
|
requirement: !ruby/object:Gem::Requirement
|
184
183
|
requirements:
|
185
|
-
- -
|
184
|
+
- - '>='
|
186
185
|
- !ruby/object:Gem::Version
|
187
186
|
version: '0'
|
188
|
-
|
187
|
+
name: rubocop
|
189
188
|
prerelease: false
|
189
|
+
type: :development
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- -
|
192
|
+
- - '>='
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
195
|
description: A gem to ease i18n
|
@@ -201,8 +201,8 @@ extra_rdoc_files: []
|
|
201
201
|
files:
|
202
202
|
- LICENSE
|
203
203
|
- README.md
|
204
|
-
- lib/gettext-setup.rb
|
205
204
|
- lib/gettext-setup/gettext_setup.rb
|
205
|
+
- lib/gettext_setup.rb
|
206
206
|
- lib/tasks/gettext.rake
|
207
207
|
- locales/config-sample.yaml
|
208
208
|
- spec/fixtures/alt_locales/alt_locales.pot
|
@@ -217,33 +217,32 @@ homepage: https://github.com/puppetlabs/gettext-setup-gem
|
|
217
217
|
licenses:
|
218
218
|
- Apache-2.0
|
219
219
|
metadata: {}
|
220
|
-
post_install_message:
|
220
|
+
post_install_message:
|
221
221
|
rdoc_options: []
|
222
222
|
require_paths:
|
223
223
|
- lib
|
224
224
|
required_ruby_version: !ruby/object:Gem::Requirement
|
225
225
|
requirements:
|
226
|
-
- -
|
226
|
+
- - '>='
|
227
227
|
- !ruby/object:Gem::Version
|
228
228
|
version: 1.9.2
|
229
229
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
230
230
|
requirements:
|
231
|
-
- -
|
231
|
+
- - '>='
|
232
232
|
- !ruby/object:Gem::Version
|
233
233
|
version: '0'
|
234
234
|
requirements: []
|
235
|
-
rubyforge_project:
|
236
|
-
rubygems_version: 2.5
|
237
|
-
signing_key:
|
235
|
+
rubyforge_project:
|
236
|
+
rubygems_version: 2.4.5
|
237
|
+
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: A gem to ease internationalization with fast_gettext
|
240
240
|
test_files:
|
241
|
+
- spec/spec_helper.rb
|
241
242
|
- spec/fixtures/alt_locales/alt_locales.pot
|
242
243
|
- spec/fixtures/alt_locales/config.yaml
|
243
244
|
- spec/fixtures/alt_locales/jp/alt_locales.po
|
244
245
|
- spec/fixtures/locales/config.yaml
|
245
|
-
- spec/fixtures/locales/de/sinatra-i18n.po
|
246
246
|
- spec/fixtures/locales/sinatra-i18n.pot
|
247
|
+
- spec/fixtures/locales/de/sinatra-i18n.po
|
247
248
|
- spec/lib/gettext_setup_spec.rb
|
248
|
-
- spec/spec_helper.rb
|
249
|
-
has_rdoc:
|
data/lib/gettext-setup.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'gettext-setup/gettext_setup'
|