ubports / keyboard-component

Moved to https://gitlab.com/ubports/core/lomiri-keyboard
https://gitlab.com/ubports/core/lomiri-keyboard
GNU Lesser General Public License v3.0
10 stars 36 forks source link

fix word prediction not being loaded for swiss french and dvorak layout #134

Closed lduboeuf closed 3 years ago

lduboeuf commented 4 years ago

fixes https://github.com/ubports/keyboard-component/issues/132 fixes #100

Fuseteam commented 4 years ago

i'm not sure this is the way to go the db file is probably a copy of the french db file

lduboeuf commented 4 years ago

yes probably it is a copy from fr, if you find another way ;-).

Fuseteam commented 4 years ago

can we maybe symlink it? i was talking with dalton about separating layout from language. my pr for emoji is one way we could do just that. what i still haven't gotten to is getting the layouts visible in setting and how switching layouts should work in the keyboard(this is also the reason that can't be merged as there would be two almost identical emoji layouts in the tree)

lduboeuf commented 4 years ago

yes symlink should work. But is the db read-only or there can have idioms from the sub lang that can land there at runtime ?

Fuseteam commented 4 years ago

i don't think we have any mechanism to add idioms to the db atm

lduboeuf commented 4 years ago

So i give a try by removing unnecessary files for fr-ch and allow to load the prefix database

Fuseteam commented 4 years ago

Hmm interesting this looks like it should rely on the french dictionary now. Looking at the western support section it seems to imply the dvorak layout should just work, but iirc it had the same issue. Guess we should test if this works

lduboeuf commented 3 years ago

So to give info about this PR, currently, when switching from Emoji keyboard, the french dictionnary is not loaded when switching for fr-ch. I bet it is the same for en-dvorak

Fuseteam commented 3 years ago

confirmed it is the same for en@dv

lduboeuf commented 3 years ago

@Fuseteam so when switching from emoji to frznch swiss keyboard is working now;-).Sadly it still does'nt work for the english dvorak case, maybe just because the plugin is missing ( see src.pro INSTALLS in fr-ch)

I need to clean a bit this PR before marking it ready for review

lduboeuf commented 3 years ago

@Fuseteam it works ;-), see https://github.com/ubports/keyboard-component/pull/134/commits/cbb88bfe938fbb87a6a7ac9fc62deec6ee83574e

Fuseteam commented 3 years ago

it is? cool thanks for the heads up @lduboeuf i'll check it out

Fuseteam commented 3 years ago

@lduboeuf i have tested this locally, feels like it needs a bit more than that commit, will continue testing it

it might useful to change this line: https://github.com/ubports/keyboard-component/blob/cbb88bfe938fbb87a6a7ac9fc62deec6ee83574e/plugins/fr-ch/src/src.pro#L23 to just "fr" then it should just read the db from the french layout

lduboeuf commented 3 years ago

@Fuseteam humm, haven't tested it, but if i read well, putting the plugin lib to "fr" will overwrite the existing one from the "fr", that is not what we would want. And if the lib isn't present the plugin will not be loaded ( that was the case for en@dv)

Fuseteam commented 3 years ago

@lduboeuf it does? i thought i did it the other way around hmmm. as far i've seen the db is read from that path

lduboeuf commented 3 years ago

@lduboeuf it does? i thought i did it the other way around hmmm. as far i've seen the db is read from that path

Yes by default, but in my PR you will see a code addition to try to find the db also from the "root" language

Fuseteam commented 3 years ago

ah true, hmmm it doesn't seems to overwrite anything on my side when i do that, but then again it also doesn't fix it, hmmm

Fuseteam commented 3 years ago

btw @lduboeuf what does this line do? https://github.com/ubports/keyboard-component/pull/134/files#diff-a258a48257ccfe094491277b334da558d8e34c6d55e959c8ca6212edfa7370e9

lduboeuf commented 3 years ago

btw @lduboeuf what does this line do? https://github.com/ubports/keyboard-component/pull/134/files#diff-a258a48257ccfe094491277b334da558d8e34c6d55e959c8ca6212edfa7370e9

oh yes that one i can't remember sorry

Edit: Or was it to avoid infinite looping

Fuseteam commented 3 years ago

Or was it to avoid infinite looping

i have no idea :joy:

lduboeuf commented 3 years ago

@Fuseteam have you tested this PR ? , it works on my side

Fuseteam commented 3 years ago

@lduboeuf i have tested commits from this pr in isolation so far i'll test the pr itself and let ya know

Fuseteam commented 3 years ago

hmm doesn't seem to work on my end when i install with ubports-qa, but i'm also stacking PRs atm

wilfridd commented 3 years ago

(https://github.com/ubports/keyboard-component/issues/100) keyboard helpers fixed with swiss french layout Thanks!