Skip to content

value of @virtual_path changed? #4593

Closed
conanite opened this Issue Jan 21, 2012 · 4 comments

3 participants

@conanite

My i18n yml in 3.0.3 looks like this:

  en:
    users:
      index:
        title:        User List

In 3.2.0, TranslationsHelper seems to expect this:

  en:
    users:
      index:
        html:
          title:        User List

In other words, t(".title") in users/index.html.haml now causes a lookup of en.users.index.html.title, whereas previously it caused a lookup of en.users.index.title

Browsing the code, it seems that the value assigned to @virtual_path in TranslationsHelper is responsible for this; I haven't figured out where the change happened.

While it can be useful to distinguish between show.html and show.pdf in i18n dictionaries, this makes upgrading a pain. Is there a way to suppress the .html segment of the key so I don't have to adjust a whole bunch of yml?

@jtmkrueger

Did you figure out an answer to this?

Should we leave it open?

@frodsan
frodsan commented Apr 30, 2012

I don't get this issue using master version.

@jtmkrueger

Nice! Think you can close this? Trying to help @tenderlove wade through the sea of issues.

@conanite

I have a rails 3.0.3 app that I'm slowly upgrading to 3.2, and I get this issue. I don't get it with a clean rails 3.2 app. No idea why the difference. At this stage my keys are all changed so it's not important for me to fix this. I'd appreciate any light shed on the subject though.

Thanks your your attention dudes.

@conanite conanite closed this Apr 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.