Home Download Buy Blog Forum Support

Yandex Translate Plugin error

Yandex Translate Plugin error

Postby pafnuty on Thu Aug 15, 2013 8:22 am

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 https://github.com/valmet/python-yandex-translate
Wrote a plugin: https://github.com/pafnuty/sublime-yandex-translate
But he does not want to work if uncommented line 16, writes:
Code: Select all
  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
pafnuty
 
Posts: 1
Joined: Thu Aug 15, 2013 8:18 am

Re: Yandex Translate Plugin error

Postby skuroda on Sat Aug 17, 2013 6:25 pm

Your view#replace method is passing in a list (aka array) rather than a string. Check the contents of that parameter.
skuroda
 
Posts: 676
Joined: Fri Oct 05, 2012 8:11 am


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 3 guests