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

Locale files from carmen are loaded after rails app initializes #45

Open
Masa331 opened this issue Apr 7, 2014 · 2 comments
Open

Locale files from carmen are loaded after rails app initializes #45

Masa331 opened this issue Apr 7, 2014 · 2 comments

Comments

@Masa331
Copy link

Masa331 commented Apr 7, 2014

Hi,

we have a problem with adding custom translation to some Carmen state. We added translation to our locale file but it didn't change anything. I think the problem lies at how carmen-rails adds locale files from Carmen to rails I18n.load_path. It adds the files to config.i18n.load_path withing its Railtie and that causes the files are added to app I18n.load_path after the app locales so it rewrites any locale keys app defines.

I just wanted to check, isn't this for some intention i just can't think of right now? If not i propose to change it. I actually tried it at my fork masa331/carmen-rails. I changed the Railtie a bit and it's all good.

If it's all right should i make a pull request?

@kevgrig
Copy link

kevgrig commented Aug 22, 2015

Hi, i tried your branch and added this to my app's config/locales/en.yml:

en:
  world:
    kr:
      official_name: "South Korea"

But I still see, 'translation missing: en.world.kr.official_name'. Do I need to configure something for my locale to be used with your fork?

@Masa331
Copy link
Author

Masa331 commented Aug 22, 2015

Try to add also common_name and name to your yaml:

en:
  world:
    kr:
      official_name: 'South Korea'
      common_name: 'South Korea'
      name: 'South Korea'

I don't know which one is the one really needed tho.. Don't have time for more investigation now :)

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

2 participants