Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

.yml localizations seem to bleed into other locales in copycopter #33

Open
kwerle opened this Issue Jul 12, 2012 · 2 comments

Comments

Projects
None yet
1 participant

kwerle commented Jul 12, 2012

We have a bunch of required fields and use the rails-i18n gem to get localizations of "has to be filled out", "must be larger/smaller than...", etc. And that works great.

But copycopter seems to be bleeding the from one locale to another. I'm digging into the problem, and it seems to come from the client and it seems to matter which language you get the error message in first.

I think it goes something like:

  • Submit a form for a model with an error in German
  • View that same model in an index or show page in English
en:
  activerecord:
    errors:
      models:
        book:
          attributes:
            title:
              blank: muss ausgefüllt werden

All the translations for that model show up, but it is getting the German error message

kwerle commented Jul 12, 2012

Hmm. Maybe this is a server issue. It isn't merging all the first translations into any new locale that is added, is it?

kwerle commented Jul 12, 2012

Ah. That's exactly the behavior specified for DefaultCreator.

That seems like an odd design. Why populate with incorrect data? It makes it harder to see what needs to be localized, and it seems like it'd be trivial to fall back to another locale instead of adding this data.

What is the recommended solution for my problem:

  • I want to localize most text myself
  • I want to use all the default rails error localization messages, etc, for the rest. ie. I wanna be DRY.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment