text_helpers 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/text_helpers/contexts.rb +1 -2
- data/lib/text_helpers/translation.rb +3 -6
- data/lib/text_helpers/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e9b829fa88f9ad1e94b5fc765be9ef96dece698
|
4
|
+
data.tar.gz: d44540a66cec3f4fc55833abdd5aeebdfdbbe10d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b837b932d7ac506aeebd0a6710c5b2d5f8207661d5a4f73178109520a399faab0dd501d7d96e92d7e8683b155f4a83f9cf13630d85e02091c4ab32ca6b55f010
|
7
|
+
data.tar.gz: 4842e1f6a211bb49bde743ce7a90c671599c8588c25bb9f80766e60a602ffb8a411b728d7d5bc90567243b7059094379befdf72a0c93b3350034b187d81dd65a
|
@@ -21,9 +21,8 @@ shared_context "a view spec", view: true do
|
|
21
21
|
|
22
22
|
def translation_scope
|
23
23
|
matcher = /(?<path>.*)\/_?(?<view>[^\/.]+)(?<extension>\.html\.haml)?/
|
24
|
-
info = matcher.match(
|
24
|
+
info = matcher.match(_default_file_to_render)
|
25
25
|
path = info[:path].gsub('/', '.')
|
26
|
-
|
27
26
|
"views.#{path}.#{info[:view]}"
|
28
27
|
end
|
29
28
|
end
|
@@ -11,12 +11,9 @@ module TextHelpers
|
|
11
11
|
# Public: Get the I18n localized text for the passed key.
|
12
12
|
#
|
13
13
|
# key - The desired I18n lookup key.
|
14
|
-
# options - A Hash of options to
|
15
|
-
# :
|
16
|
-
#
|
17
|
-
# when set to true.
|
18
|
-
# :smart - Whether or not to apply smart quoting to the output.
|
19
|
-
# Defaults to true.
|
14
|
+
# options - A Hash of options to forward to the `I18n.t` lookup.
|
15
|
+
# :smart - Whether or not to apply smart quoting to the output.
|
16
|
+
# Defaults to true.
|
20
17
|
#
|
21
18
|
# Returns a String resulting from the I18n lookup.
|
22
19
|
def text(key, options = {})
|
data/lib/text_helpers/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: text_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Horner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.4.
|
126
|
+
rubygems_version: 2.4.3
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: TextHelpers is a gem which supplies some basic utilities for text localization
|