Sublime Forum

Yandex Translate Plugin error

#1

Good day.
It took me all of a sudden a lot of text to translate directly into the editor.
principle is this: the word singled / words, pressed hotkey, it / they will replace for translation.
Find a suitable plug-in has failed, he decided to write his own.
Found the right code on github github.com/valmet/python-yandex-translate
Wrote a plugin: github.com/pafnuty/sublime-yandex-translate
But he does not want to work if uncommented line 16, writes:

File ".\yaTranslate.py", line 16, in run Boost.Python.ArgumentError: Python argument types in View.replace(View, Edit, Region, list) did not match C++ signature: replace(class SP<class TextBufferView>, class SP<class Edit>, class SelectionRegion, class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >)
If there are knowledgeable people help me understand, I came across a python just today.

P.S.
the text is translated by GoogleTranslate

0 Likes

#2

Your view#replace method is passing in a list (aka array) rather than a string. Check the contents of that parameter.

0 Likes