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 an enum_string to pick up
translation keys. Having consulted these refs:

http://cookbook.hobocentral.net/manual/hobofields/rich_types
and
http://guides.rubyonrails.org/i18n.html

I am left puzzled. I cannot get a Hobo-generated SELECT (based on an
enum_string) to pick up defined keys. It continues to simply titleize
the enum_string constants.

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
cause enum_string to use the translated values, but none of my myriad
variations seems to work.

I  have the following enum_string in 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.

Reply via email to