Sublime-Text-2-BIDI icon indicating copy to clipboard operation
Sublime-Text-2-BIDI copied to clipboard

Disabled menu "Bidirectional text"

Open ghost opened this issue 12 years ago • 25 comments

sorry I tried to install this package but I couldn't. I did as this instruction (http://www.decodize.com/html/sublime-text-2-bidirectional-language-support-plugin)

when I download this package from Github as a zip file, it includes "praveenvijayan-Sublime-Text-2-BIDI-9231a52". when I copy it into package directory, "Bidirectional text" would be add to menu but it is disabled.

I tried by renaming that folder to "Sublime-Text-2-BIDI", "BIDI" and... with restarting the sublime but it didn't. :'(

thanks again

ghost avatar Oct 18 '12 19:10 ghost

In windows, some reason plugin fails to import "unicodedata" when sublime loads. Workaround is - Preference > Browse packages... open rtl.py from Sublime-Text-2-BIDI folder. Just press ctrl+s or file save, this will reload the plugin. Its odd but now its only the possible way to reactivate it. ctrl + ~ will open console you can view the error there.

praveenvijayan avatar Oct 19 '12 06:10 praveenvijayan

Thanks for reply As you said I tried to fix it by changing the encoding (ANSI-win1256 and UTF8) but it didn't worked :'( Also in console prints:

Reloading plugin C:\...\Sublime Text 2\Packages\Sublime-Text-2-BIDI\rtl.py
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 62, in reload_plugin
  File ".\rtl.py", line 4, in 
    from algorithm import get_display
  File "lang\algorithm.py", line 20, in 
    from unicodedata import bidirectional, mirrored
ImportError: No module named unicodedata

ghost avatar Oct 20 '12 12:10 ghost

No there is no point in changing the encoding. "ImportError: No module named unicodedata" - Windows fails to import unicodedata when sublime opens. Open rtl.py in sublime & just press control + s to save the file. This will force sublime to reload the plugin & it will import the "unicodedata" module. After that you can test the plugin. I'm not sure why its fails to load first time.

praveenvijayan avatar Oct 20 '12 16:10 praveenvijayan

I tried saving rtl.py but i get this error in the console everytime i save.

Writing file /C/Users/dur41d/AppData/Roaming/Sublime Text 2/Packages/praveenvijayan-Sublime-Text-2-BIDI-9231a52/rtl.py with encoding UTF-8
Reloading plugin C:\Users\dur41d\AppData\Roaming\Sublime Text 2\Packages\praveenvijayan-Sublime-Text-2-BIDI-9231a52\rtl.py
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 62, in reload_plugin
  File ".\rtl.py", line 4, in <module>
    from algorithm import get_display
  File "lang\algorithm.py", line 20, in <module>
    from unicodedata import bidirectional, mirrored
ImportError: No module named unicodedata

dur41d avatar Oct 22 '12 13:10 dur41d

I got the same error as @dur41d when saving the rtl.py. I just opened the file and pressed Ctrl+s

mojtaba avatar Dec 25 '12 23:12 mojtaba

Sublime Text 2 is not importing unicodedata properly. http://www.sublimetext.com/forum/viewtopic.php?f=3&t=3462

praveenvijayan avatar Dec 26 '12 17:12 praveenvijayan

i have the same problem ...

djoudi avatar Jan 06 '13 19:01 djoudi

it's a matter of paths. Open the above mentioned "rtl.py", add these 2 lines after the 2nd or 3rd line:

sys.platform.startswith('win'): sys.path.append('../../..')

or, copy unicodedata.pyd from main sublime forlder to the same path where rtl.py exist.

shula avatar Jan 11 '13 17:01 shula

Thanks @shula! Problem solved. 'Bidirectional text' menu item is no more disabled. But know, when i choose this item, or press Ctrl+b, all of Persian/Arabic characters turn to question marks.

mojtaba avatar Jan 11 '13 18:01 mojtaba

Yes 'Bidirectional text' menu item is no more disabled. But pressing "Ctrl+b" converting arabic text to squares....

Code95 avatar Jan 12 '13 17:01 Code95

Fixed :) Changing the font in settings user to { "font_face": "Arial", "font_size": 12.0 } fixed the issue...

Code95 avatar Jan 12 '13 17:01 Code95

So again i install the plugin via the control packge and than i open rtl.py and after save it again and the last step i change the font to arial !!!!! this how i did it but i stil have Bidirectional plugin is disabled

ArabicHTML avatar Oct 07 '13 17:10 ArabicHTML

Thanks @shula :+1:

Copying C:\Program Files\Sublime Text 2\unicodedata.pyd to the package folder *C:\Users\ ..\AppData\Roaming\Sublime Text 2\Packages\Bidi* worked for me

MohammadYounes avatar Dec 24 '13 14:12 MohammadYounes

Hey... Thanks @shula , the second way worked for me too!

arman-p avatar Feb 09 '14 13:02 arman-p

Im not having much luck, tried the default installatino instructions and the instructions mentioned in this thread..but still no luck. I'm on a windows 8 64-bit system--anyone find a way to get it to work?

The 'Bidirectional Text' menu item is still greyed out for me :sa:

Something to do with the paths, I tried Shula's path solution, but that didn't seem to do fix anything..

I'm getting this in console:

Writing file Sublime2/Data/Packages/Bidi/rtl.py with encoding UTF-8 Reloading plugin Sublime2\Data\Packages\Bidi\rtl.py Traceback (most recent call last): File ".\sublime_plugin.py", line 62, in reload_plugin m = imp.load_module(modulename, *m_info) File ".\rtl.py", line 2, in import bidi.arabic_reshaper ImportError: No module named bidi.arabic_reshaper

tourshi avatar Apr 09 '14 19:04 tourshi

@shula I tried both methods and the menu item still disabled :( I am using windows 7 please help guys

mhelaiwa avatar Apr 13 '14 06:04 mhelaiwa

Someone just upload the full application (the portable zipped one) with modification on any upload website! http://www.sublimetext.com/2 http://www.sublimetext.com/3 or at least put all files together with full path to copy to.

I get it worked for once, when I've tried to do it again I got disabled menu "Bidirectional text" again and over again after all solutions above !

MeemHamza avatar Apr 16 '14 12:04 MeemHamza

i still got the same issue ,..the menu is disabled and sub menu too even i edit the settings-user file probably note im using Ubuntu 12.04 and Sublime 2

xfoxawy avatar Apr 18 '14 08:04 xfoxawy

I'm finding a similar problem on Mac (Mac OS X v10.6.8), 'Bidirectional text' is disabled in the Tools menu. Package cloned ok, 'Sublime-Text-2-BIDI' directory appears in 'Sublime Text 2/Packages' directory. Subdirectory 'bidi' also exists, containing 'arabic_reshaper.py'. However, on reloading rtl.py I see:

Reloading plugin xxx/Library/Application Support/Sublime Text 2/Packages/Sublime-Text-2-BIDI/rtl.py Traceback (most recent call last): File "./sublime_plugin.py", line 62, in reload_plugin File "./rtl.py", line 3, in import bidi.arabic_reshaper ImportError: No module named bidi.arabic_reshaper

dhc1009 avatar Apr 25 '14 17:04 dhc1009

Someone just upload the full application (the portable zipped one) with modification on any upload website! http://www.sublimetext.com/2 http://www.sublimetext.com/3 or at least put all files together with full path to copy to.

I get it worked for once, when I've tried to do it again I got disabled menu "Bidirectional text" again and over again after all solutions above !

MeemHamza avatar May 04 '14 17:05 MeemHamza

Do you still have this provlem with the latest version?

imdark avatar May 10 '14 15:05 imdark

This plugin doesn't work. I've tried all the solutions available with no luck getting the arabic text to show/work properly. I copied the line sssssssssssss to sublime_plugin.py in the right places and that disabled the Bidirectional text CTRL + B Copied all files from the zip Sublime-Text-2-BIDI-master into the ST2 folder and changed the font type and size, but it's only when I copied over the unicodedata.pyd to C:\Users\USERNAME\AppData\Roaming\Sublime Text 2\Packages\Bidirectional text support\bidi is when the Tools > Bidirectional text part wasn't grayed out anymore but it wouldn't work still. I also copied these two lines sys.platform.startswith('win'): sys.path.append('../../..') and it was the same. Until this plugin works with no issues and work arounds, I'm uninstalling.

e11world avatar Jul 24 '14 22:07 e11world

I still got the same issue ,..the menu is disabled and sub menu too even I tried both methods :/

daniaDlbani avatar Sep 01 '14 08:09 daniaDlbani

@shula it works now :), thanks buddy :+1:

KariMauris avatar Sep 03 '14 10:09 KariMauris

@KariMauris how does it work?? doesn`t for me :(

daniaDlbani avatar Sep 04 '14 12:09 daniaDlbani