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"
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---