# GetText problems with .set\_error\_message\_title

**URL:** <https://www.ruby-forum.com/t/gettext-problems-with-set-error-message-title/86202>\
**Category:** Rails I18n\
**Created:** [February 20, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/gettext-problems-with-set-error-message-title/86202 "2007-02-20T16:28:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![neongrau](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neongrau](https://www.ruby-forum.com/u/neongrau)\
**Post date:** [February 20, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/gettext-problems-with-set-error-message-title/86202/1 "2007-02-20T16:28:56Z")

</div>

i tried to change the error message title to use with  
“error\_messages\_for” as described at  
[http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html#Translate+the+title%2Fexplanation+on+the+error+message+dialog](http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html#Translate+the+title%2Fexplanation+on+the+error+message+dialog)

but i never ever get the translated strings ☹  
i just always get the strings within the N\_(‘’) function.  
but the %{record} inside gets properly translated.

i’m currenlty runnnig my rails app  
with ruby 1.8.5 on windows with rails 1.2.2 and gettext 1.9.0  
even downgrading gettext to 1.7.0 didn’t help (the page said it’s  
supposed to work since version 1.7.0).

this is what i have in my application controller:  
ActionView::Helpers::ActiveRecordHelper::L10n.set\_error\_message\_title(  
N\_(“An error prevented saving this %{record}”), N\_(“%{num} errors  
prevented saving this %{record}”))

and the excerpt from my .po file for “de\_DE”:

#: app/controllers/application.rb:10  
msgid “An error prevented saving this %{record}”  
msgstr “Ein Fehler verhinderte das Speichern dieser %{record}”

#: app/controllers/application.rb:10  
msgid “%{num} errors prevented saving this %{record}”  
msgstr “%{num} Fehler verhindern das Speichern dieser %{record}”

i’m totally out of ideas what to do ☹  
any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![neongrau](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neongrau](https://www.ruby-forum.com/u/neongrau)\
**Post date:** [April 18, 2007, 1:51am UTC](https://www.ruby-forum.com/t/gettext-problems-with-set-error-message-title/86202/2 "2007-04-18T01:51:26Z")

</div>

neongrau \_\_ wrote:

> but i never ever get the translated strings ☹  
> i just always get the strings within the N\_(’’) function.  
> but the %{record} inside gets properly translated.

I have the same problem (only one difference Linux instead of Windows).  
Can somebody explain what’s going on? And how to fix it. Please.

Thanks a lot.
