* Bug fix: expected content cannot match
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Reset suggestions when switching subtypes
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Draft: record last candidate or gesture commit position to help determine composing range
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Let the NlpProvider handle last candidate or gesture commit position when determining composing range.
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* draft: allow Enter to commit raw text for CJK
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Add full-width comma to CJK symbols
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Add minimal support for physical keyboard handling (space, enter)
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Force suggestion on for HanShapeBased to avoid user confusion
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Delete pushes lastCommitPosition back instead of resetting to -1
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* fix: delete flogDebug without import
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* fix: allow composing range to change based on subtype switch
* fix: bug where HanShapeBased force suggestion on not reflected in displayed candidates
* fix: for speed, stub out getListOfWords and getFrequencyForWord
* Polish LANGUAGEPACK.md. Add warning about phonetic input. Add translations.
* Move Chinese language pack README to another file
---------
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* feat(ime/nlp): Add `HanShapeBasedLanguageProvider`
* feat: Manually set default NLP to be HanShapeBased
* feat: Temporarily disable adding spaces
This commit should give insight into how the keyboard adds spaces, this
should then be refined into not adding a space after commiting a CJK
text suggestion
* fix(ime/nlp): Remove empty str suggest in HanShape
* feat(ime/nlp): Handle locale variants in HanShape
this should facilitate multiple layouts in the zh locale
* fix(ime/nlp): Handle query params in HanShape
This also helps performance as the DBC doesn't have to compile the query
for every string the user writes
* Space behavior QoL updates for Han shape-based layout (#1)
* Separate space behavior for zh* and latin, and allow space when there is no suggestion.
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Add checking if locale is CJK
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* refactor: Change predicate to a getter & rename
* chore: Remove TODO `supportsAutoSpace` message
* fix: Fix spaces after sugg. in non-space subtypes
* fix: Fix auto space predicate in `PhantomSpace`
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
Co-authored-by: waelwindows <waelwindows9922@gmail.com>
* Draft: editor screen exposes nlpProviders and shape-based Chinese input methods as variants
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Fix defaults for zhengma preset
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Add word tables for added input methods
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Fix: bug in zhengma preset
* Draft: support composing with special characters by delegating nlpProvider to decide composing range.
* Catch SQLite errors such as layout (locale variant) not found (e.g. using HanShapeBased with JIS)
* fixup: remove TODO
* fix: partly addresses 2101, allow searching for locale in English for phones lacking system locale IME
* Adds support for importing "language packs" (sqlite3 db for HanShapeBased for now)
* Changes language pack to zip files. Adds a basic language pack class for storing metadata of IMEs.
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Implement language pack as a type of Flex extension, and draft its import and view UI
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* fix: input method name translation
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Trim down to zhengma, quickclassic, and cangjie for the barebones Chinese shape-based pack. Polish extension user documentation.
* Fix hack to allow multiple language pack extensions to co-exist.
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
* Replace quickclassic with boshiamy
* Fix href in LANGUAGEPACKS.md
* build(nix): Clean up nix flake
* refactor: Encapsulate lanaguage pack query in HSB
* feat(ime/nlp): Implement `getListOfWords` in HSB
* feat(ime/nlp): Implement `getFrequencyForWord`
* chore: Normalize weights for freq in `han.sqlite3`
* chore(ime/nlp): Add some logging for HSB
* Update app/src/main/assets/ime/keyboard/org.florisboard.localization/extension.json
Co-authored-by: Patrick Goldinger <patrick@patrickgold.dev>
Signed-off-by: moonbeamcelery <moonbeamcelery@proton.me>
Co-authored-by: moonbeamcelery <114041522+moonbeamcelery@users.noreply.github.com>
Co-authored-by: moonbeamcelery <moonbeamcelery@proton.me>
Co-authored-by: Patrick Goldinger <patrick@patrickgold.dev>
Is superseded by the fact that all surfaces (except candidates and inline autofill) are now action buttons and freely reorder-able. As such there is no need anymore to distinguish between row types.
The enable pref is now a list preference with a built-in switch, this means the force-on (ignore) toggle is now a list pref, which can be used if audio/vibration is enabled via the built-in switch.
Especially fixes the splash screen for Android 7-11 devices, which utilize the SplashScreen compat library and where the app icon did not draw correctly.
Additionally an unnecessary intermediate splash screen background step has been removed, which should improve Settings UI cold startup time slightly and make it seem more snappy.
* close unused fd
dup2 doesn't close old fds, it only duplicates them.
* use `extern "C"` by block instead individual
also formatting changes for function parameters
* fix a memory leak
* cpp refactor: add utils::log() which takes log_priority
* std{out,err} logger: various improvements
- use std::thread rather than pthread
- redirect std{out,err} to stdin to avoid read() calls
- don't use global variables, for avoid spawning unneeded threads use a static function variable
- check for errors in pipe()
- use a lambda function for thread
Key notes:
- It only works in rich editors
- It intentionally does NOT work in URL, EMAIL and PASSWORD text fields
- May break for exotic characters (aka everything not representable with one char in UTF-16)
- There's no hardcoded language restriction, however it is tailored towards symbols used mostly in Latin-based languages atm
- Performance checking needs to be redone for the commitChar() method
* Add layout
* Add popup mappings and subtype presets; use QWERTY
* ...forgot the main thing
* Add Indonesian popup mapping and subtype presets
* oops
* Fix syntax issue in Indonesian subtype preset
Co-authored-by: Patrick Goldinger <patrick@patrickgold.dev>
This change allows us to definitely know which commit a build corresponds to. For debug builds a short commit is included within the version name, for beta and stable builds it is just an internal `BuildConfig` field.