Skip to content

label and I18n #53

Description

@aklein-dex

Here is my code in my model :

    enum_attr :currency, %w(en ja), :init => I18n.locale do 
      label :en => I18n.t(:dollar)
      label :ja => I18n.t(:yen)
    end

My locale files :

    en:
      dollar : "$"
      yen : "¥"
    ja:
       dollar: "$"
       yen : "円"

This works as expected on my development environment, but on my staging (and production) environment, the labels are strange!
In my page I print out I18n.locale and I18n.default_locale, and both are "ja" as expected.
But the labels are:
<option value="en">translation missing: en.dollar</option>
<option selected="selected" value="ja">translation missing: en.yen</option>

Why it is looking for "en" despite that I18n.locale = "ja" ?
Even why it cannot find "en.dollar" despite that it exists in my locale file ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions