-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash after selecting language pt-BR #263
Comments
I have the same problem. Also, sometimes working in english and resume saving the project, the text entirely disappears. |
So whenever you try to get an exotic language, yarn will try to download it from a location since it is not bundling it. Perhaps I should change this to instead get the languages from a user folder when on electron - but that would mean that you will have to download a BR dictionary file yourself and put it in a specific folder where yarn would expect it |
Hello I've run into this issue on my own fork of YarnEditor. It's actually not the downloading that locks up YarnEditor, the hunspell dictionary provided for the language just doesn't actually work. Something goes wrong when trying to parse it and nspell runs an infinite loop for some reason. In fact, a lot of the languages do this. Please see here for more information: wooorm/nspell#11 Unfortunately I was unable to find a fix or a working dictionary for these languages so I had to remove them from the app. Here are the languages that didn't work for me and crashed the app:
Also just for the future, it would be best to refrain from calling other languages "exotic" as it can be seen as offensive. Obviously I know this isn't your intention, but just an FYI for the future. |
There is one easy way to fix this and it is in making the electron build
script copy these languages to the public folder. I have avoided adding all
languages to be a part of yarn, because they will massively increase the
deployment size of the web version.
But for electron, the size is huge anyways due to electron, so it
shouldnt matter much. I will have a look into this when i get some time, but prs are also welcome :)
Web browsers in general have these built in, the way we do it in yarn is in using external dictionary files for better integration with features through ace-editor
…On Tue, Jul 6, 2021 at 1:20 AM Faulty ***@***.***> wrote:
Hello I've run into this issue on my own fork of YarnEditor. It's actually
not the downloading that locks up YarnEditor, the hunspell dictionary
provided for the language just doesn't actually work. Something goes wrong
when trying to parse it and nspell runs an infinite loop for some reason.
In fact, a lot of the languages do this. Please see here for more
information: wooorm/nspell#11 <wooorm/nspell#11>
Unfortunately I was unable to find a fix or a working dictionary for these
languages so I had to remove them from the app. Here are the languages that
didn't work for me and crashed the app:
- Afrikaans
- Indonesian
- Malay
- Catalan
- Basque
- Galician
- Croatian
- Zulu
- Italian
- Hungarian
- Portuguese
- Finnish
- Chinese
- Japanese
- Latin
Also just for the future, it would be best to refrain from calling other
languages "exotic" as it can be seen as offensive. Obviously I know this
isn't your intention, but just an FYI for the future.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/YarnSpinnerTool/YarnEditor/issues/263#issuecomment-874378676>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRRWVKOUZPRACCAEAB3LKDTWJD4DANCNFSM44Y3VL2A>
.
|
Another thing we can do is make the fetching of dictionaries an async event. Currently yarn will be blocked and freeze up while it downloads a dictionary, which is not great The dictionary bit of code is kind of old and I had to alter the library we use in order to make it work better with yarn, thus why its not coming from the node modules folder. We can do anything we like to it, for hard to get dicts we should probably put a copy of them in the public folder for electron only. |
Again, the issue isn't retrieving these dictionaries from the web. The issue is |
A different dictionary lib would be welcome too
…On Tue, 6 Jul 2021, 21:01 Faulty, ***@***.***> wrote:
Again, the issue isn't retrieving these dictionaries from the web. The
issue is nspell parsing these dictionaries. It would need a new updated
dictionary for nspell to parse it properly, since nspell's algorithm is
hanging on something inside the dictionary files. Or as an alternative to
use a different dictionary parser besides nspell.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/YarnSpinnerTool/YarnEditor/issues/263#issuecomment-875043592>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRRWVKRMJYPIT23JBR7TLTTWNOKPANCNFSM44Y3VL2A>
.
|
I am going to remove the problematic languages from our language selection for now - as a temporary fix to prevent people from crashing yarn. It would be worth investigating using the browser's native dictionary for spellchecking instead - by browser i also include electron which does have that capability built in. The browser knows what the system language is already and has a dictionary for linting spelling mistakes built in. The only tricky thing could be in keeping some features we have working the way they do (the stuffin the context menu to suggest correct spelling of words or synonyms) |
There is an issue opened for ace-editor here too ajaxorg/ace#2107 to add a native spellchecker |
it looks like the server yarn was fetching them from is now changed url. Will need to fix that :( To be clear these are what yarn uses |
I have now disabled the dictionaries that are reported to crash Yarn editor, also fixed the path for downloading dictionaries which has changed. We lost access to dicts in those languages - until a better fix is made |
Hello
Excuse me the english "google translate". I'm a Twine user and wanted to try Yarn Editor. However, both in the browser and on the desktop version, the program stopped working after trying to change the language settings to pt-BR. In the Browser, it returned to work after clearing the cache of Google Chrome, but in the desktop version, not even uninstalling the program and reinstalling again worked.
Can anyone help me?
Thanks.
The text was updated successfully, but these errors were encountered: