El Monday 23 February 2009 12:54:30 delirious escribió:
> Strange. That does not seem to work for me Sergio: if I just enter
> translations in my yaml locale without defining a label I don't get
> the translated version.
> I'm running the current stable version of AS and:
>
> Ruby version              1.8.6 (universal-darwin9.0)
> RubyGems version          1.3.1
> Rails version             2.2.2
> Active Record version     2.2.2
> Action Pack version       2.2.2
> Active Resource version   2.2.2
> Action Mailer version     2.2.2
> Active Support version    2.2.2

It's not a problem with active_scaffold, translate activerecord column names 
is made by rails.
Are you using that structure?
language:
  activerecord:
    attributes:
      model_name:
        column: 'Text'

You can try with script/console:
Model.human_attribute_name :column


>
> Simon
>
> On Feb 23, 11:23 am, "Sergio Cambra .:: entreCables - Symbol Servicios
>
> Informáticos S.L. ::." <[email protected]> wrote:
> > El Monday 23 February 2009 02:22:58 delirious escribió:
> > > Hi fmh,
> > >
> > > if by model attributes you mean column headings, you need to set
> > > labels explicitely.
> > >
> > > ie: columns[:first_name].label = "my string"
> > >
> > > Then AS will complain it has no translation for "my string" and you
> > > can enter a translation in the yaml localisation file.
> >
> > You don't need to set label in the controller. You only need translate
> > them using rails i18n:
> > config/locales/em.yml
> > en:
> >   activerecord:
> >     attributes:
> >       model_name:
> >         firstname: 'First Name'
> >       other_model:
> >         column: 'Text for column'
> >
> > > Best Regards,
> > > Simon
> > >
> > > On Feb 13, 11:21 pm, fmh <[email protected]> wrote:
> > > > there is someone to help?
> > > >
> > > > On 13 fév, 10:23, fmh <[email protected]> wrote:
> > > > > hello,
> > > > >
> > > > > how to translate the model's attributes. it work with i18n but not
> > > > > with AS.?
> > > > >
> > > > > I can translate a label but i dont think if it's the better
> > > > > solution.
> > > > >
> > > > > i use yaml file.
> >
> > --
> > Sergio Cambra .:: entreCables S.L. ::.
> > Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
> > T) 902 021 404 F) 976 52 98 07 E) [email protected]
>
> 


-- 
Sergio Cambra .:: entreCables S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

  • tr... fmh
    • ... fmh
      • ... fmh
        • ... delirious
          • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
            • ... Helmi Fatnassi
            • ... delirious
              • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
    • ... fmh
    • ... fmh
    • ... fmh

Reply via email to