Method: GetText::PoMessage#plural?
- Defined in:
- lib/gettext/tools/pomessage.rb
#plural? ⇒ Boolean
Returns true if the type is kind of plural. And if this is a kind of plural and msgid_plural property is nil, then raise an RuntimeException.
140 141 142 143 144 145 |
# File 'lib/gettext/tools/pomessage.rb', line 140 def plural? if [:plural, :msgctxt_plural].include? @type raise "This PoMessage is a kind of plural but the msgid_plural property is nil. msgid: #{msgid}" unless @msgid_plural true end end |