-
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
Compress dictionaries and allow users to add more #569
Compress dictionaries and allow users to add more #569
Conversation
compressed files can't be read directly, so they are copied to files directorey before accessing this still saves space, except if a user decides to use most of the available dictionaries
I just tried this: it was quite simple to implement and doesn't require any new permissions (using Rough sketch of UI:
@MajeurAndroid / @dslul is that approach ok? |
Looks good to me, thanks a lot for the effort! |
Great! Three things that may or may not need a change:
|
I'm going to implement a proper preferences screen for showing, adding, updating and deleting dictionaries. |
This looks really good, I wanted to do this for a long time, nice one. |
@MajeurAndroid is there anything I can do to get this implemented? |
@MajeurAndroid @dslul I don't want to be annoying, but considering the number of open issues / PRs regarding dictionaries, adding dictionaries from a file has the potential to help a lot of people. What needs to be done to get this feature (and fix #578) into the main branch? |
openboard-team/openboard#569 openboard-team/openboard#578 modified so dictionaries use the correct type instead of always main
Compressed files can't be read directly by the native library, so the dictionaries were uncompressed so far.
This PR changes the behavior a bit, so the content of an accessed dictionary is copied to internal files directory when the dictionary is loaded for the first time.
Loading from internal files directory is current behavior anyway, so on further loads the dictionary is loaded from there.
Locale matching is done like previously, so always the same locale should be selected.
Sort of fixes #47, though even the compressed size is now 30 MB and thus bigger than the 24 MB in the initial complaint.
Anyway, further size reduction should be possible by removing some dictionaries and allowing to load dictionaries from files, which would simply copy the content to internal files directory to the correct locale. But the user would have to download dictionaries manually.
[Edit: change title and link issues]
fixes #355
fixes #219