Sha256: 43b722b50e09bcf1a554501d1287903ddcbbc9dc17ea05b89c25c0ae2630e019

Contents?: true

Size: 812 Bytes

Versions: 18

Compression:

Stored size: 812 Bytes

Contents

require 'gettext'

class TestNPGetText
  include GetText
  bindtextdomain("npgettext", :path => "locale")

  def test_1
    [np_("Magazine", "a book", "%{num} books", 1), 
     np_("Magazine", "a book", "%{num} books", 2)]
  end
  
  def test_2
    [npgettext("Magazine", "a book", "%{num} books", 1), 
     npgettext("Magazine", "a book", "%{num} books", 2)]
  end
  
  def test_3
    [np_("Hardcover", "a book", "%{num} books", 1), 
     np_("Hardcover", "a book", "%{num} books", 2)]
  end

  def test_4
    [np_("Magaine", "I have a magazine", "I have %{num} magazines", 1), 
     np_("Magaine", "I have a magazine", "I have %{num} magazines", 2)]
  end

  def test_5
    [np_("Hardcover", "a picture", "%{num} pictures", 1), 
     np_("Hardcover", "a picture", "%{num} pictures", 2)]  #not found.
  end
end

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
experteer-gettext-2.0.4.1 test/testlib/npgettext.rb
experteer-gettext-2.0.4.2 test/testlib/npgettext.rb
experteer-gettext-2.0.4 test/testlib/npgettext.rb
grosser-gettext-2.0.0 test/testlib/npgettext.rb
fair-gettext-2.0.7 test/testlib/npgettext.rb
fair-gettext-2.0.6 test/testlib/npgettext.rb
fair-gettext-2.0.5 test/testlib/npgettext.rb
fair-gettext-2.0.4 test/testlib/npgettext.rb
fair-gettext-2.0.3 test/testlib/npgettext.rb
fair-gettext-2.0.2 test/testlib/npgettext.rb
fair-gettext-2.0.1 test/testlib/npgettext.rb
fair-gettext-2.0.0 test/testlib/npgettext.rb
gettext-2.1.0 test/testlib/npgettext.rb
gettext-2.0.0 test/testlib/npgettext.rb
gettext-2.0.2 test/testlib/npgettext.rb
gettext-2.0.1 test/testlib/npgettext.rb
gettext-2.0.3 test/testlib/npgettext.rb
gettext-2.0.4 test/testlib/npgettext.rb