This worked perfectly. I was never able to get the other solution to
work (en.yml). I'm not sure what I was missing. It could be because I
went from 2.0.2 to 2.2.2 and some of the files may be missing (I
didn't have an en.yml file). I created a new en.yml file at config/
locals.
en.yml:
en:
active_scaffold:
'First Name': "First Name"
'Member Since': "Member Since"
I renamed the labels for the database fields in my controller:
columns[:firstname].label = "First Name"
columns[:memberdate].label = "Member_Since"
I still get the same translation missing error.
Should I not be using the label any longer?
Thank you,
Chris
On Feb 20, 4:20 pm, Tys von Gaza <[email protected]> wrote:
> Fix:
>
> active_scaffold/lib/extensions/localize.rb
>
> uncomment the 5th line that looks like:
> text = nil if text.include?('translation missing:')
>
> On Feb 20, 1:10 pm, Tys von Gaza <[email protected]> wrote:
>
> > Agreed, any way to turn this behavior off?
>
> > Tys
>
> > On Feb 20, 12:15 pm, cntrytwist <[email protected]> wrote:
>
> > > Ok, here's what I've been able to figure out. I don't know if this is
> > > a bug or by design, but it appears that something, either Rails or
> > > ActiveScaffold is attempting to translate the strings used in
> > > config.
> > > Your example Chris is:
> > > columns[:firstname].label = "First Name"
>
> > > So, in your config/locals/en.ymlyou need to place the following:
> > > active_scaffold:
> > > 'First Name': "First Name"
>
> > > Do that with every string you give and the error goes away. At first
> > > it does appear to more than double the efforts, but if you ever have
> > > to localize, it sure makes it easier. Maybe we need to consider what
> > > we use for those strings, and try something generic that would be
> > > shorter and descriptive. Then in the translation file give what we
> > > really want it to say?
>
> > > Just a thought.
> > > Kent
>
> > > On Feb 20, 11:35 am, cntrytwist <[email protected]> wrote:
>
> > > > I'm having the same issue. I suspect it has to do with the config/
> > > > locals/en.ymland how AS picks up on it.
> > > > Would it be too much trouble for someone in the know to give a little
> > > > note here on how we're supposed to enable or disable translations? I
> > > > don't need translation, but I'm sure others will.
> > > > Thanks a million for the help.
>
> > > > On Feb 20, 9:32 am, chris <[email protected]> wrote:
>
> > > > > I upgraded my app to Rails 2.2 and updated active_scaffold
> > > > > accordingly. Everything appears to work fine with the exception of
> > > > > where I changed the field labels in the forms and table. For example:
>
> > > > > columns[:firstname].label = "First Name"
>
> > > > > When this displays in my table, I now see the following:
>
> > > > > translation missing: en, active_scaffold, First Name
>
> > > > > Any idea what is going on?
>
> > > > > Thank you,
> > > > > Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---