Skip to content
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

Spell checker not working? #222

Closed
Eloitor opened this issue Mar 4, 2024 · 24 comments
Closed

Spell checker not working? #222

Eloitor opened this issue Mar 4, 2024 · 24 comments

Comments

@Eloitor
Copy link

Eloitor commented Mar 4, 2024

Hello, I was able to install the dictionaries to /usr/share/dooble/qtwebengine_dictionaries/ and I enabled some of them in Edit > Settings > Web > Spell Checkers.
Now I don't get any errors here (I did get an error when the dictionaries were not installed on the correct place).

I created an index.html file with the following content:

<textarea type="text" spellcheck="value"></textarea>

Opening this file on firefox, I can write on the textarea and get corrections.

When I open this file on dooble I don't get any correction.

By the way, what is "Relative Location Character" for? It is just under spell checkers...

@Eloitor
Copy link
Author

Eloitor commented Mar 4, 2024

Oh I didn't change "value" to true, Now I tested with the corrected value but it doesn't work either...

@textbrowser
Copy link
Owner

dooble

@textbrowser
Copy link
Owner

There is a lengthy tool tip attached to the widget of your 2nd question.

@textbrowser
Copy link
Owner

That we do recognize that in passing we sometimes stumble upon disassociated questions, one should remain relative to the concentrated subject. Secondary questions are difficult to comprehend because of limited attention.

@textbrowser
Copy link
Owner

Enable the languages(s) and then press the Apply button.

@textbrowser
Copy link
Owner

I see that Qt does not immediately honor the request in Qt 5.15 and that in Qt 6 LTS it, Qt, responds quickly. Welcome to the difficult.

@textbrowser
Copy link
Owner

You'll notice that in Settings -> Web -> WebEngine, Dooble describes an immediate process. When it does not, it believes that you should or ought or maybe not or whatever you desire press the Apply button. :P Yuk yuk. If you find places where it behaves differently or you'd like it to behave differently, just ask.

@Eloitor
Copy link
Author

Eloitor commented Mar 4, 2024

mmmm... Thank you! Could you help me debug it?

I activated ca, es-ANY, en-GB and en-US. I have set / as the relative location character since I'm on linux (thanks, I didn't see the tool tip before).

I clicked "Apply", a clock shows up for half a second. After that, I restarted Dooble but spell checking isn't working for me... What can I try?

@textbrowser
Copy link
Owner

The dictionaries are built into the program. Paste the compilation phase during the preparation of the dictionaries.

@textbrowser
Copy link
Owner

If the dictionary tool is not detected, the compilation will fail. Perhaps the dictionaries are empty or they have errors or it's your system or your Qt or you.

@textbrowser
Copy link
Owner

Download one of the packaged Dooble and extract the executable. So if you can set your local library path (LD_LIBRARY_PATH) and have that Dooble launch. Then you can test to determine if the problem is Dooble or your system.

@Eloitor
Copy link
Author

Eloitor commented Mar 4, 2024

You can see the compilation phase here: https://github.com/void-linux/void-packages/actions/runs/8139427779/job/22242559871?pr=49075

You have to click "Build and check packages".

@Eloitor
Copy link
Author

Eloitor commented Mar 4, 2024

Download one of the packaged Dooble and extract the executable. So if you can set your local library path (LD_LIBRARY_PATH) and have that Dooble launch. Then you can test to determine if the problem is Dooble or your system.

OK I'll try this, thanks!

@Eloitor
Copy link
Author

Eloitor commented Mar 4, 2024

Ok I downloaded the packaged Dooble.

I ran ln -s /usr/share/dooble/qtwebengine_dictionaries . and I started Dooble. The spell checker worked.

But in the system Dooble I can't get the spell checker to work... I build Dooble with the following patch

--- a/Source/dooble_settings.cc
+++ b/Source/dooble_settings.cc
@@ -2271,7 +2271,7 @@ void dooble_settings::show_qtwebengine_dictionaries_warning_label(void)

   if(bytes.trimmed().isEmpty())
     {
-      bytes = "qtwebengine_dictionaries";
+      bytes = "/usr/share/dooble/qtwebengine_dictionaries";

       if(!QFileInfo(bytes).isReadable())
 	{

Maybe I need to change something else for this to work....

@textbrowser
Copy link
Owner

That's not a solution. If you read a few lines above, the solution should inspire you.

@textbrowser
Copy link
Owner

textbrowser commented Mar 4, 2024

OK OK I be impatient. A hint.

auto bytes(qgetenv("QTWEBENGINE_DICTIONARIES_PATH"));

@textbrowser
Copy link
Owner

@textbrowser
Copy link
Owner

In a correct system, it works. In an incorrect system, you can correct it to work. What makes it correct? Well, you can have the actual dictionary files and that path is configured by a correct Qt. If the correct Qt is incorrect, you can override the path by dooble.sh. Revising the source should be the last.

@textbrowser
Copy link
Owner

The Qt people care and the document describes the process of discovering the spelling spellers. It's a complicated process which can be glitched into correctness. It's all simple.

@Eloitor
Copy link
Author

Eloitor commented Mar 4, 2024

Thank you for the explanation! My reasoning is as follows:

  1. I have $QTWEBENGINE-DICTIONARIES_PATH unset. I don't see why the patch shouldn't work... The warnings are not showing up...

  2. I have dooble in /usr/bin/dooble

    Otherwise, it uses the qtwebengine_dictionaries directory relative to the executable if it exists

    I don't want to have the dictionaries in /usr/bin/qtwebengine_dictionaries/

  3. Maybe a system-wide dictionaries install would be best (maybe even provided by a specific package)

    $QT_INSTALL_PREFIX/qtwebengine_dictionaries

    Is $QT_INSTALL_PREFIX supposed to be /usr/share/qt6?

@textbrowser
Copy link
Owner

  1. The variable is QTWEBENGINE_DICTIONARIES_PATH, without hyphens.
  2. I have /usr/local/dooble and inside that directory there is the special directory.
  3. The special directory is required by Qt. The directory does not exist in Qt land. I don't have it as part of Kubuntu. I don't have it as part of Qt installed by the online version. Dooble creates it and Qt discovers it.
ls /usr/local/dooble/
Charts  Dooble  dooble.png  dooble.sh  qtwebengine_dictionaries

@Eloitor
Copy link
Author

Eloitor commented Mar 4, 2024

Thanks for your patience with my questions! I'll try to figure it out.... I'll let you know if I succeed!

@textbrowser
Copy link
Owner

What you mean? You need to copy the directory to wherever Dooble exists. If that's not possible, you need to copy it somewhere and let Qt know with special variable.

@Eloitor
Copy link
Author

Eloitor commented Mar 6, 2024

I'm closing this because in voidlinux I will be attempting to install dictionaries system-wide, maybe in /usr/share/qt6/qtwebengine_dictionaries.

@Eloitor Eloitor closed this as completed Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants