whowish_word 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,7 @@
|
|
1
1
|
if defined?(ActionController) and defined?(ActionController::Base)
|
2
2
|
class ActionController::Base
|
3
|
+
include WhowishWord::Constant
|
4
|
+
|
3
5
|
prepend_before_filter :initialize_whowish_word
|
4
6
|
helper_method :whowish_word
|
5
7
|
attr_accessor :whowish_word_config
|
@@ -12,6 +14,33 @@ if defined?(ActionController) and defined?(ActionController::Base)
|
|
12
14
|
return @whowish_word_config
|
13
15
|
end
|
14
16
|
|
17
|
+
# alias_method :previous_t, :t
|
18
|
+
# def t(uid, *variables)
|
19
|
+
# if @whowish_word_config.edit_mode == true
|
20
|
+
# s = PREFIX + \
|
21
|
+
# SEPARATOR + \
|
22
|
+
# scope_key_by_partial(uid.to_s) + \
|
23
|
+
# SEPARATOR + \
|
24
|
+
# previous_t(uid)
|
25
|
+
# return "<dfn>#{s}</dfn>".html_safe
|
26
|
+
# else
|
27
|
+
# return previous_t(uid, *variables)
|
28
|
+
# end
|
29
|
+
# end
|
30
|
+
|
31
|
+
# def ta(uid, *variables)
|
32
|
+
# if @whowish_word_config.edit_mode == true
|
33
|
+
# s = PREFIX + \
|
34
|
+
# SEPARATOR + \
|
35
|
+
# scope_key_by_partial(uid.to_s) + \
|
36
|
+
# SEPARATOR + \
|
37
|
+
# previous_t(uid)
|
38
|
+
# return s.html_safe
|
39
|
+
# else
|
40
|
+
# return previous_t(uid, *variables)
|
41
|
+
# end
|
42
|
+
# end
|
43
|
+
|
15
44
|
# def word_for(namespace, id, *variables)
|
16
45
|
# if @whowish_word_config.edit_mode == true
|
17
46
|
# return WhowishWord.word_for_in_edit_mode(namespace, id, @whowish_word_config.locale, *variables)
|
@@ -52,7 +52,7 @@ if defined?(ActionView) and defined?(ActionView::Base)
|
|
52
52
|
SEPARATOR + \
|
53
53
|
scope_key_by_partial(uid.to_s) + \
|
54
54
|
SEPARATOR + \
|
55
|
-
previous_t(uid
|
55
|
+
previous_t(uid)
|
56
56
|
return "<dfn>#{s}</dfn>".html_safe
|
57
57
|
else
|
58
58
|
return previous_t(uid, *variables)
|
@@ -65,7 +65,7 @@ if defined?(ActionView) and defined?(ActionView::Base)
|
|
65
65
|
SEPARATOR + \
|
66
66
|
scope_key_by_partial(uid.to_s) + \
|
67
67
|
SEPARATOR + \
|
68
|
-
previous_t(uid
|
68
|
+
previous_t(uid)
|
69
69
|
return s.html_safe
|
70
70
|
else
|
71
71
|
return previous_t(uid, *variables)
|
data/whowish_word.gemspec
CHANGED