Class String
In: lib/fast_gettext/vendor/string.rb
Parent: Object

either we are on vanilla 1.8(call with hash raises ArgumentError) or someone else already patched % but did it wrong

Methods

Constants

PERCENT_MATCH_RE = Regexp.union( /%%/, /%\{([-\.\w]+)\}/, /%<([-\.\w]+)>(.*?\d*\.?\d*[bBdiouxXeEfgGcps])/

External Aliases

% -> _fast_gettext_old_format_m

Public Instance methods

 Default: "%s, %s" % ["Masao", "Mutoh"]
 Extended:
    "%{firstname}, %{lastname}" % {:firstname=>"Masao",:lastname=>"Mutoh"} == "Masao Mutoh"
    with field type such as d(decimal), f(float), ...
    "%<age>d, %<weight>.1f" % {:age => 10, :weight => 43.4} == "10 43.4"

This is the recommanded way for Ruby-GetText because the translators can understand the meanings of the keys easily.

_fast_gettext_old_format_m(args)

Alias for #%

[Validate]