Question

When I open a file on Rubymine, that has i18n string using "Ruby translate method", it displays a "preview" of the translated text instead of the actual code "t('translate_key')". When I click the text it shows up the code as expected, but I would like to know how can I make it displays the preview again for that piece of code.

I've tried many things from closing the file and opening it again but got unsuccessful. I believe that may have a keyboard shortcut to switch from "string preview" to "actual code", but haven't been able to find it.

Était-ce utile?

La solution

I figured out that the correct way to do this is by folding the line (it may not seen obvious as folding is usually used to fold blocks).

The menu item is: "Code > Folding > Collapse". On Mac OS X using "Mac OS X 10.5+" keymap, the shortcut is +-

Autres conseils

Go to the Preferences menu, IDE Settings, Editor, Code Folding and then uncheck 'Ruby i18n strings'. You will need to close and reopen the file to see the unfolded i18n strings.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top