RubyMine 4.5.4 and Russian language in cucumber features ...
Hi.
I want to write my cucumber features in russian.
RubyMine don't' highlight russian names.
Cucumber russian support:
cucumber --i18n ru
| feature | "Функция", "Функционал", "Свойство" |
| background | "Предыстория", "Контекст" |
| scenario | "Сценарий" |
| scenario_outline | "Структура сценария" |
| examples | "Примеры" |
| given | "* ", "Допустим ", "Дано ", "Пусть " |
| when | "* ", "Если ", "Когда " |
| then | "* ", "То ", "Тогда " |
| and | "* ", "И ", "К тому же ", "Также " |
| but | "* ", "Но ", "А " |
| given (code) | "Допустим", "Дано", "Пусть" |
| when (code) | "Если", "Когда" |
| then (code) | "То", "Тогда" |
| and (code) | "И", "Ктомуже", "Также" |
| but (code) | "Но", "А" |
--
How force RubyMine understand russian names ?
Please sign in to leave a comment.
Hi,
you just need to add
# language: ru
to the top of the feature file.
Regards, Oleg.
I have attached screenshot where hightlight don't work
Attachment(s):
cucumber_ru_rubymine.png
Hi,
the same works fine for me. Do you have cucumber installed in the sdk you use or just locally?
If the latter then you see http://youtrack.jetbrains.com/issue/RUBY-8816.
Regards, Oleg.
I use rvm and bundle. How do I install it global at linux?. Why it don't work with rvm and bundler?
RM is supposed to work with rvm and bundler. "Global" in this case means in the gemset you use. You can check this in RM by going to
Settings|SDKs and scan the list of gems listed under selected sdk (which is in you case should be ruby+appropriate gemset)
Oleg.
I install cucumber in all gemsets:
- default
- global
- etc.
But RM don't hightlight russian names still.
I use other gemset in my project.
See screenshots
Attachment(s):
rm_cucumber_ru.png
global_gemset_and_cucumber.png
Sorry, it looks like I was not very clear. You need to install cucumber in the gemset the project uses and after reopening project highlighting should work (at least it works for me ;) ).
So, please veryfy that the gemset the project uses has cucumber gem installed and RM sees it (see File|Settings|Ruby SDK and Gems|Installed Gems) and reopen the project.
Oleg.
RM see cucumber, see screenshot.
But RM don't hightlight gherkin's key words in russian :(
Attachment(s):
rm_settings_cucumber.png
One more question to clarify the situation: why "Apply" button is enable on the screenshot? Have you changed something in settings or it is just bad quality of the screenshot?
If the sdk you show is the sdk RM uses for you prohect then it looks like a bug for me. Is it possible to provide test project which demonstrates the problem?
Thanks in advance, Oleg.
SDK come from rvm.
I use custom gemset for my project.
In this gemset exist cucumber gem.
I press apply, but RM don't understand russian key words (Функция, Тогда ...).
I want, when I write:
# language: en
and press Crtl+Space when appear popup windows with english words (ex: Function)
And
when I write:
# language: ru
and press Crtl+Space when appear popup windows with russian words (ex: Функция)
Please show your screen with correct work gherkin editor and russian words.
P.S.
Cucumber features in Russian passed in cucumber but RM gherkin editor don't understand russian keywords.
Hi,
here is a screenshot. But why I was working with it I've finally found the tiny diffference we have :)
You have
# encoding: utf-8
# language: ru
and I have
# language: ru
# encoding: utf-8
and your version doesn't work since RM chack only the very first comment for language derictive.
Thus you need to swap these two lines to make RM work.
Also I've filed http://youtrack.jetbrains.com/issue/RUBY-12124 to improve our language detection, so feel free to vote for it.
Regards, Oleg.
Attachment(s):
cucumber-ru.png
Hmm.
I have changed order of comments to:
# language: ru
# encoding: utf-8
But hightlighting don't work still. :(
Please, tell me order of action for correct work with cucumber in RM 4.5.4.
Attachment(s):
rm_cucumber_ru_2.png
Hi,
I've already answered in the ticket, but will duplicate the answer here (for other readers)
the problem is caused by another bug (RUBY-12123) to workaround it you need to lock your project to
previous version of gherkin: gem 'gherkin', '2.11.1'
Regards, Oleg.
OK.
Workaroud with fix at gherkin-2.11.1 works perfect.
Thanks for quick help and support. ;)