Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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
Open

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

kwerle opened this issue Jul 12, 2012 · 2 comments

Comments

@kwerle
Copy link

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
Copy link
Author

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
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant