rich_i18n 1.2.3 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -1
- data/README.textile +56 -29
- data/Rakefile +22 -8
- data/VERSION +1 -1
- data/{lib/app → app}/views/rich_i18n.html.erb +0 -0
- data/{lib/assets → assets}/jzip/jquery/core.jz +0 -0
- data/{lib/assets → assets}/jzip/jquery/extensions/modules.js +0 -0
- data/{lib/assets → assets}/jzip/jquery/seat_holder.js +31 -31
- data/{lib/assets → assets}/jzip/rich.js +0 -0
- data/{lib/assets → assets}/jzip/rich/i18n.js +2 -2
- data/{lib/assets → assets}/jzip/rich_i18n.jz +0 -0
- data/lib/generators/rich.rb +25 -0
- data/lib/generators/rich/translation/templates/migration.rb +18 -0
- data/lib/generators/rich/translation/templates/model.rb +7 -0
- data/lib/generators/rich/translation/translation_generator.rb +59 -0
- data/lib/rich/i18n.rb +2 -2
- data/lib/rich/i18n/actionpack.rb +0 -1
- data/lib/rich/i18n/actionpack/action_controller/base.rb +3 -3
- data/lib/rich/i18n/actionpack/action_view/base.rb +3 -3
- data/lib/rich/i18n/actionpack/action_view/sanitizor.rb +14 -20
- data/lib/rich/i18n/activesupport.rb +1 -0
- data/lib/rich/i18n/activesupport/active_support/dependencies.rb +12 -0
- data/lib/rich/i18n/core/array.rb +0 -2
- data/lib/rich/i18n/core/array/merging.rb +5 -7
- data/lib/rich/i18n/core/enriched_string.rb +68 -25
- data/lib/rich/i18n/core/object.rb +2 -2
- data/lib/rich/i18n/core/object/enriched.rb +16 -0
- data/lib/rich/i18n/core/string.rb +4 -2
- data/lib/rich/i18n/core/{object/output.rb → string/enriched.rb} +8 -8
- data/lib/rich/i18n/core/string/html_safe.rb +18 -0
- data/lib/rich/i18n/core/string/inflections.rb +9 -9
- data/lib/rich/i18n/core/string/internationalization.rb +20 -18
- data/lib/rich/i18n/core/symbol/internationalization.rb +2 -2
- data/lib/rich/i18n/engine.rb +71 -61
- data/lib/rich/i18n/formtastic.rb +15 -13
- data/lib/rich/i18n/rails.rb +1 -0
- data/lib/rich/i18n/rails/engine.rb +5 -0
- data/lib/rich_i18n.rb +3 -3
- data/locales/nl.yml +3 -3
- data/rails_generators/rich_i18n_translation/rich_i18n_translation_generator.rb +3 -3
- data/rails_generators/rich_i18n_translation/templates/migration.rb +1 -1
- data/rails_generators/rich_i18n_translation/templates/model.rb +2 -2
- data/rich_i18n.gemspec +159 -33
- data/test/rails-2/dummy/Gemfile +5 -0
- data/test/rails-2/dummy/Gemfile.lock +50 -0
- data/test/rails-2/dummy/Rakefile +10 -0
- data/test/rails-2/dummy/app/controllers/application_controller.rb +10 -0
- data/test/rails-2/dummy/app/helpers/application_helper.rb +3 -0
- data/test/rails-2/dummy/config/boot.rb +124 -0
- data/test/rails-2/dummy/config/database.yml +22 -0
- data/test/rails-2/dummy/config/environment.rb +41 -0
- data/test/rails-2/dummy/config/environments/development.rb +17 -0
- data/test/rails-2/dummy/config/environments/production.rb +28 -0
- data/test/rails-2/dummy/config/environments/test.rb +28 -0
- data/test/rails-2/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails-2/dummy/config/initializers/cookie_verification_secret.rb +7 -0
- data/test/rails-2/dummy/config/initializers/inflections.rb +10 -0
- data/test/rails-2/dummy/config/initializers/mime_types.rb +5 -0
- data/test/rails-2/dummy/config/initializers/new_rails_defaults.rb +21 -0
- data/test/rails-2/dummy/config/initializers/session_store.rb +15 -0
- data/test/rails-2/dummy/config/locales/en.yml +5 -0
- data/test/rails-2/dummy/config/preinitializer.rb +20 -0
- data/test/rails-2/dummy/config/routes.rb +43 -0
- data/test/rails-2/dummy/db/seeds.rb +7 -0
- data/test/rails-2/dummy/db/test.sqlite3 +0 -0
- data/test/rails-2/dummy/log/development.log +0 -0
- data/test/rails-2/dummy/log/production.log +0 -0
- data/test/rails-2/dummy/log/server.log +0 -0
- data/test/rails-2/dummy/log/test.log +0 -0
- data/test/rails-2/dummy/public/404.html +30 -0
- data/test/rails-2/dummy/public/422.html +30 -0
- data/test/rails-2/dummy/public/500.html +30 -0
- data/test/rails-2/dummy/public/favicon.ico +0 -0
- data/test/rails-2/dummy/public/images/rails.png +0 -0
- data/test/rails-2/dummy/public/index.html +275 -0
- data/test/rails-2/dummy/public/javascripts/application.js +2 -0
- data/test/rails-2/dummy/public/javascripts/controls.js +963 -0
- data/test/rails-2/dummy/public/javascripts/dragdrop.js +973 -0
- data/test/rails-2/dummy/public/javascripts/effects.js +1128 -0
- data/test/rails-2/dummy/public/javascripts/prototype.js +4320 -0
- data/test/rails-2/dummy/public/robots.txt +5 -0
- data/test/rails-2/dummy/script/about +4 -0
- data/test/rails-2/dummy/script/console +3 -0
- data/test/rails-2/dummy/script/dbconsole +3 -0
- data/test/rails-2/dummy/script/destroy +3 -0
- data/test/rails-2/dummy/script/generate +3 -0
- data/test/rails-2/dummy/script/performance/benchmarker +3 -0
- data/test/rails-2/dummy/script/performance/profiler +3 -0
- data/test/rails-2/dummy/script/plugin +3 -0
- data/test/rails-2/dummy/script/runner +3 -0
- data/test/rails-2/dummy/script/server +3 -0
- data/test/rails-2/test_helper.rb +5 -0
- data/test/rails-3/dummy/Gemfile +5 -0
- data/test/rails-3/dummy/Gemfile.lock +93 -0
- data/test/rails-3/dummy/Rakefile +7 -0
- data/test/rails-3/dummy/app/controllers/application_controller.rb +3 -0
- data/test/rails-3/dummy/app/helpers/application_helper.rb +2 -0
- data/test/rails-3/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/rails-3/dummy/config.ru +4 -0
- data/test/rails-3/dummy/config/application.rb +44 -0
- data/test/rails-3/dummy/config/boot.rb +10 -0
- data/test/rails-3/dummy/config/database.yml +22 -0
- data/test/rails-3/dummy/config/environment.rb +5 -0
- data/test/rails-3/dummy/config/environments/development.rb +26 -0
- data/test/rails-3/dummy/config/environments/production.rb +49 -0
- data/test/rails-3/dummy/config/environments/test.rb +35 -0
- data/test/rails-3/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails-3/dummy/config/initializers/inflections.rb +10 -0
- data/test/rails-3/dummy/config/initializers/mime_types.rb +5 -0
- data/test/rails-3/dummy/config/initializers/secret_token.rb +7 -0
- data/test/rails-3/dummy/config/initializers/session_store.rb +8 -0
- data/test/rails-3/dummy/config/locales/en.yml +5 -0
- data/test/rails-3/dummy/config/routes.rb +58 -0
- data/test/rails-3/dummy/db/test.sqlite3 +0 -0
- data/test/rails-3/dummy/log/development.log +0 -0
- data/test/rails-3/dummy/log/production.log +0 -0
- data/test/rails-3/dummy/log/server.log +0 -0
- data/test/rails-3/dummy/log/test.log +0 -0
- data/test/rails-3/dummy/public/404.html +26 -0
- data/test/rails-3/dummy/public/422.html +26 -0
- data/test/rails-3/dummy/public/500.html +26 -0
- data/test/rails-3/dummy/public/favicon.ico +0 -0
- data/test/rails-3/dummy/public/javascripts/application.js +2 -0
- data/test/rails-3/dummy/public/javascripts/controls.js +965 -0
- data/test/rails-3/dummy/public/javascripts/dragdrop.js +974 -0
- data/test/rails-3/dummy/public/javascripts/effects.js +1123 -0
- data/test/rails-3/dummy/public/javascripts/prototype.js +6001 -0
- data/test/rails-3/dummy/public/javascripts/rails.js +175 -0
- data/test/rails-3/dummy/public/stylesheets/.gitkeep +0 -0
- data/test/rails-3/dummy/script/rails +6 -0
- data/test/rails-3/test_helper.rb +8 -0
- data/test/tests/core/array/merging_test.rb +14 -0
- data/test/tests/core/enriched_string_test.rb +20 -0
- data/test/tests/core/string/inflections_test.rb +32 -0
- data/test/tests/core/string/merging_test.rb +15 -0
- data/test/tests/locales/nl/internationalization_test.rb +55 -0
- metadata +183 -44
- data/lib/rich/i18n/actionpack/action_controller/dispatcher.rb +0 -12
- data/lib/rich/i18n/core/enumerable/methods.rb +0 -16
- data/lib/rich/i18n/core/hash.rb +0 -6
- data/lib/rich/i18n/core/nil_class.rb +0 -8
- data/lib/rich/i18n/core/string/enrichments.rb +0 -66
- data/test/core/string/inflections_test.rb +0 -42
- data/test/core/string/internationalization_test.rb +0 -23
- data/test/engine_test.rb +0 -20
- data/test/locales/nl/internationalization_test.rb +0 -47
- data/test/setup.rb +0 -14
- data/test/test_helper.rb +0 -5
@@ -0,0 +1,18 @@
|
|
1
|
+
class <%= migration_class_name %> < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :<%= table_name %> do |t|
|
4
|
+
t.string :locale
|
5
|
+
t.string :key
|
6
|
+
t.text :value
|
7
|
+
t.boolean :is_proc, :default => false
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :<%= table_name %>, :locale
|
12
|
+
add_index :<%= table_name %>, :key
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.down
|
16
|
+
drop_table :<%= table_name %>
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require "generators/rich"
|
2
|
+
|
3
|
+
module Rich
|
4
|
+
module Generators
|
5
|
+
|
6
|
+
class TranslationGenerator < Base
|
7
|
+
|
8
|
+
include Rails::Generators::Migration
|
9
|
+
include Rich::Generators::Migration
|
10
|
+
|
11
|
+
desc "Creates Rich-i18n translation model and migration."
|
12
|
+
argument :model_name, :type => :string , :default => "translation"
|
13
|
+
class_option :migrate , :type => :boolean, :default => false, :aliases => "-m", :desc => "Run 'rake db:migrate' after generating model and migration"
|
14
|
+
|
15
|
+
def enable_i18n_cms
|
16
|
+
filename = "config/initializers/enrichments.rb"
|
17
|
+
line = "\nRich::I18n::Engine.enable_i18n_cms"
|
18
|
+
|
19
|
+
return if File.open(filename, "a+").readlines.include? line.strip
|
20
|
+
|
21
|
+
File.open(filename, "a+") do |file|
|
22
|
+
file << line
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def generate_model
|
27
|
+
template "model.rb", "app/models/#{model_file_name}.rb"
|
28
|
+
end
|
29
|
+
|
30
|
+
def generate_migration
|
31
|
+
migration_template "migration.rb", "db/migrate/create_#{table_name}"
|
32
|
+
end
|
33
|
+
|
34
|
+
def migrate
|
35
|
+
rake "db:migrate" if options[:migrate]
|
36
|
+
end
|
37
|
+
|
38
|
+
protected
|
39
|
+
|
40
|
+
def model_file_name
|
41
|
+
model_name.underscore
|
42
|
+
end
|
43
|
+
|
44
|
+
def model_class_name
|
45
|
+
model_name.classify
|
46
|
+
end
|
47
|
+
|
48
|
+
def migration_class_name
|
49
|
+
migration_file_name.pluralize.camelize
|
50
|
+
end
|
51
|
+
|
52
|
+
def table_name
|
53
|
+
model_file_name.underscore.gsub("/", "_").pluralize
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
end
|
data/lib/rich/i18n.rb
CHANGED
data/lib/rich/i18n/actionpack.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
|
2
2
|
require File.join(File.dirname(__FILE__), "actionpack", "action_controller", "base.rb" )
|
3
|
-
require File.join(File.dirname(__FILE__), "actionpack", "action_controller", "dispatcher.rb")
|
4
3
|
require File.join(File.dirname(__FILE__), "actionpack", "action_view" , "base.rb" )
|
5
4
|
require File.join(File.dirname(__FILE__), "actionpack", "action_view" , "sanitizor.rb" )
|
@@ -3,7 +3,7 @@ module ActionController
|
|
3
3
|
class Base
|
4
4
|
|
5
5
|
around_filter :prepare_rich_i18n
|
6
|
-
|
6
|
+
|
7
7
|
def prepare_rich_i18n
|
8
8
|
String.clear_translations
|
9
9
|
::Rich::I18n::Engine.current_controller = self
|
@@ -11,8 +11,8 @@ module ActionController
|
|
11
11
|
ensure
|
12
12
|
::Rich::I18n::Engine.current_controller = nil
|
13
13
|
end
|
14
|
-
|
15
|
-
view_path = File.
|
14
|
+
|
15
|
+
view_path = File.expand_path "../../../../../../app/views", __FILE__
|
16
16
|
if respond_to? :append_view_path
|
17
17
|
self.append_view_path view_path
|
18
18
|
elsif respond_to? :view_paths
|
@@ -2,9 +2,9 @@
|
|
2
2
|
module ActionView
|
3
3
|
class Base
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
def rich_i18n
|
6
|
+
render :file => File.expand_path("../../../../../../app/views/rich_i18n.html.erb", __FILE__)
|
7
|
+
end
|
8
8
|
|
9
9
|
def render_with_rich_i18n(*args, &block)
|
10
10
|
(html = render_without_rich_i18n(*args, &block)).include?("<i18n ") ?
|
@@ -5,40 +5,36 @@ module Rich
|
|
5
5
|
module ActionView
|
6
6
|
module Sanitizor
|
7
7
|
extend self
|
8
|
-
|
8
|
+
|
9
9
|
require "hpricot"
|
10
|
-
|
10
|
+
|
11
11
|
def sanitize_html(html)
|
12
12
|
return html unless (html || "").include?("<i18n ")
|
13
|
-
|
13
|
+
|
14
14
|
doc = Hpricot html
|
15
15
|
|
16
|
-
(doc/"head i18n").each do |i18n|
|
17
|
-
i18n.swap
|
16
|
+
(doc/"head i18n,select i18n").each do |i18n|
|
17
|
+
i18n.swap strip_tags(i18n.raw_attributes["data-i18n_translation"])
|
18
|
+
end
|
19
|
+
|
20
|
+
(doc/"input,textarea").each do |input|
|
21
|
+
sanitize_input(input)
|
18
22
|
end
|
19
23
|
|
20
24
|
(doc/"i18n").each do |i18n|
|
21
|
-
elem = Hpricot::Elem.new i18n.raw_attributes["data-editable_input_type"] == "html" ? "div" : "span",
|
25
|
+
elem = Hpricot::Elem.new i18n.raw_attributes["data-i18n_tag"] || (i18n.raw_attributes["data-editable_input_type"] == "html" ? "div" : "span"),
|
22
26
|
i18n.raw_attributes.reject{|k, v| k == "data-i18n_translation"}.merge({:class => "i18n"})
|
23
27
|
elem.inner_html = CGI.unescapeHTML(i18n.raw_attributes["data-i18n_translation"])
|
24
28
|
i18n.swap elem.to_html
|
25
29
|
end
|
26
30
|
|
27
|
-
(doc/"input").each do |input|
|
28
|
-
sanitize_input(input)
|
29
|
-
end
|
30
|
-
|
31
|
-
(doc/"textarea").each do |input|
|
32
|
-
sanitize_input(input)
|
33
|
-
end
|
34
|
-
|
35
31
|
doc.to_html
|
36
32
|
rescue
|
37
33
|
html.gsub(/(\<i18n[^\>]+\>)|(\<\/i18n\>)/, "")
|
38
34
|
end
|
39
|
-
|
35
|
+
|
40
36
|
private
|
41
|
-
|
37
|
+
|
42
38
|
def sanitize_input(input)
|
43
39
|
%w(value seatholder).each do |input_attr|
|
44
40
|
next unless input.attributes[input_attr].include?("<i18n ")
|
@@ -47,14 +43,12 @@ module Rich
|
|
47
43
|
i18n.raw_attributes.each do |key, value|
|
48
44
|
input.attributes[key] = value unless key == "data-i18n_translation"
|
49
45
|
end
|
50
|
-
|
46
|
+
|
51
47
|
input.attributes[input_attr] = CGI.unescapeHTML(i18n.raw_attributes["data-i18n_translation"])
|
52
48
|
input.attributes["class"] = ["i18n", input.attributes["class"]].uniq.join(" ").strip
|
53
49
|
end
|
54
|
-
|
55
|
-
input
|
56
50
|
end
|
57
|
-
|
51
|
+
|
58
52
|
end
|
59
53
|
end
|
60
54
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "activesupport", "active_support", "dependencies.rb")
|
data/lib/rich/i18n/core/array.rb
CHANGED
@@ -4,24 +4,22 @@ module Rich
|
|
4
4
|
module Core
|
5
5
|
module Array
|
6
6
|
module Merging
|
7
|
-
|
7
|
+
|
8
8
|
def self.included(base)
|
9
9
|
base.class_eval do
|
10
10
|
alias_method_chain :join, :rich_i18n
|
11
11
|
end
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
def join_with_rich_i18n(sep = $,)
|
15
|
-
if size == 1 && first.
|
15
|
+
if size == 1 && first.enriched?
|
16
16
|
first
|
17
17
|
else
|
18
|
-
merged_strings = dup
|
19
18
|
result = join_without_rich_i18n(sep)
|
20
|
-
result
|
21
|
-
result
|
19
|
+
any?(&:enriched?) ? EnrichedString.new(result, nil, dup) : result
|
22
20
|
end
|
23
21
|
end
|
24
|
-
|
22
|
+
|
25
23
|
end
|
26
24
|
end
|
27
25
|
end
|
@@ -2,45 +2,88 @@
|
|
2
2
|
module Rich
|
3
3
|
module I18n
|
4
4
|
module Core
|
5
|
+
|
5
6
|
class EnrichedString
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
def enriched_string?
|
7
|
+
attr_reader :meta_data, :merged_strings
|
8
|
+
|
9
|
+
def initialize(string = "", meta = nil, merged = nil)
|
10
|
+
@string = string.dup
|
11
|
+
@meta_data = HashWithIndifferentAccess.new meta.try(:dup) || (string.meta_data.dup if string.enriched?) || {}
|
12
|
+
@merged_strings = merged
|
13
|
+
end
|
14
|
+
|
15
|
+
def enriched?
|
17
16
|
true
|
18
17
|
end
|
19
|
-
|
20
|
-
def
|
21
|
-
|
18
|
+
|
19
|
+
def html_safe?
|
20
|
+
true
|
22
21
|
end
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
|
23
|
+
def concat(other)
|
24
|
+
(@merged_strings ||= [EnrichedString.new @string, @meta_data]) << other
|
25
|
+
@meta_data = nil
|
26
|
+
@string.concat other
|
27
|
+
self
|
28
|
+
end
|
29
|
+
alias_method :<<, :concat
|
30
|
+
|
31
|
+
def +(other)
|
32
|
+
dup.concat(other)
|
33
|
+
end
|
34
|
+
|
35
|
+
def to_str
|
36
|
+
@string
|
37
|
+
end
|
38
|
+
|
39
|
+
def to_s
|
40
|
+
(@merged_strings || [self]).collect(&:to_tag).join("").html_safe
|
41
|
+
end
|
42
|
+
|
43
|
+
def method_missing(method, *args)
|
44
|
+
if @string.respond_to? method
|
45
|
+
@string.send method
|
46
|
+
else
|
47
|
+
super
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
protected
|
52
|
+
|
27
53
|
def to_tag
|
54
|
+
(!@meta_data.empty? && Engine.can_enrich_output?) ? to_enriched_tag : to_html
|
55
|
+
end
|
56
|
+
|
57
|
+
def to_enriched_tag
|
28
58
|
tag = :i18n
|
29
59
|
attrs = []
|
30
60
|
|
31
61
|
keys = [:key, :value, :locale, :derivative_key]
|
32
62
|
data = @meta_data.reject{|k, v| !keys.include?(k.to_sym)}
|
33
63
|
|
34
|
-
data[:editable_input_type] =
|
64
|
+
data[:editable_input_type] = editable_input_type
|
35
65
|
|
36
|
-
attrs << @meta_data[:html].collect{|k, v| "#{k}
|
37
|
-
attrs << data .collect{|k, v| "data-#{k}
|
38
|
-
attrs << "data-i18n_translation
|
39
|
-
|
40
|
-
|
66
|
+
attrs << @meta_data[:html].collect{|k, v| "#{k}='#{::ERB::Util.html_escape v}'"}.join(" ") if @meta_data[:html]
|
67
|
+
attrs << data .collect{|k, v| "data-#{k}='#{::ERB::Util.html_escape v}'"}.join(" ")
|
68
|
+
attrs << "data-i18n_translation='#{::ERB::Util.html_escape to_str}'"
|
69
|
+
attrs << "data-i18n_tag='#{@meta_data[:tag]}'" if @meta_data[:tag]
|
70
|
+
|
71
|
+
"<#{tag} #{attrs.join(" ")}></#{tag}>"
|
41
72
|
end
|
42
|
-
|
73
|
+
|
74
|
+
def to_html
|
75
|
+
tag = (@meta_data[:tag] if @meta_data) || (:div if %w(text html).include?(editable_input_type))
|
76
|
+
tag ? "<#{tag}>#{to_str}</#{tag}>" : to_str
|
77
|
+
end
|
78
|
+
|
79
|
+
private
|
80
|
+
|
81
|
+
def editable_input_type
|
82
|
+
@meta_data[:as] if @meta_data && %w(string text html).include?(@meta_data[:as].try(:to_s).try(:downcase))
|
83
|
+
end
|
84
|
+
|
43
85
|
end
|
86
|
+
|
44
87
|
end
|
45
88
|
end
|
46
89
|
end
|
@@ -1,10 +1,12 @@
|
|
1
1
|
|
2
2
|
require "rich/i18n/core/string/inflections"
|
3
3
|
require "rich/i18n/core/string/internationalization"
|
4
|
-
require "rich/i18n/core/string/
|
4
|
+
require "rich/i18n/core/string/enriched"
|
5
|
+
require "rich/i18n/core/string/html_safe"
|
5
6
|
|
6
7
|
class String
|
7
8
|
include Rich::I18n::Core::String::Inflections
|
8
9
|
include Rich::I18n::Core::String::Internationalization
|
9
|
-
include Rich::I18n::Core::String::
|
10
|
+
include Rich::I18n::Core::String::Enriched
|
11
|
+
include Rich::I18n::Core::String::HtmlSafe
|
10
12
|
end
|
@@ -2,17 +2,17 @@
|
|
2
2
|
module Rich
|
3
3
|
module I18n
|
4
4
|
module Core
|
5
|
-
module
|
6
|
-
module
|
7
|
-
|
8
|
-
def
|
9
|
-
|
5
|
+
module String
|
6
|
+
module Enriched
|
7
|
+
|
8
|
+
def to_tag
|
9
|
+
self
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
def to_es
|
13
|
-
|
13
|
+
EnrichedString.new self
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|