GrapheneOS / os-issue-tracker

Issue tracker for GrapheneOS Android Open Source Project hardening work. Standalone projects like Auditor, AttestationServer and hardened_malloc have their own dedicated trackers.
https://grapheneos.org/
351 stars 19 forks source link

Spell checker since Android 14 #2539

Open p1gp1g opened 11 months ago

p1gp1g commented 11 months ago

Until Android 14 release, the spell checker used the keyboard language to check the input. Now it seems to only use the system language, or the one defined in spell checker settings, making it pretty impossible to switch easily.

For instance, if you use:

And you type "Ceci est un exemple en français", then every words are underlined. Even if each of them are suggested by the keyboard (cf. screenshot).

image

NoisyCoil commented 11 months ago

I am having this issue too.

j-lakeman commented 11 months ago

Confirmed for English and German as well.

ghost commented 11 months ago

Possible dupe of #247 and #518.

thestinger commented 11 months ago

It's a duplicate in the sense that this issue existed before and we previously fixed it but the reason it's happening now is because the fix was incompatible with Android 14 and had to be reverted. Use another keyboard for now.

hcording commented 11 months ago

It's a duplicate in the sense that this issue existed before and we previously fixed it but the reason it's happening now is because the fix was incompatible with Android 14 and had to be reverted. Use another keyboard for now.

I also get this issue with another keyboard, OpenBoard in my case:

Screenshot_20231023-131144 (Pixel 6 with Android 14)

From what I can tell OpenBoard does not have a built in spell checker or anything, so it seems that 3rd party keyboards are also be affected.

My system spell checker is configured to use system languages, which are 1) US and 2) German (qwerty)

wfrr commented 11 months ago

I also have the same issue for Russian words with English as default system language and AOSP keyboard with English and Russian layouts. It turns out that disabling system spell checker while leaving keyboard's one enabled solves problem for me. Pixel 5a Android 14

ahkole commented 10 months ago

The release notes for version 2023103100 mention in the changelog that this issue was supposed to be fixed. However, I don't know if I'm doing anything wrong but for me the problem persists. The spell checker only seems to use the primary system language (the language at the top of the list of the selected system languages) and none of the secondary system languages.

I am currently running build UP1A.231105.003.2023110700 and have the problem both with the default GrapheneOS keyboard and OpenBoard.

thestinger commented 10 months ago

OpenBoard needs to resolve the issue themselves.

ahkole commented 10 months ago

It's not a problem with OpenBoard though. As I already mentioned I still have the same problem when I switch back to the default OS keyboard. And on the forums there is at least one person with the same problem who isn't using OpenBoard: https://discuss.grapheneos.org/d/8767-spell-checker-not-working-for-secondary-languages

Maybe one of people who mentioned earlier in this issue that they have the same problem can comment if the problem has been fixed for them? For example, @p1gp1g , @NoisyCoil , @j-lakeman or @hcording ?

ghost commented 10 months ago

The issue is fixed for me.

ahkole commented 10 months ago

The issue is fixed for me.

Thanks for commenting @scarecrow1636. Could you maybe share your some relevant details of your setup, i.e. which keyboard you're using, build version, settings (keyboard, languages, spell checker)? Then I might be able to check how they differ from mine.

ghost commented 10 months ago

The issue is fixed for me.

Thanks for commenting @scarecrow1636. Could you maybe share your some relevant details of your setup, i.e. which keyboard you're using, build version, settings (keyboard, languages, spell checker)? Then I might be able to check how they differ from mine.

I'm using default keyboard. System languages are English (United States) and Russian (Russia). My spell checker is set to default and configured to use system languages. I was previously affected by the issue.

UP1A.231105.003.2023110700

ahkole commented 10 months ago

I did some more tests, also adding additional secondary languages and the problem seems to be with my main secondary language, Dutch. If I add other languages like German and French the spell checker does work for those. Interestingly if I make Dutch my primary system language (so that the entire OS is in Dutch) the spell checker seems to stop working all together (in the sense that it never seems to flag any word as being wrong, even if I just write any garbage string of letters, regardless of the secondary languages activated). Is it possible that the update to Android 14 somehow broke the Dutch dictionary?

thestinger commented 10 months ago

It's not a problem with OpenBoard though. As I already mentioned I still have the same problem when I switch back to the default OS keyboard. And on the forums there is at least one person with the same problem who isn't using OpenBoard: https://discuss.grapheneos.org/d/8767-spell-checker-not-working-for-secondary-languages

Maybe one of people who mentioned earlier in this issue that they have the same problem can comment if the problem has been fixed for them? For example, @p1gp1g , @NoisyCoil , @j-lakeman or @hcording ?

It's a per-keyboard issue. We previously had a workaround applied in the OS which was an ugly hack and isn't going to be done anymore on Android 14. Most keyboards are not impacted by leaving out the ugly workaround.

thestinger commented 10 months ago

I did some more tests, also adding additional secondary languages and the problem seems to be with my main secondary language, Dutch. If I add other languages like German and French the spell checker does work for those. Interestingly if I make Dutch my primary system language (so that the entire OS is in Dutch) the spell checker seems to stop working all together (in the sense that it never seems to flag any word as being wrong, even if I just write any garbage string of letters, regardless of the secondary languages activated). Is it possible that the update to Android 14 somehow broke the Dutch dictionary?

There isn't dutch spellchecking support in AOSP keyboard.

ahkole commented 10 months ago

I did some more tests, also adding additional secondary languages and the problem seems to be with my main secondary language, Dutch. If I add other languages like German and French the spell checker does work for those. Interestingly if I make Dutch my primary system language (so that the entire OS is in Dutch) the spell checker seems to stop working all together (in the sense that it never seems to flag any word as being wrong, even if I just write any garbage string of letters, regardless of the secondary languages activated). Is it possible that the update to Android 14 somehow broke the Dutch dictionary?

There isn't dutch spellchecking support in AOSP keyboard.

Really? You would kind of expect that it's there considering you can choose Dutch as a system language and as a keyboard language with the AOSP keyboard. Too bad. Then I guess my best solution for now is just to disable the spell checker and hope they improve Dutch support in AOSP keyboard at some point.

Thanks for explaining the situation in any case!

thestinger commented 10 months ago

You can use a different keyboard with the features you want.

ahkole commented 10 months ago

Thanks for the suggestion, I might look into that at some point. For now turning it off is fine for me since I was never relying much on the spell checker anyway.

unbranched commented 10 months ago

I confirm the bug still persists on:

Pixel 6a GrapheneOS 2023110700 Default system keyboard

System language is italian. On Settings->System->Keyboard->On-screen Keyboard I have selected English (USA) and italian. On Settings->System->Keyboard->Spell Check->Languages I have selected "Use system languages"

If I select English while typing on the keyboard, all words are underlined in red.

thestinger commented 9 months ago

Resolved for upcoming OS release.

mxkrsv commented 9 months ago

The problem still persists for me on 20231231.

thestinger commented 9 months ago

@mxkrsv Can you give more details?

mxkrsv commented 9 months ago

I'm using a beta channel build on a Pixel 6a.

When the main system language is English, the words in the second language are always highlighted red, both with "use system languages" in keyboard settings and without. When the system language is swapped, it's vice versa (English words are red).

It may be relevant that adding a highlighted word to a dictionary actually adds it to the English one.

muhomorr commented 9 months ago

@mxkrsv Are you using the default keyboard and default spell checker?

mxkrsv commented 9 months ago

Yes. No other OS modifications either.

ghost commented 9 months ago

My setup is same as the above. Latest stable on 6a. All Russian words are underlined since this morning.

RobinFrcd commented 9 months ago

Same on:

muhomorr commented 9 months ago

@RobinFrcd What's the value of the spell checker's "Languages" setting (in Settings -> System -> Keyboard -> Spell checker)?

RobinFrcd commented 9 months ago

Use system languages @muhomorr

muhomorr commented 9 months ago

@RobinFrcd Does it happen with all English and French words? It happens to me only for French words that start with a non-English letter.

@mxkrsv @scarecrow1636 I've reproduced the issue, it's due to incorrect handling of word splitting when languages with non-similar alphabets are used together.

RobinFrcd commented 9 months ago

Well, the issue on my side is mainly that I'm not getting French words suggestion at all, only English ones.

muhomorr commented 9 months ago

@RobinFrcd Did multi-language suggestions work for you before with the same setup?

RobinFrcd commented 9 months ago

I installed GOS for the first time yesterday, was on LineageOS before, had no issue with this setup. @muhomorr

thestinger commented 9 months ago

You probably weren't on Android 14.

RobinFrcd commented 9 months ago

I'll double-check when I'm at home, but I think you're right. I guess it was Android 13. But still, we can agree it's a bug here, right ?

thestinger commented 9 months ago

There was a regression caused by Android 14, which we've been working on resolving.

muhomorr commented 8 months ago

Spell checker behavior should be the same as it was in Android 13 since 2024010400 release.

RobinFrcd commented 8 months ago

With:

This is not working the same as my OP6 on LineageOS (Android 13).

On the Pixel, the keyboard only suggests/corrects English words (but doesn't underline French words, tho). On Android 13 it uses both languages.

muhomorr commented 8 months ago

@RobinFrcd What are language settings for Gboard spell checker? Gboard spell checker was not affected by this issue.

RobinFrcd commented 8 months ago

@muhomorr Using System languages (1. English 2. French)

Oh, actually have the same issue with default Spell Checker. But maybe there's a "learning" process ? I have a few French words that pop in the suggestions, but most of the time it's only English, even if the full word exists in French.

Example:

muhomorr commented 8 months ago

@RobinFrcd I'm unable to reproduce this on 2024010400 release. Are you switching keyboard layout to French when writing French words?

RobinFrcd commented 8 months ago

I'm using the French (France) Gboard in QWERTY with Mulitlingual typing and English (UK) enabled.

image image

muhomorr commented 8 months ago

Built-in spellchecker is not used for suggestions when Gboard is used, it's used only for spell-checking in that case.

RobinFrcd commented 8 months ago

Oh, thanks, I'm a bit lost then, in that case the suggestion mechanism in based on which system ?

muhomorr commented 8 months ago

Suggestions come from Gboard. Try to reproduce this issue with built-in keyboard + built-in spellchecker.

unbranched commented 8 months ago

Spell checker behavior should be the same as it was in Android 13 since 2024010400 release.

Fixed on my side, thanks.

RobinFrcd commented 8 months ago

I still have issue with the words suggestions not working on my secondary language. Not sure where to look at, is it only an issue on gboard side ? Nothing to do with the system here ?

muhomorr commented 8 months ago

@RobinFrcd Have you revoked the Network permission from Gboard? Gboard needs it to download dictionaries.

RobinFrcd commented 8 months ago

That's what I just realized here, my issue is also solved, thank you very much ! :pray: