I am using internationalization for english (en) and french (fr), I have used en.yml for limited use and most of the translations I am writing in fr.yml.
With locale as fr everything works good, but with en it shows me error as missing translation span.
For eg if I have got something like
<%= text_field_tag( "search", params[:search], :placeholder=>t("Search"), :class=>"search_input") %>
and i get output for en is:
<input class="search_input" id="search" name="search" placeholder="<span class=" translation_missing"="" title="translation missing: en.Search">
What I want is that it should turn off translation errors for english, since english is my default language, but for some cases I've used en.yml.
Or if this is not possible then whole error message should be removed.
Thanks
In Rails 4.1, I wasn't able to get this to work with the I18n exception handler (there are some bugs, apparently, see nathanvda's answer.
Eventually I just overwrote the
message
function by adding this toconfig/initializers/i18n.rb