Sha256: afbc57cade94fece6d07500873a85159b4445c8b16ed5d8cfc1b5c7201d8acf3

Contents?: true

Size: 665 Bytes

Versions: 7

Compression:

Stored size: 665 Bytes

Contents

require 'test/unit'
require 'gettext'

class TC_Gettext < Test::Unit::TestCase
  def setup
    dputs(0){"setting up"}
    $name = "gettext"
    GetText.bindtextdomain( 'gettext', :path => '/tmp' )
    GetText.bindtextdomain( $name, :path => "po" )
    GetText.locale = "en"
    GetText::TextDomainManager.cached = false
    dputs(0){"getting texts"}
    @a = GetText._("one")
    @b = GetText._("two")
  end

  def teardown
  end

  def tes_domain
    GetText.locale = "fr"
    assert_equal "un", GetText._("one")
    assert_equal "one", @a
    assert_equal "deux", GetText._("two")
    assert_equal "two", @b
    assert_equal "hello", GetText._("hello")
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
qooxview-1.9.1312 test/qv_gettext.rb
qooxview-1.9.13.pre.12 test/qv_gettext.rb
qooxview-1.9.13.pre.11 test/qv_gettext.rb
qooxview-1.9.13.pre.10 test/qv_gettext.rb
qooxview-1.9.11 test/qv_gettext.rb
qooxview-1.9.10 test/qv_gettext.rb
qooxview-1.9.9 test/qv_gettext.rb