g11n 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +85 -0
- data/Rakefile +2 -0
- data/features/domain_specific_language.feature +16 -0
- data/features/get_a_translation.feature +56 -0
- data/features/stepdefs/domain_specific_language/setup_the_translations_path_the_locale_and_get_a_translation.rb +28 -0
- data/features/stepdefs/get_a_translation/simple_example_and_simple_translation.rb +24 -0
- data/features/support/env.rb +7 -0
- data/features/support/hooks.rb +12 -0
- data/g11n.gemspec +24 -0
- data/lib/g11n.rb +20 -0
- data/lib/g11n/configuration.rb +14 -0
- data/lib/g11n/dictionary.rb +21 -0
- data/lib/g11n/dsl.rb +13 -0
- data/lib/g11n/exceptions.rb +3 -0
- data/lib/g11n/translator.rb +54 -0
- data/lib/g11n/version.rb +3 -0
- data/spec/g11n/translator_spec.rb +109 -0
- metadata +161 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Fernando Via
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
# G11n is Globalization
|
2
|
+
|
3
|
+
Globalization (g11n) is a Ruby Gem for easy language file handling aimed at internationalized projects.
|
4
|
+
|
5
|
+
The developers of g11n are well aware of the existence of both i18n and r18n Ruby Gems, but wanted a new approach (specially in terms of simplicity) and this is the answer.
|
6
|
+
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
G11n assumes you will have a series of language files written in YAML in an accessible folder to your project, named after each language's locale and followed by the YAML extension. Both `.yaml` and `.yml` extensions are recognized.
|
10
|
+
|
11
|
+
The default path for that folder is `translations/`. So, for example, if you have a file named `translations/it.yaml` that reads as...
|
12
|
+
|
13
|
+
# ./translations/it.yaml
|
14
|
+
home:
|
15
|
+
title: La pasta di la nonna
|
16
|
+
menu:
|
17
|
+
preparation: Comme farla
|
18
|
+
eating: Comme si mangia
|
19
|
+
wine: Con che si accompagna
|
20
|
+
|
21
|
+
... you can, in your project, insert the following code and get the internationalized strings:
|
22
|
+
|
23
|
+
# .script.rb
|
24
|
+
require "g11n"
|
25
|
+
|
26
|
+
G11n.locale :it # Configures G11n to use italian. Default is "en"
|
27
|
+
|
28
|
+
G11n.t.home.title # => "La pasta di la nonna"
|
29
|
+
G11n.t.home.menu.wine # => "Con che si accompagna"
|
30
|
+
|
31
|
+
## Installation
|
32
|
+
|
33
|
+
$ gem install g11n
|
34
|
+
|
35
|
+
### Or when using Bundler
|
36
|
+
|
37
|
+
Add this line to your application's Gemfile:
|
38
|
+
|
39
|
+
gem 'g11n'
|
40
|
+
|
41
|
+
And then execute:
|
42
|
+
|
43
|
+
$ bundle
|
44
|
+
|
45
|
+
## Configuring
|
46
|
+
|
47
|
+
Configuration is straight forward. You are using another directory for your language files? Just `G11n.path "your/path"`. You want to change the locale? `G11n.locale :yours`.
|
48
|
+
|
49
|
+
# ./translations/ru.yml
|
50
|
+
home:
|
51
|
+
land: Российская Федерация
|
52
|
+
|
53
|
+
require "g11n"
|
54
|
+
|
55
|
+
G11n.path "i18ns"
|
56
|
+
G11n.locale :ru
|
57
|
+
|
58
|
+
G11n.t.home.land # => "Российская Федерация"
|
59
|
+
|
60
|
+
Also, the `G11n::DSL` module can be included in any object of class you want to use the `#t` method more confortably.
|
61
|
+
|
62
|
+
> **Note**: g11n is planned to soon be made a Sinatra extension
|
63
|
+
|
64
|
+
## Testing
|
65
|
+
|
66
|
+
Cucumber features and RSpec specs are provided to check functionality.
|
67
|
+
|
68
|
+
An exception is the G11n::Dictionary class, which is just a subclass of SymbolTable that recursively converts all hashes passed as argument to the initializer into Dictionaries. This is really handy.
|
69
|
+
|
70
|
+
## License
|
71
|
+
|
72
|
+
Copyright (C) 2012 Fetcher
|
73
|
+
|
74
|
+
This program is free software: you can redistribute it and/or modify
|
75
|
+
it under the terms of the GNU General Public License as published by
|
76
|
+
the Free Software Foundation, either version 3 of the License, or
|
77
|
+
(at your option) any later version.
|
78
|
+
|
79
|
+
This program is distributed in the hope that it will be useful,
|
80
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
81
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
82
|
+
GNU General Public License for more details.
|
83
|
+
|
84
|
+
You should have received a copy of the GNU General Public License
|
85
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
Feature: Domain Specific Language
|
2
|
+
In order to use the g11n engine easily
|
3
|
+
As a developer
|
4
|
+
I want to have a DSL in a Façade object
|
5
|
+
|
6
|
+
@rollback
|
7
|
+
Scenario: Setup the translations path, the locale and get a translation
|
8
|
+
Given a source file "i18n/uy.yaml" with:
|
9
|
+
"""
|
10
|
+
bebida:
|
11
|
+
nacional: Mate
|
12
|
+
"""
|
13
|
+
When I send :path "i18n" to the configuration DSL
|
14
|
+
And I send :locale :uy to the configuration DSL
|
15
|
+
And I run "bebida.nacional" on the :t method
|
16
|
+
Then I should see "Mate"
|
@@ -0,0 +1,56 @@
|
|
1
|
+
Feature: Get a translation
|
2
|
+
In order to get a translation of an identifier
|
3
|
+
As a developer of an internationalized app
|
4
|
+
I want to have a simple syntax
|
5
|
+
|
6
|
+
@rollback
|
7
|
+
Scenario: Simple example and simple translation
|
8
|
+
Given a source file "translations/en.yaml" with:
|
9
|
+
"""
|
10
|
+
hello: Hello World!
|
11
|
+
"""
|
12
|
+
When I have the locale setted as "en"
|
13
|
+
And I write "hello" in the translation engine
|
14
|
+
Then I should see "Hello World!"
|
15
|
+
|
16
|
+
@rollback
|
17
|
+
Scenario: Not so simple, more interesting case
|
18
|
+
Given a source file "translations/ru.yml" with:
|
19
|
+
"""
|
20
|
+
home:
|
21
|
+
country: Российская Федерация
|
22
|
+
"""
|
23
|
+
When I have the locale setted as "ru"
|
24
|
+
And I write "home.country" in the translation engine
|
25
|
+
Then I should see "Российская Федерация"
|
26
|
+
|
27
|
+
@rollback
|
28
|
+
Scenario: With several languages and changing language on the fly
|
29
|
+
Given a source file "translations/es-ar.yaml" with:
|
30
|
+
"""
|
31
|
+
home:
|
32
|
+
country:
|
33
|
+
legal_name: República Argentina
|
34
|
+
"""
|
35
|
+
And a source file "translations/ja.yml" with:
|
36
|
+
"""
|
37
|
+
home:
|
38
|
+
country:
|
39
|
+
legal_name: 日本国
|
40
|
+
"""
|
41
|
+
When I have the locale setted as "es-ar"
|
42
|
+
And I write "home.country.legal_name" in the translation engine
|
43
|
+
Then I should see "República Argentina"
|
44
|
+
When I have the locale setted as "ja"
|
45
|
+
And I write "home.country.legal_name" in the translation engine
|
46
|
+
Then I should see "日本国"
|
47
|
+
|
48
|
+
@rollback
|
49
|
+
Scenario: Locale left default
|
50
|
+
Given a source file "translations/en.yaml" with:
|
51
|
+
"""
|
52
|
+
comes:
|
53
|
+
from: USA
|
54
|
+
"""
|
55
|
+
When I write "comes.from" in the translation engine
|
56
|
+
Then I should see "USA"
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#Scenario: Setup the translations path, the locale and get a translation
|
2
|
+
# Given a source file "i18n/uy.yaml" with:
|
3
|
+
# """
|
4
|
+
# bebida:
|
5
|
+
# nacional: Mate
|
6
|
+
# """
|
7
|
+
# When I send :path "i18n" to the DSL
|
8
|
+
# And I send :locale :uy to the DSL
|
9
|
+
# And I run "bebida.nacional" on the :t method
|
10
|
+
# Then I should see "Mate"
|
11
|
+
|
12
|
+
When /^I send :(\w+) "(.+?)" to the configuration DSL$/ do |message, argument|
|
13
|
+
o = Object.new
|
14
|
+
o.extend G11n::Configuration
|
15
|
+
o.send message.to_sym, argument
|
16
|
+
end
|
17
|
+
|
18
|
+
And /^I send :(\w+) :(\w+) to the configuration DSL$/ do |message, argument|
|
19
|
+
o = Object.new
|
20
|
+
o.extend G11n::Configuration
|
21
|
+
o.send message.to_sym, argument
|
22
|
+
end
|
23
|
+
|
24
|
+
And /^I run "(.*?)" on the :(\w+) method$/ do |argument, message|
|
25
|
+
o = Object.new
|
26
|
+
o.extend G11n::DSL
|
27
|
+
@the_translation = eval "o.#{message}.#{argument}"
|
28
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#Scenario: Simple example and simple translation
|
2
|
+
# Given a source file "translations/en.yaml" with:
|
3
|
+
# """
|
4
|
+
# hello: Hello World!
|
5
|
+
# """
|
6
|
+
# When I have the locale setted as "en"
|
7
|
+
# And I write "hello" in the translation engine
|
8
|
+
# Then I should see "Hello World!"
|
9
|
+
|
10
|
+
Given /^a source file "(.*?)" with:$/ do |file, content|
|
11
|
+
Fast.file.write file, content
|
12
|
+
end
|
13
|
+
|
14
|
+
When /^I have the locale setted as "(.*?)"$/ do |locale|
|
15
|
+
G11n::Translator.instance.locale = locale.to_sym
|
16
|
+
end
|
17
|
+
|
18
|
+
And /^I write "(.*?)" in the translation engine$/ do |identifier|
|
19
|
+
@the_translation = eval "G11n::Translator.instance.translate.#{identifier}"
|
20
|
+
end
|
21
|
+
|
22
|
+
Then /^I should see "(.*?)"$/ do |text|
|
23
|
+
@the_translation.should == text
|
24
|
+
end
|
data/g11n.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/g11n/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Xavier Via"]
|
6
|
+
gem.email = ["xavier.via.canel@gmail.com"]
|
7
|
+
gem.description = %q{Internationalization library focused in simplicity of implementation}
|
8
|
+
gem.summary = %q{Internationalization library focused in simplicity of implementation}
|
9
|
+
gem.homepage = "http://github.com/Fetcher/g11n"
|
10
|
+
|
11
|
+
gem.add_dependency "symboltable"
|
12
|
+
|
13
|
+
gem.add_development_dependency "rspec"
|
14
|
+
gem.add_development_dependency "cucumber"
|
15
|
+
gem.add_development_dependency "fast"
|
16
|
+
gem.add_development_dependency "pry"
|
17
|
+
|
18
|
+
gem.files = `git ls-files`.split($\)
|
19
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
20
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
21
|
+
gem.name = "g11n"
|
22
|
+
gem.require_paths = ["lib"]
|
23
|
+
gem.version = G11n::VERSION
|
24
|
+
end
|
data/lib/g11n.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Core
|
2
|
+
require "singleton"
|
3
|
+
|
4
|
+
# Third-party
|
5
|
+
require "symboltable"
|
6
|
+
|
7
|
+
# Local
|
8
|
+
require "g11n/version"
|
9
|
+
require "g11n/translator"
|
10
|
+
require "g11n/dictionary"
|
11
|
+
require "g11n/exceptions"
|
12
|
+
require "g11n/dsl"
|
13
|
+
require "g11n/configuration"
|
14
|
+
|
15
|
+
module G11n
|
16
|
+
class << self
|
17
|
+
include DSL
|
18
|
+
include Configuration
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module G11n
|
2
|
+
# DSL for the configuration of G11n
|
3
|
+
module Configuration
|
4
|
+
# Sets the translations path
|
5
|
+
def path the_path
|
6
|
+
Translator.instance.translations_path = the_path + "/"
|
7
|
+
end
|
8
|
+
|
9
|
+
# Sets the locale
|
10
|
+
def locale the_locale
|
11
|
+
Translator.instance.locale = the_locale
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Stupid but really useful class:
|
2
|
+
# Inherits from SymbolTable (https://github.com/mjijackson/symboltable), but when it is initialized
|
3
|
+
# it simply... well, recursively converts all Hashes into dictionaries
|
4
|
+
module G11n
|
5
|
+
class Dictionary < SymbolTable
|
6
|
+
|
7
|
+
def initialize *args
|
8
|
+
super *args
|
9
|
+
_symbolize!
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
def _symbolize!
|
14
|
+
each_key do |key|
|
15
|
+
if self[key].instance_of? Hash
|
16
|
+
self[key] = Dictionary.new self[key]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/g11n/dsl.rb
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
module G11n
|
2
|
+
# Manages the configuration of the G11n library
|
3
|
+
class Translator
|
4
|
+
include Singleton
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
reset
|
8
|
+
end
|
9
|
+
|
10
|
+
# Sets the locale. Fails if the locale matches no available file
|
11
|
+
def locale= the_locale
|
12
|
+
unless locale_file_exists_for? the_locale
|
13
|
+
raise NoTranslationAvailable, "There is no translation file available for the '#{the_locale}' locale, check the tranlations source directory configuration"
|
14
|
+
end
|
15
|
+
@locale = the_locale
|
16
|
+
end
|
17
|
+
|
18
|
+
# Sets the path where translations will be looked for
|
19
|
+
def translations_path= the_path
|
20
|
+
@translations_path = the_path
|
21
|
+
end
|
22
|
+
|
23
|
+
# Forwards the method call to the right "dictionary" (a SymbolTable object)
|
24
|
+
# http://mjijackson.com/2010/04/config-revisited
|
25
|
+
# What it truely does the #translate method is to retrieve the right SymbolTable object from the
|
26
|
+
# dictionary
|
27
|
+
def translate
|
28
|
+
dictionary_for @locale
|
29
|
+
end
|
30
|
+
|
31
|
+
# Looks and returns the right dictionary for the given locale
|
32
|
+
def dictionary_for the_locale
|
33
|
+
return @dictionaries[the_locale] if @dictionaries.has_key? the_locale # In case is already loaded
|
34
|
+
if File.exists? "#{@translations_path}#{the_locale}.yaml"
|
35
|
+
@dictionaries[the_locale] = Dictionary.new YAML.load_file "#{@translations_path}#{the_locale}.yaml"
|
36
|
+
elsif File.exists? "#{@translations_path}#{the_locale}.yml"
|
37
|
+
@dictionaries[the_locale] = Dictionary.new YAML.load_file "#{@translations_path}#{the_locale}.yml"
|
38
|
+
else
|
39
|
+
raise NoTranslationAvailable, "There is no translation file available for the '#{the_locale}' locale, check the tranlations source directory configuration"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
def locale_file_exists_for? the_locale
|
45
|
+
File.exists?("#{@translations_path}#{the_locale}.yaml") || File.exists?("#{@translations_path}#{the_locale}.yml")
|
46
|
+
end
|
47
|
+
|
48
|
+
def reset
|
49
|
+
@translations_path = "translations/"
|
50
|
+
@dictionaries = {}
|
51
|
+
@locale = :en
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
data/lib/g11n/version.rb
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
require "g11n"
|
2
|
+
require "fast/fast"
|
3
|
+
require "pry"
|
4
|
+
|
5
|
+
def low_level_deconfigurate!
|
6
|
+
Fast.dir.delete! :translations
|
7
|
+
|
8
|
+
class << G11n::Translator.instance
|
9
|
+
def cleanup
|
10
|
+
reset
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
G11n::Translator.instance.cleanup
|
15
|
+
end
|
16
|
+
|
17
|
+
describe G11n::Translator do
|
18
|
+
after :each do
|
19
|
+
low_level_deconfigurate!
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "#locale=" do
|
23
|
+
context "there is no available file for that locale" do
|
24
|
+
it "should raise a relevant error" do
|
25
|
+
expect { G11n::Translator.instance.locale = :ru
|
26
|
+
}.to raise_error G11n::NoTranslationAvailable,
|
27
|
+
"There is no translation file available for the 'ru' locale, check the tranlations source directory configuration"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
context "there is a file available for that locale" do
|
32
|
+
before { Fast.file.write "translations/en.yaml", "text: Hello" }
|
33
|
+
|
34
|
+
it "should set the locale as the given argument" do
|
35
|
+
G11n::Translator.instance.locale = :en
|
36
|
+
class << G11n::Translator.instance
|
37
|
+
def test_me
|
38
|
+
@locale.should == :en
|
39
|
+
end
|
40
|
+
end
|
41
|
+
G11n::Translator.instance.test_me
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "#translations_path=" do
|
47
|
+
it "sets the translations path" do
|
48
|
+
G11n::Translator.instance.translations_path = "other_path"
|
49
|
+
class << G11n::Translator.instance
|
50
|
+
def test_me
|
51
|
+
@translations_path.should == "other_path"
|
52
|
+
end
|
53
|
+
end
|
54
|
+
G11n::Translator.instance.test_me
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe "#dictionary_for" do
|
59
|
+
context "there is in fact a dictionary for the locale" do
|
60
|
+
before do
|
61
|
+
Fast.file.write "translations/en.yaml", { :hello => "Text", :nested => { :is => "good" } }.to_yaml
|
62
|
+
end
|
63
|
+
|
64
|
+
it "should return the G11n::Dictionary object with the information from the YAML file" do
|
65
|
+
dictionary = G11n::Translator.instance.dictionary_for :en
|
66
|
+
dictionary.should be_a G11n::Dictionary
|
67
|
+
dictionary.should have_key :hello
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
describe "#translate" do
|
73
|
+
context "there is a file usable for translation" do
|
74
|
+
before do
|
75
|
+
Fast.file.write "translations/en.yaml", { :text => "Hello" }.to_yaml
|
76
|
+
end
|
77
|
+
|
78
|
+
it "should return the translated string" do
|
79
|
+
G11n::Translator.instance.translate.text.should == "Hello"
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# PRIVATE methods
|
85
|
+
describe "#locale_file_exists_for?" do
|
86
|
+
context "the file in deed exists" do
|
87
|
+
before { Fast.file.touch "translations/en.yaml" }
|
88
|
+
it "should return true" do
|
89
|
+
class << G11n::Translator.instance
|
90
|
+
def test_me
|
91
|
+
locale_file_exists_for?(:en).should == true
|
92
|
+
end
|
93
|
+
end
|
94
|
+
G11n::Translator.instance.test_me
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
context "there's no such file" do
|
99
|
+
it "should return false" do
|
100
|
+
class << G11n::Translator.instance
|
101
|
+
def test_me
|
102
|
+
locale_file_exists_for?(:en).should == false
|
103
|
+
end
|
104
|
+
end
|
105
|
+
G11n::Translator.instance.test_me
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
metadata
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: g11n
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Xavier Via
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2012-07-24 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: symboltable
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: rspec
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
46
|
+
type: :development
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: cucumber
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
60
|
+
type: :development
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: fast
|
64
|
+
prerelease: false
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
74
|
+
type: :development
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: pry
|
78
|
+
prerelease: false
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
hash: 3
|
85
|
+
segments:
|
86
|
+
- 0
|
87
|
+
version: "0"
|
88
|
+
type: :development
|
89
|
+
version_requirements: *id005
|
90
|
+
description: Internationalization library focused in simplicity of implementation
|
91
|
+
email:
|
92
|
+
- xavier.via.canel@gmail.com
|
93
|
+
executables: []
|
94
|
+
|
95
|
+
extensions: []
|
96
|
+
|
97
|
+
extra_rdoc_files: []
|
98
|
+
|
99
|
+
files:
|
100
|
+
- .gitignore
|
101
|
+
- Gemfile
|
102
|
+
- LICENSE
|
103
|
+
- README.md
|
104
|
+
- Rakefile
|
105
|
+
- features/domain_specific_language.feature
|
106
|
+
- features/get_a_translation.feature
|
107
|
+
- features/stepdefs/domain_specific_language/setup_the_translations_path_the_locale_and_get_a_translation.rb
|
108
|
+
- features/stepdefs/get_a_translation/simple_example_and_simple_translation.rb
|
109
|
+
- features/support/env.rb
|
110
|
+
- features/support/hooks.rb
|
111
|
+
- g11n.gemspec
|
112
|
+
- lib/g11n.rb
|
113
|
+
- lib/g11n/configuration.rb
|
114
|
+
- lib/g11n/dictionary.rb
|
115
|
+
- lib/g11n/dsl.rb
|
116
|
+
- lib/g11n/exceptions.rb
|
117
|
+
- lib/g11n/translator.rb
|
118
|
+
- lib/g11n/version.rb
|
119
|
+
- spec/g11n/translator_spec.rb
|
120
|
+
homepage: http://github.com/Fetcher/g11n
|
121
|
+
licenses: []
|
122
|
+
|
123
|
+
post_install_message:
|
124
|
+
rdoc_options: []
|
125
|
+
|
126
|
+
require_paths:
|
127
|
+
- lib
|
128
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
hash: 3
|
134
|
+
segments:
|
135
|
+
- 0
|
136
|
+
version: "0"
|
137
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
hash: 3
|
143
|
+
segments:
|
144
|
+
- 0
|
145
|
+
version: "0"
|
146
|
+
requirements: []
|
147
|
+
|
148
|
+
rubyforge_project:
|
149
|
+
rubygems_version: 1.8.24
|
150
|
+
signing_key:
|
151
|
+
specification_version: 3
|
152
|
+
summary: Internationalization library focused in simplicity of implementation
|
153
|
+
test_files:
|
154
|
+
- features/domain_specific_language.feature
|
155
|
+
- features/get_a_translation.feature
|
156
|
+
- features/stepdefs/domain_specific_language/setup_the_translations_path_the_locale_and_get_a_translation.rb
|
157
|
+
- features/stepdefs/get_a_translation/simple_example_and_simple_translation.rb
|
158
|
+
- features/support/env.rb
|
159
|
+
- features/support/hooks.rb
|
160
|
+
- spec/g11n/translator_spec.rb
|
161
|
+
has_rdoc:
|