Package Details: ruby-gettext 3.3.6-1

Git Clone URL: https://aur.archlinux.org/ruby-gettext.git (read-only, click to copy)
Package Base: ruby-gettext
Description: Gettext gem is a pure Ruby Localization(L10n) library and tool which is modeled after the GNU gettext package.
Upstream URL: https://github.com/ruby-gettext/gettext
Licenses: ruby, LGPL3
Submitter: vali
Maintainer: None
Last Packager: dviktor
Votes: 30
Popularity: 0.000005
First Submitted: 2013-02-18 02:34
Last Updated: 2020-08-13 11:50

Latest Comments

1 2 Next › Last »

mokkurkalve commented on 2020-02-03 01:23

There was quite a bit of fiddling about to get the dependencies right in the chroot, but it did finally build in a chroot.

ruro commented on 2020-02-01 18:38

Yeah, cleanbuilding totally worked. I thought, that I've already tried that, but I guess not. Sorry for the trouble and thanks.

dviktor commented on 2020-02-01 18:21

Try to build in clean chroot and tell your results

ruro commented on 2020-02-01 18:05

I have the same errors, even when trying your install order. Here are the failing tests btw

/usr/bin/ruby test/run-test.rb
Loaded suite test/run-test
Started
.........F
==============================================================================================================================================================================
     345: 
     346:   def test_anonymous_module
     347:     anonymous_module = self.class.instance_variable_get(:@anonymous_module)
  => 348:     assert_equal("japanese", anonymous_module::I.test)
     349:     assert_equal("japanese", anonymous_module::I.new.test2)
     350:   end
     351: 
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:348:in `test_anonymous_module'
<"japanese"> expected but was
<"language">

diff:
? japan    ese
? l    guag   
Failure: test_anonymous_module(TestGetText)
==============================================================================================================================================================================
F
==============================================================================================================================================================================
     45:     GetText.locale = nil
     46:     bindtextdomain("test2", "locale")
     47:     test = Simple.new
  => 48:     assert_equal("japanese", test.test)
     49:     set_locale("fr")
     50:     assert_equal("french", test.test) # influence of previous line
     51:     assert_equal("FRENCH:ONE IS 1.", test.test_formatted_string)
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:48:in `test_change_locale'
<"japanese"> expected but was
<"language">

diff:
? japan    ese
? l    guag   
Failure: test_change_locale(TestGetText)
==============================================================================================================================================================================
F
==============================================================================================================================================================================
     61: 
     62:   def test_empty
     63:     bindtextdomain("test1", "locale")
  => 64:     assert_equal("japanese", gettext("language"))
     65: 
     66:     pot_header = <<EOH
     67: Project-Id-Version: PACKAGE VERSION
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:64:in `test_empty'
<"japanese"> expected but was
<"language">

diff:
? japan    ese
? l    guag   
Failure: test_empty(TestGetText)
==============================================================================================================================================================================
F
==============================================================================================================================================================================
     351: 
     352:   def test_frozen
     353:     GetText.bindtextdomain("test1", :path => "locale")
  => 354:     assert(GetText._("language").frozen?)
     355:   end
     356: 
     357:   def test_safe_mode
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:354:in `test_frozen'
Failure: test_frozen(TestGetText): <false> is not true.
==============================================================================================================================================================================
F
==============================================================================================================================================================================
     78: 
     79:   def test_gettext
     80:     test = MessageFixture.new
  => 81:     assert_equal("AAA", test.test_1)
     82:     assert_equal("AAA\n", test.test_2)
     83:     assert_equal("BBB\nCCC", test.test_3)
     84:     assert_equal("BBB
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:81:in `test_gettext'
<"AAA"> expected but was
<"aaa">
Failure: test_gettext(TestGetText)
==============================================================================================================================================================================
...F
==============================================================================================================================================================================
     144:   def test_np_
     145:     GetText.locale = nil
     146:     test = TestNPGetText.new
  => 147:     assert_equal(["一つの本", "%{num}の本たち"], test.test_1)
     148:     assert_equal(["一つの本", "%{num}の本たち"], test.test_2)
     149:     assert_equal(["一つのハードカバー本", "%{num}のハードカバー本たち"], test.test_3)
     150:     assert_equal(["マガジンを1冊持ってます。", "マガジンたちを%{num}冊持ってます。"], test.test_4)
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:147:in `test_np_'
<["一つの本", "%{num}の本たち"]> expected but was
<["a book", "%{num} books"]>

diff:
? ["一つの本", "%{num}の本たち"]
?   a book             books    
Failure: test_np_(TestGetText)
==============================================================================================================================================================================
F
==============================================================================================================================================================================
     162:   def test_nsgettext
     163:     GetText.locale = nil
     164:     test = TestNSGetText.new
  => 165:     assert_equal(["single", "plural"], test.test_1)
     166:     assert_equal(["single", "plural"], test.test_2)
     167:     assert_equal(["AAA", "BBB"], test.test_3)
     168:     assert_equal(["CCC", "DDD"], test.test_4)
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:165:in `test_nsgettext'
<["single", "plural"]> expected but was
<["BBB", "CCC"]>

diff:
? ["single", "plural"]
?   BBB       CCC     
Failure: test_nsgettext(TestGetText)
==============================================================================================================================================================================
F
==============================================================================================================================================================================
     123:     GetText.locale = nil
     124:     test = TestPGetText.new
     125: 
  => 126:     assert_equal("えーびー", test.test_1)
     127:     assert_equal("えーびー", test.test_2)
     128:     assert_equal("えーびーしー", test.test_3)
     129:     assert_equal("CCC", test.test_4)
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:126:in `test_p_'
<"えーびー"> expected but was
<"BBB">
Failure: test_p_(TestGetText)
==============================================================================================================================================================================
F
==============================================================================================================================================================================
     176:   def test_plural
     177:     GetText.locale = nil
     178:     bindtextdomain("plural", :path => "locale")
  => 179:     assert_equal("all", n_("one", "two", 0))
     180:     assert_equal("all", n_("one", "two", 1))
     181:     assert_equal("all", n_("one", "two", 2))
     182: 
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:179:in `test_plural'
<"all"> expected but was
<"two">
Failure: test_plural(TestGetText)
==============================================================================================================================================================================
.F
==============================================================================================================================================================================
     228:   def test_plural_format_invalid
     229:     bindtextdomain("plural_error", :path => "locale")
     230:     #If it defines msgstr[0] only, msgstr[0] is used everytime.
  => 231:     assert_equal("a", n_("first", "second", 0))
     232:     assert_equal("a", n_("first", "second", 1))
     233:     assert_equal("a", n_("first", "second", 2))
     234:     # Use default(plural = 0)
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:231:in `test_plural_format_invalid'
<"a"> expected but was
<"second">
Failure: test_plural_format_invalid(TestGetText)
==============================================================================================================================================================================
F
==============================================================================================================================================================================
     268:   def test_plural_with_single
     269:     bindtextdomain("plural", :path => "locale")
     270: 
  => 271:     assert_equal("hitotsu", _("single"))
     272:     assert_equal("hitotsu", n_("single", "plural", 1))
     273:     assert_equal("hitotsu", n_("single", "plural", 2))
     274:     assert_equal("all", n_("one", "two", 1))
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:271:in `test_plural_with_single'
<"hitotsu"> expected but was
<"single">

diff:
? hitotsu
? s ngle 
Failure: test_plural_with_single(TestGetText)
==============================================================================================================================================================================
.F
==============================================================================================================================================================================
     104:   def test_s_
     105:     test = TestSGetText.new
     106: 
  => 107:     assert_equal("MATCHED", test.test_1)
     108:     assert_equal("MATCHED", test.test_2)
     109:     assert_equal("AAA", test.test_3)
     110:     assert_equal("CCC", test.test_4)
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:107:in `test_s_'
<"MATCHED"> expected but was
<"BBB">
Failure: test_s_(TestGetText)
==============================================================================================================================================================================
.O
==============================================================================================================================================================================
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:359:in `test_safe_mode'
Omission: Per thread $SAFE is removed since Ruby 2.6. [test_safe_mode(TestGetText)]
==============================================================================================================================================================================
F
==============================================================================================================================================================================
     297: 
     298:   def test_set_locale
     299:     bindtextdomain("test1", :path => "locale")
  => 300:     assert_equal("japanese", _("language"))
     301:     set_locale("en")
     302:     assert_equal("language", _("language"))
     303: 
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:300:in `test_set_locale'
<"japanese"> expected but was
<"language">

diff:
? japan    ese
? l    guag   
Failure: test_set_locale(TestGetText)
==============================================================================================================================================================================
F
==============================================================================================================================================================================
     93:   class Test_ < self
     94:     def test_one_line
     95:       target = Fixtures::Method_::OneLine.new
  => 96:       assert_equal("ONE LINE", target.message)
     97:     end
     98:   end
     99: 
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/test/test_gettext.rb:96:in `test_one_line'
<"ONE LINE"> expected but was
<"one line">
Failure: test_one_line(TestGetText::Test_)
==============================================================================================================================================================================
..............................................................................................................................................................................
..............................................................................................................................................................................................
Finished in 4.92523527 seconds.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
354 tests, 590 assertions, 14 failures, 0 errors, 0 pendings, 1 omissions, 0 notifications
96.034% passed
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
71.87 tests/s, 119.79 assertions/s
rake aborted!
Command failed with status (1): [/usr/bin/ruby test/run-test.rb...]
/home/ruro/.cache/yay/ruby-gettext/src/gettext-3.3.2/Rakefile:78:in `block in <top (required)>'
Tasks: TOP => test
(See full trace by running task with --trace)

dviktor commented on 2020-01-30 21:49

I have no idea why this issue pops up. Try to install in this order: ruby-rr-bootstrap -> ruby-test-unit-rr -> ruby-rr -> ruby-gettext

I have no issues with that setup

mokkurkalve commented on 2020-01-30 21:45

Install fails thus:

354 tests, 590 assertions, 14 failures, 0 errors, 0 pendings, 1 omissions, 0 notifications
96.034% passed
74.17 tests/s, 123.61 assertions/s
rake aborted!
Command failed with status (1): [/usr/bin/ruby test/run-test.rb...]
/tmp/makepkg/ruby-gettext/src/gettext-3.3.2/Rakefile:78:in `block in <top (required)>'
Tasks: TOP => test
(See full trace by running task with --trace)
==> ERROR: A failure occurred in check().
    Aborting...
Error making: ruby-gettext

bastelfreak commented on 2020-01-18 12:20

Hi, I made some updates. Upstream dropped the irb dependency so we can finally execute tests. I also updated it to the latest 3.3.2 release:

# Maintainer: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com
# Contributor: tim@bastelfreak.de

_gemname='gettext'
pkgname="ruby-${_gemname}"
pkgver=3.3.2
pkgrel=2
pkgdesc='Gettext gem is a pure Ruby Localization(L10n) library and tool which is modeled after the GNU gettext package.'
arch=(any)
url="https://github.com/ruby-gettext/gettext"
license=('RUBY' 'LGPL3')
makedepends=('ruby-rdoc' 'ruby-yard' 'ruby-bundler')
depends=('ruby' 'ruby-locale' 'ruby-text')
checkdepends=('ruby-test-unit' 'ruby-rake' 'ruby-test-unit-rr')
source=("https://github.com/ruby-gettext/gettext/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
options=("!emptydirs")
sha512sums=('7d2818af2d622a46609103493cb5e82856e1a9f3ae67fad824bcbc2e11fca65040021554515a476e3a079a02d0636e9fe3afa706242795d0fb1037e8f7b374a6')

# update the gemspec to allow newer versions of rake
# remove deprecated options from the gemspec
prepare() {
  cd "${_gemname}-${pkgver}"

  sed --in-place 's/s.license.*/s.licenses = ["Ruby", "LGPL-3.0+"]/' "${_gemname}.gemspec"
  sed --in-place '/test\/unit\/notify/d' test/run-test.rb
  sed --in-place '/s.add_development_dependency("test-unit-notify")/d' "${_gemname}.gemspec"
}


build() {
  cd "${_gemname}-${pkgver}"

  gem build "${_gemname}.gemspec"
}

# tests are currently broken upstream
check() {
  cd "${_gemname}-${pkgver}"
  rake test
}

package() {
  cd "${_gemname}-${pkgver}"

  local _gemdir="$(gem env gemdir)"
  gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"

  rm -rf "${pkgdir}/${_gemdir}/cache"
}

bastelfreak commented on 2020-01-01 20:52

Hi, I updated the PKGBUILD to built properly from source:

_gemname='gettext' pkgname="ruby-${_gemname}" pkgver=3.2.9 pkgrel=2 pkgdesc='Gettext gem is a pure Ruby Localization(L10n) library and tool which is modeled after the GNU gettext package.' arch=('any') url="https://github.com/ruby-gettext/gettext" license=('RUBY' 'LGPL3') makedepends=('ruby-rdoc' 'ruby-test-unit' 'ruby-rake' 'ruby-yard' 'ruby-irb' 'ruby-bundler') depends=('ruby' 'ruby-locale' 'ruby-text') source=("https://github.com/ruby-gettext/gettext/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz") options=("!emptydirs") sha512sums=('e7352a343485c25077cdf08f2f92d7ae7ba798cb662ad090ce9e367576ee585753588dca2b7c8247ad007a816b87e57027ce70160b8f1bee83e3276e3725f314')

update the gemspec to allow newer versions of rake
remove deprecated options from the gemspec

prepare() { cd "${_gemname}-${pkgver}" sed --in-place '/s.rubyforge_project/d' "${_gemname}.gemspec" sed --in-place '/test\/unit\/notify/d' test/run-test.rb sed --in-place '/test\/unit\/rr/d' test/run-test.rb sed --in-place '/s.add_development_dependency("test-unit-notify")/d' "${_gemname}.gemspec" sed --in-place '/s.add_development_dependency("test-unit-rr")/d' "${_gemname}.gemspec" }

build() { cd "${_gemname}-${pkgver}" gem build "${_gemname}.gemspec" }

tests are currently broken upstream
check() {

#cd "${_gemname}-${pkgver}" #rake test

}

package() { cd "${_gemname}-${pkgver}" local _gemdir="$(gem env gemdir)" gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"

rm -rf "${pkgdir}/${_gemdir}/cache" }

vim: ts=2 sw=2 et:

Rogach commented on 2019-01-30 19:59

--no-ri and --no-rdoc options to gem install are deprecated and removed, --no-document should be used instead. Patch to PKGBUILD:

--- PKGBUILD.orig   2019-01-30 22:57:03.140148048 +0300
+++ PKGBUILD    2019-01-30 22:57:22.637118513 +0300
@@ -38,7 +38,7 @@

   # Install the gem
   install -d -m755 $_bindir $_gemdir
-  $_gem install --no-ri --no-rdoc --ignore-dependencies --no-user-install \
+  $_gem install --no-document --ignore-dependencies --no-user-install \
                 --bindir $_bindir --install-dir $_gemdir "$srcdir/$_gemname-$pkgver.gem"
 }

hollunder commented on 2015-04-10 11:05

Thanks, works now.