title: Setting up fast_gettext search path
body: <p>I am trying to localize an existing Ruby on Rails project, and I have decided to use fast_gettext. I have tried to set things up as described on the github page (<a href="https://github.com/grosser/fast_gettext" rel="nofollow">https://github.com/grosser/fast_gettext</a>) and in this small tutorial (<a href="http://blog.lingohub.com/developers/2013/08/ruby-gettext-internationalization-tutorial-fest-gettext-gem/" rel="nofollow">http://blog.lingohub.com/developers/2013/08/ruby-gettext-internationalization-tutorial-fest-gettext-gem/</a>). However, when I do </p>
  
  <pre><code>rake gettext:find
  </code></pre>
  
  <p>it appears that only my .rb files are being searched and not my other files (importantly, the .erb files are not being checked).</p>
  
  <p>In addition to updating my bundle to include the necessary gems, this is what I've done so far:</p>
  
  <p>Added config/initializers/fast_gettext.rb. Here it is:</p>
  
  <pre><code># config/initializers/fast_gettext.rb
  FastGettext.add_text_domain 'app', :path =&gt; 'config/locales', :type =&gt; :yaml
  FastGettext.default_available_locales = ['en','es']
  FastGettext.default_text_domain = 'app'
  </code></pre>
  
  <p>I have also created lib/tasks/gettext.rake</p>
  
  <pre><code>namespace :gettext do
    def files_to_translate
      Dir.glob("{app,lib,config,locale}/**/*.{rb,erb,haml,slim,rhtml}")
    end
  end
  </code></pre>
  
  <p>This is index.html.erb</p>
  
  <pre><code>&lt;div class="home_title"&gt;&lt;%= t(:xyz) %&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I am setting the locale in application_controller.rb, and if I manually modify the locale file (e.g. config/locales/es.yml), the text gets translated when I open the page. However, when I run gettext, it does not create an entry for this item. I end up with an empty app.pot:</p>
  
  <pre><code># File headers....
  # Copyright, my name, etc.
  #
  #, fuzzy
  msgid ""
  msgstr ""
  "Project-Id-Version: app 1.0.0\n"
  "Report-Msgid-Bugs-To: \n"
  "POT-Creation-Date: 2014-03-19 16:52-0700\n"
  "PO-Revision-Date: 2014-03-19 16:52-0700\n"
  "Last-Translator: FULL NAME &lt;EMAIL@ADDRESS&gt;\n"
  "Language-Team: LANGUAGE &lt;LL@li.org&gt;\n"
  "Language: \n"
  "MIME-Version: 1.0\n"
  "Content-Type: text/plain; charset=UTF-8\n"
  "Content-Transfer-Encoding: 8bit\n"
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
  </code></pre>
  
  <p>As I said above, I believe that gettext is only checking .rb files (based on some hacked logs that I placed inside the gettext code). It could also be that I need to do something extra to configure gettext to recognize this is a string to be localized:</p>
  
  <pre><code>&lt;%= t(:xyz) %&gt;
  </code></pre>
  
  <p>Thanks in advance for your suggestions. </p>