i18n-complements 0.0.6 → 0.0.7
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/VERSION +1 -1
- data/lib/i18n-complements/core_extension.rb +1 -5
- data/test/locales/fra.yml +5 -0
- data/test/test_strings.rb +4 -0
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# TODO: Rewrite this "not DRY" code
|
2
2
|
|
3
|
-
# Translation
|
4
|
-
|
5
3
|
class ::String
|
6
4
|
def translate(options = {})
|
7
5
|
I18n.translate(self, options)
|
@@ -9,7 +7,7 @@ class ::String
|
|
9
7
|
alias :t :translate
|
10
8
|
|
11
9
|
def localize(options = {})
|
12
|
-
I18n.
|
10
|
+
I18n.localize(self, options)
|
13
11
|
end
|
14
12
|
alias :l :localize
|
15
13
|
|
@@ -29,8 +27,6 @@ class ::Symbol
|
|
29
27
|
end
|
30
28
|
end
|
31
29
|
|
32
|
-
# Localization
|
33
|
-
|
34
30
|
class ::TrueClass
|
35
31
|
def localize(options = {})
|
36
32
|
I18n.localize(self, options)
|
data/test/locales/fra.yml
CHANGED
data/test/test_strings.rb
CHANGED
@@ -11,6 +11,10 @@ class TestStrings < Test::Unit::TestCase
|
|
11
11
|
assert_nothing_raised do
|
12
12
|
I18n.localize("C'est une phrase d'exemple axée sur les caractères spéciaux")
|
13
13
|
end
|
14
|
+
|
15
|
+
assert_nothing_raised do
|
16
|
+
I18n.localize("")
|
17
|
+
end
|
14
18
|
end
|
15
19
|
|
16
20
|
def test_localization_with_core_extensions
|