Right on!
It sure messed up the rendering;-) , but it told me what I needed to
know:-D . Now the clients can see what didn't happen if they miss an
entry on the form.
Thanks Ignacio,
Don Ziesig
On 11/18/2013 01:26 AM, Ignacio Huerta wrote:
Hi Donald,
I don't know it already, but this option is usually useful to debug:
config.hobo.show_translation_keys = true
Add it to application.rb and restart the application. Let's hope it
helps :).
Regards,
Ignacio
El 16/11/13 18:42, Donald Ziesig escribió:
Hi**Kevin,
I found the code you referenced in the bootstrap gem. If I have to I
will manually override the whole thing, but I would rather learn how to
do it correctly.
Question, how does /this.class.model_name.human/ reference the I81n.yml
files for (example) the model Showing? I think I have tried all
permutations of showing.model_name.human,
activerecord.showing.model_name.human, etc. but none of them hit the
app.en.yml or app.es.yml definitions. (It would really be helpful if
there were some way of having translation misses appear in the log).
Thanks,
Don
On 11/15/2013 09:19 PM, kevinpfromnm wrote:
http://www.hobocentral.net/tagdef/hobo_rapid/forms/error-messages
|| <h2 param='heading'>
| <t model='&this.class.model_name.human' count='&this.errors.size'
key='activerecord.errors.template.header'>
<%= model = this.class.model_name.human
count = this.errors.size
count==1 ? "1 error prohibited this #{model} from being saved" :
"#{count} errors prohibited this #{model} from being saved"
%>
...
|
|
From there (the bootstrap version is similar), it looks like there's a key but
it's not broken down per model (I've only barely touched translations and it's
been awhile so I could be wrong).
You could override the error-messages -> heading on the particular form or in
general to allow that.
|
On Friday, November 15, 2013 3:43:06 PM UTC-7, donz wrote:
Hi Everyone!
I need to customize and later internationalize some error messages
as in:
Current in en:
2 errors prohibited this Showing from being saved
Desired:
2 errors prohibited this Showing Request from being saved
effectively overwriting the model name 'showing' with the
equivalent of 'showing_request' (unfortunately 'showing_request'
is the name of a different model in the app so it would take some
major editing to refactor the second to something else and the
first to the second :'( ).
similarly using es, I want to translate it to something like:
2 errores prohíben esta inmobiliaria mostrando petición de ser
escrita en el fichero (pardon my Spanish, I'll have a friend do
the actual translation.):-D ,
I looked in the *en.yml and *es.yml files (like I used to in plain
old RoR), but could not find any hint of the error message(s).
Can't find any way of replacing a param in the dryml, either.
Any ideas?
Thanks,
Don Ziesig
--
You received this message because you are subscribed to the Google
Groups "Hobo Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google
Groups "Hobo Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/groups/opt_out.