Hello everybody. I have the same problem... translation doesn't work in my enum_strings.
I tried to do everything I could following the HoboFields manual, but I didn't get any results.Someone did it work? Best regards, eddie On 20 ago, 15:54, tjg <[email protected]> wrote: > Hi again, > > Just back from a summer of avoiding this particular problem, but am > still looking for a nudge in the right direction. I could no longer > bump my original posting, so I am copying the text here again. Any > pointers greatly appreciated! > > I've been struggling a little get anenum_stringto pick uptranslationkeys. > Having consulted these refs: > > http://cookbook.hobocentral.net/manual/hobofields/rich_types > andhttp://guides.rubyonrails.org/i18n.html > > I am left puzzled. I cannot get a Hobo-generated SELECT (based on > anenum_string) to pick up defined keys. It continues to simply titleize > theenum_stringconstants. > > 1. What's the correct file to put the keys in? I'm putting keys in the > config/locales/en.yml file, but I see references to "rails.en.yml", > and "app.en.yml", so which one to use? > > 2. From the cookbook ref, it suggests a particular syntax that will > causeenum_stringto use the translated values, but none of my myriad > variations seems to work. > > I have the followingenum_stringin my Document class: > > ProvTerr = HoboFields::EnumString.for(:ab, :bc, :mb) > > I have the following in my en.yml class, with two spaces for each > indent: > > documents: > ProvTerr: > ab: "Alberta" > bc: "British Columbia" > mb: "Manitoba" > > Can anyone see what's not correct? > > Many thanks, > Tim -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
