From cfa27dbb7f716ee1fedbce92439efec22a3a2320 Mon Sep 17 00:00:00 2001 From: Helium314 Date: Mon, 26 Jun 2023 14:58:15 +0200 Subject: [PATCH] fix issues with suggestions --- README.md | 4 +++- .../inputmethod/latin/InputAttributes.java | 2 +- ...nslate-config-spacing-and-punctuations.xml | 22 +++++++++++++++++++ ...nslate-config-spacing-and-punctuations.xml | 2 +- 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/values-es/donottranslate-config-spacing-and-punctuations.xml diff --git a/README.md b/README.md index 5f56ce638..2265c718e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Plan / to do: * ~user-selectable dictionaries, https://github.com/openboard-team/openboard/pull/578~ * ~make additional dictionaries available for download (from OpenBoard PRs)~ * multi-lingual typing, https://github.com/openboard-team/openboard/pull/593 -* suggestion fixes, https://github.com/openboard-team/openboard/pull/694, https://github.com/openboard-team/openboard/issues/795, https://github.com/openboard-team/openboard/issues/660 +* ~suggestion fixes, https://github.com/openboard-team/openboard/pull/694, https://github.com/openboard-team/openboard/issues/795, https://github.com/openboard-team/openboard/issues/660~ * improve auto-space insertion, https://github.com/openboard-team/openboard/pull/576 * emoji prediction/search, either https://github.com/openboard-team/openboard/pull/749 or use dictionaries * theming, https://github.com/openboard-team/openboard/issues/124 @@ -30,6 +30,8 @@ Changes: * add Arabic dictionary for download, from https://github.com/remi0s/aosp-dictionary-tools/blob/master/dictsCreated/WikiAndOpenSubtitles/ar_wordlist.combined / https://github.com/openboard-team/openboard/pull/450 * add Hebrew dictionary for download, from https://github.com/Hananel-Hazan/aosp-dictionary-tools/blob/master/hebrew-hspell.txt.combined.new / https://github.com/openboard-team/openboard/pull/300 * add Galician dictionary for download, from https://github.com/chavaone/openboard/blob/master/dictionaries/es_GL_wordlist.combined.gz / https://github.com/openboard-team/openboard/pull/291 +* fix suggestions after some characters, https://github.com/openboard-team/openboard/pull/694, https://github.com/openboard-team/openboard/issues/795 +* fix suggestions sometimes not being shown, https://github.com/openboard-team/openboard/pull/709 ----- diff --git a/app/src/main/java/org/dslul/openboard/inputmethod/latin/InputAttributes.java b/app/src/main/java/org/dslul/openboard/inputmethod/latin/InputAttributes.java index 4fdf28315..aba07abc5 100644 --- a/app/src/main/java/org/dslul/openboard/inputmethod/latin/InputAttributes.java +++ b/app/src/main/java/org/dslul/openboard/inputmethod/latin/InputAttributes.java @@ -105,7 +105,7 @@ public final class InputAttributes { // TODO: Have a helper method in InputTypeUtils // Make sure that passwords are not displayed in {@link SuggestionStripView}. - mShouldShowSuggestions = !(mIsPasswordField || flagNoSuggestions); + mShouldShowSuggestions = !mIsPasswordField; mShouldInsertSpacesAutomatically = InputTypeUtils.isAutoSpaceFriendlyType(inputType); diff --git a/app/src/main/res/values-es/donottranslate-config-spacing-and-punctuations.xml b/app/src/main/res/values-es/donottranslate-config-spacing-and-punctuations.xml new file mode 100644 index 000000000..9858fb52e --- /dev/null +++ b/app/src/main/res/values-es/donottranslate-config-spacing-and-punctuations.xml @@ -0,0 +1,22 @@ + + + + "  "()[]{}*&<>+=|.,;:!?¡¿/_\" + diff --git a/app/src/main/res/values/donottranslate-config-spacing-and-punctuations.xml b/app/src/main/res/values/donottranslate-config-spacing-and-punctuations.xml index 06144d021..9acd35cbd 100644 --- a/app/src/main/res/values/donottranslate-config-spacing-and-punctuations.xml +++ b/app/src/main/res/values/donottranslate-config-spacing-and-punctuations.xml @@ -30,7 +30,7 @@ - "  "()[]{}*&<>+=|.,;:!?/_\" + "  "()[]{}*&<>+=|.,;:!?/_\"„“ \'-