Module: I18nliner::Extensions::View
- Includes:
- Inferpolation
- Defined in:
- lib/i18nliner/extensions/view.rb
Instance Method Summary
collapse
#inferpolate, #inferpolate_value!
Instance Method Details
#i18nliner_scope ⇒ Object
10
|
# File 'lib/i18nliner/extensions/view.rb', line 10
def i18nliner_scope; end
|
#translate(*args) ⇒ Object
Also known as:
t, t!, translate!
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/i18nliner/extensions/view.rb', line 12
def translate(*args)
raise InvalidBlockUsageError.new("block translate calls need to be output (i.e. `<%=`) and the block body must be of the form `%>your string<%`") if block_given?
key, options = CallHelpers.infer_arguments(args)
options = inferpolate(options) if I18nliner.infer_interpolation_values
options[:i18nliner_scope] = i18nliner_scope
super(key, options)
rescue ArgumentError
raise
end
|