Sha256: 019782190a96711f6daeb4010a0950371e89d285cf390e4e2a59c03abca2c9b4
Contents?: true
Size: 916 Bytes
Versions: 1
Compression:
Stored size: 916 Bytes
Contents
require 'testlib/helper.rb' require 'testlib/simple' class TestTextDomain < Test::Unit::TestCase def setup GetText.locale = "ja_JP.eucJP" end def test_textdomain_path test = Simple.new assert_equal("japanese", test.test) prefix = GetText::TextDomain::CONFIG_PREFIX default_locale_dirs = [ "#{Config::CONFIG['datadir']}/locale/%{lang}/LC_MESSAGES/%{name}.mo", "#{Config::CONFIG['datadir'].gsub(/\/local/, "")}/locale/%{lang}/LC_MESSAGES/%{name}.mo", "#{prefix}/share/locale/%{lang}/LC_MESSAGES/%{name}.mo", "#{prefix}/local/share/locale/%{lang}/LC_MESSAGES/%{name}.mo" ].uniq assert_equal(default_locale_dirs, GetText::TextDomain::DEFAULT_LOCALE_PATHS) new_path = "/foo/%{lang}/%{name}.mo" GetText::TextDomain.add_default_locale_path(new_path) assert_equal([new_path] + default_locale_dirs, GetText::TextDomain::DEFAULT_LOCALE_PATHS) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
grosser-gettext-2.0.0 | test/test_textdomain.rb |