2

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.

Gabriel Mazetto
  • 1,090
  • 1
  • 12
  • 23

3 Answers3

2

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 +-

Gabriel Mazetto
  • 1,090
  • 1
  • 12
  • 23
1

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.

Ray N
  • 11
  • 1
  • Thanks for your time trying to answer the question, but I was asking for a keyboard shortcut that didn't took me extra time. I figured out the answer and will do it now – Gabriel Mazetto Nov 27 '13 at 14:39
0

place your cursor on translation code and press (ctrl-) from keyboard it displays the preview again for that piece of code.