# Gettext problem

**URL:** <https://www.ruby-forum.com/t/gettext-problem/139927>\
**Category:** Rails\
**Created:** [June 9, 2008, 7:52am UTC](https://www.ruby-forum.com/t/gettext-problem/139927 "2008-06-09T07:52:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [June 9, 2008, 7:52am UTC](https://www.ruby-forum.com/t/gettext-problem/139927/1 "2008-06-09T07:52:33Z")

</div>

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/](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”
