Class PoMessagePlural
In: app/models/po_message_plural.rb
Parent: PoMessage

gettext の複数形に依存する翻訳対象のモデル。

Methods

Public Instance methods

複数形に依存するかどうかを返す。

[Source]

    # File app/models/po_message_plural.rb, line 41
41:   def plural?
42:     true
43:   end

.po ファイルでの文字列に変換する。

[Source]

    # File app/models/po_message_plural.rb, line 34
34:   def to_po_string
35:     str = "msgid " + "#{msgctxt}#{msgid}".po_mangle + "\n"
36:     str << "msgid_plural " + msgid_plural.po_mangle + "\n"
37:     return str
38:   end

翻訳を返す。

[Source]

    # File app/models/po_message_plural.rb, line 27
27:   def translation(b = binding)
28:     n = eval(msgid_n, b)
29:     a = arguments(b)
30:     return GetText.ns_("#{msgctxt}#{msgid}", msgid_plural, n) % a
31:   end

[Validate]