Giter Site home page Giter Site logo

Comments (11)

Helium314 avatar Helium314 commented on August 26, 2024

Is this really a bug?
As far as I understand the TextInfos the spell checker is working with don't contain language information, so there is no way for the spell checker to know the word is correct in some other language than the current one.

from heliboard.

Helium314 avatar Helium314 commented on August 26, 2024

As part of #116 I had a look at the spell checker code, and as I suspected above, this behavior is not a bug but normal / intended.
So I changed this into a feature request.

from heliboard.

odmfl avatar odmfl commented on August 26, 2024

if you set two different input languages, the words of the language different from the Android system language are marked in red. This should fix it

GrapheneOS/platform_packages_inputmethods_LatinIME@b6eb815

Original issue GrapheneOS/os-issue-tracker#2539

from heliboard.

thestinger avatar thestinger commented on August 26, 2024

We used to have a workaround for this AOSP keyboard bug within the OS, by reverting an upstream commit with an incompatible change. It was an ugly workaround and is broken with Android 14 so it needs to be addressed in the keyboard app which is really what should have been done originally but we didn't know how to resolve it there.

from heliboard.

Helium314 avatar Helium314 commented on August 26, 2024

Always checking in all enabled languages will work, as in not underlining text written in another language.
But at the same time it will not flag typos that are normal words in another language, even if the language hasn't been used at all in that input field.

E.g. "im" will be underlined when using only an English dictionary. But when you sometimes write in Polish and therefore have a Polish keyboard enabled, "im" will not be underlined as it's a valid Polish word.
(this fork of OpenBoard would need to use enabled keyboard layouts to determine locales, instead of reading system locales)

from heliboard.

codokie avatar codokie commented on August 26, 2024

@Helium314 Would you approve of adding an option (turned off by default) in settings to combine dictionaries of all enabled keyboard layouts? At least until a more sophisticated approach could be developed.
I think it makes sense for many users who type in 2 or more languages that do not share letters of the alphabet, like Chinese/Hindi and English. In such cases there is no concern that misspelled words would be ignored.
I've tried to implement that and so far it seems to work as intended. If that is okay, I would really like to make a pull request for it

from heliboard.

Helium314 avatar Helium314 commented on August 26, 2024

I think it makes sense for many users who type in 2 or more languages that do not share letters of the alphabet

For such cases I'd rather prefer something like the spell checker not underlining words that are not part of the current script.
And maybe this should go into a new issue, as it's not related to remembering the language for a word.

from heliboard.

codokie avatar codokie commented on August 26, 2024

@Helium314 Thanks a lot for the reply. I appreciate it.

For such cases I'd rather prefer something like the spell checker not underlining words that are not part of the current script.

But then I think misspelled words written in the current script will be re-evaluated and ignored when the script is changed.
A more elegant solution would be possible if there was a way to "remember" previous spellcheck results, or the locale used to write those words - which is tricky because any random string could be pasted to the text box.

By the way I'm sorry for necrobumping this issue, it's just that I found it to be very similar to the one I'm having.
Should I open a new one? It might seem like a duplicate of this issue.

Those red lines are a pain to the eyes.. :(

from heliboard.

Helium314 avatar Helium314 commented on August 26, 2024

Isn't the spell check re-done for the entire text field when you switch the keyboard layout? Or do you need to close and re-open the keyboard for that?

By the way I'm sorry for necrobumping this issue

As long as an issue is open I wouldn't see it as dead

from heliboard.

codokie avatar codokie commented on August 26, 2024

@Helium314 From my testing, the spell check is done on the entire text up to the cursor every time a word separator (such as space or period) is entered (which seems like an inefficient approach), while changing the keyboard layout or reopening the keyboard does not trigger spell checking.
I find the logic that is used to determine if a text is checkable to be lacking, yet I am not sure how to enhance it without possibly decreasing performance. URLs, numbers and special characters are checked against the dictionary as well. Unsurprisingly, they are then flagged as typos (red underlined). But that's for another issue..

from heliboard.

Helium314 avatar Helium314 commented on August 26, 2024

while changing the keyboard layout or reopening the keyboard does not trigger spell checking

Then I think this is what should be changed

Unsurprisingly, they are then flagged as typos (red underlined). But that's for another issue

I think there is an issue for that already, or somthing similar. But that only happens starting with Android 10 or 11, so nothing I can test on my Android 9 phone.

(In general, I'm doing only very little work on the spell checker because a. behavior seems to somewhat depend on Android version and b. for some reason it takes very long for my phone to start the spell checker service every time I launch the app from Android Studio)

from heliboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.