-
Notifications
You must be signed in to change notification settings - Fork 254
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
Add multilingual typing #565
Add multilingual typing #565
Conversation
revert switch between main and secondary locale tune suggestion weights for each locale based on mConfidence more preparations for making secondary dictionary selectable isValidSpellingWord now uses both dictionaries (called only by spell checker)
Small update:
(initial to-do still applies, with the update regarding spell checker) |
@MajeurAndroid
So to offer a list of secondary locales to select from, we need to get a list of locales with dictionaries that have the same script as the current main locale. Then there is the question how to select secondary locales: Should it be one secondary locale? Or one for each main locale? Or one for each script? |
Current state:
I think the PR is mostly ready (once #569 is done), only the spell checker needs some work:
|
Spell check in secondary locale works again, but I see no way of setting the locale that is used when adding to personal dictionary... Secondary locale selection is moved to its own screen, with one secondary locale per enabled keyboard locale. |
Bugs fixed, so I think this is almost ready. Only problem with actually using it: currently detection of existing dicitonaries works only when manually putting a dicitonary in |
I quickly reviewed your changes, they seem good and I think you covered all the fundamentals of it. Else, I tested the APK and I am having a bit of hard times to setup a secondary locale:
This will be far simpler to work and debug on a common branch. |
Thanks, so I'll look into the issues once I'm (mostly) done with #569, as the way I arranged it this will be required for working detection of dicitonaries. And I definitely agree some longer test will be needed... like I never even thought about trying with default option "use system language". |
I added a hardcoded locale list for easier testing, and fixed the problem for default language. Do you have more details about the crash? |
I think we should do one thing at a time, one branch for multi-locale, one for external-dicts. Then when both will be finished, we'll look into compatibility between multi-locale. |
This is a very basic implementation of multilingual typing, but it is working.
A second dictionary is added in and queried for suggestions, so that suggestions of both languages show up. The secondary language has lower weight, so mostly suggestions of the main language are shown. If more than two consecutive typed words exist only in the secondary language, main and secondary language switch roles.
This is only a draft PR, because a lot of stuff needs to be done:
Before I continue working on this I would like some feedback on whether the way I did it is acceptable at all, and maybe some general comments on what should be taken care of.
fixes #167
fixes #7