[Rails I18n] Problems using Gettext 1.90.0 update_pofiles

Vaughan Jackson vaughan at cyberdude.com
Sun Apr 27 11:00:51 EDT 2008


Hi,

I'm a newbie to Ruby and Rails. I am following Sascha Ebach's tutorial
on Gettext at http://manuals.rubyonrails.com/read/chapter/105#page298.
This tutorial describes a step in which update_pofiles is used to
generate the .pot and .po files from .rb and .rhtml files containing
gettext calls. However, when I try to use this from rake, it only seems
to partially succeed. I see this error:

C:\Users\Vaughan\Ruby\test_app>rake updatepo --trace
(in C:/Users/Vaughan/Ruby/test_app)
** Invoke updatepo (first_time)
** Execute updatepo
po/testapp.pot
rake aborted!
No such file or directory - msgmerge po/testapp.pot tmp.pot
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.90.0/lib/gettext/utils.rb:51:in
``'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.90.0/lib/gettext/utils.rb:51:in
`msgmer
ge'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.90.0/lib/gettext/utils.rb:74:in
`msgmer
ge_all'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.90.0/lib/gettext/utils.rb:123:in
`updat
e_pofiles'
C:/Users/Vaughan/Ruby/test_app/lib/tasks/updatepo.rake:14
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
`invoke_with_call_c
hain'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
`synchronize'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
`invoke_with_call_c
hain'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in
`invoke_task'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
`top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
`top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
`standard_exceptio
n_handling'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in
`top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
`standard_exceptio
n_handling'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
c:/ruby/bin/rake:19:in `load'
c:/ruby/bin/rake:19

This produced a testapp.pot file, but no .po files in the relevant
subdirectories.
The content of the testapp.pot included:

#: app/controllers/application.rb:6
msgid "blah"
msgstr ""

I tried changing utils.rb to call rmsgmerge instead of msgmerge, but
this seemed to make things worse, as I ended up with a testapp.pot only
with no msgid/msgstr pairs in it (the error message disappears).

What am I doing wrong?

Thanks,
Vaughan.
-- 
Posted via http://www.ruby-forum.com/.


More information about the Railsi18n-discussion mailing list