Gettext problem

What wrong?

cat lib/tasks/gettext.rake
require ‘gettext/utils’

Tell ruby-gettext’s ErbParser to parse .erb files as well

See also

http://zargony.com/2007/07/29/using-ruby-gettext-with-edge-rails/
GetText::ErbParser.init(:extnames => [’.rhtml’, ‘.erb’])

desc ‘Update pot/po files’
task :updatepo do
GetText.update_pofiles(‘dic’,
Dir.glob("{app,lib}/**/*.{rb,rhtml,erb,rjs}"), ‘dic’)
end

desc ‘Create mo-files’
task :makemo do
GetText.create_mofiles(true, ‘po’, ‘locale’)
end


rake updatepo

(in /home/www/fit)
po/dic.pot
. done.
po/sv/dic.po
. done.


rake makemo

(in /home/www/fit)
po/sv/dic.po -> locale/sv/LC_MESSAGES/dic.mo
rake aborted!

parse error on value “com.macromates.caret” = “{\n column = 0;\n
line = 0;\n}” (STRING)

(See full trace by running task with --trace)


cat po/sv/dic.po

#: app/controllers/main_controller.rb:3
msgid “Hello World”
msgstr “Hello World”