Skip to content

Conversation

DeleMike
Copy link
Collaborator

Contributor checklist


Description

This PR addresses two issues:

#421:
When a user tries to pluralise a word that is already plural, the keyboard now detects this and shows the "Already plural" message. The UI updates accordingly, and the keyboard returns to the idle state after the message is displayed.

#467:
Plural word detection has been improved to be case-insensitive. Previously, capitalised plural words like "Hellos" were not recognised, causing the PL suggestion keyword to not appear. This fix ensures consistent behaviour for plural recognition regardless of casing.


Testing

Screenshot of text
Screenshot_2025-07-31-17-37-58-149_com google android apps messaging


Videos

Screenrecorder-2025-07-31-17-47-41-80.mp4
Screenrecorder-2025-07-31-18-41-58-447.mp4

Related issue

DeleMike added 2 commits July 31, 2025 18:26
…onsistently

Previously, plural suggestions were not shown for capitalized words (e.g. "Hellos") due to case-sensitive matching. This commit ensures that plural detection consistently lowercases input before checking against the pluralWords list, resolving Issue scribe-org#467.
Copy link

Thank you for the pull request! ❤️

The Scribe-Android team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest that you use the Element client as well as Element X for a mobile app, and definitely join the General and Android rooms once you're in. Also consider attending our bi-weekly Saturday dev syncs. It'd be great to meet you 😊

Copy link

github-actions bot commented Jul 31, 2025

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • The linting, formatting and testing workflows within the PR checks do not indicate new errors in the files changed

    • Tests may need to be reran as they're at times not deterministic
  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@DeleMike
Copy link
Collaborator Author

Hi @andrewtavis and @angrezichatterbox.

I resolved the issues of already plural(added a new scribe state to track this) and ensured the "PL" keyword shows(word case sensitivity was causing the issue).

@andrewtavis
Copy link
Member

Hey @DeleMike 👋 Things seem to be working for English, but I'm not seeing the same functionality for German. When I type in "Bücher" for books I don't see a PL when I enter in a space, and I also don't get the already plural message when trying to use the plural command for a plural word. Can you take a look at why this might be working for one language and not others? :)

@DeleMike
Copy link
Collaborator Author

DeleMike commented Aug 2, 2025

Thanks for the observation @andrewtavis!

I saw that it reported "Nicht in wikidata" so I thought maybe some words are not available for German, I also tried french too. Well, I will check.

Thank you!

@DeleMike
Copy link
Collaborator Author

DeleMike commented Aug 5, 2025

Hi @andrewtavis, I've fixed the issue. Can you please confirm it works from your end?

I had to touch the test file because it was failing for some because of NoActivityResumedException error. But I have fixed that too in this PR.

@angrezichatterbox
Copy link
Member

@DeleMike @andrewtavis

Now if we use the use the keyboard and we already have a word typed in the input and then we go to plural mode and type a word which is plural and it goes to already plural. It would search if we click on the enter button rather than moving to idle state.

Is this intended ?

@angrezichatterbox
Copy link
Member

Other than that everyone looks good to me :)

@DeleMike
Copy link
Collaborator Author

DeleMike commented Aug 7, 2025

@DeleMike @andrewtavis

Now if we use the use the keyboard and we already have a word typed in the input and then we go to plural mode and type a word which is plural and it goes to already plural. It would search if we click on the enter button rather than moving to idle state.

Is this intended ?

Thanks for the review @angrezichatterbox . I don't fully understand please. Can you show me a visual?

@angrezichatterbox
Copy link
Member

The issue is fixed except in a specific case we would have the enter being instead of redirecting to idle state would work as enter.

When there is existing text in the input field and then we would have an already plural word and we would exit to the idle state using enter would directly use the enter and enter the text in the field rather than going to idle state.

I would try to get a recording if the explanation is still not clear.

@DeleMike
Copy link
Collaborator Author

DeleMike commented Aug 8, 2025

I'm so sorry @angrezichatterbox! I do not fully understand. Could you please explain more?
I have tried to understand the issue by using the keyboard for the languages but it is hard for me right now.

If we revert to the idle state, the "already plural" text will not show. Unless I'm getting the issue wrong.

A recording will be nice, please.

@angrezichatterbox
Copy link
Member

plural_command_error.webm

This is video recording of the bug.

DeleMike and others added 3 commits August 10, 2025 16:51
When in ALREADY_PLURAL state, Enter key now returns to idle state instead of performing Enter action in input field.
@DeleMike
Copy link
Collaborator Author

DeleMike commented Aug 10, 2025

@angrezichatterbox I have understood the problem. I made a fix for it.
see the video

Also, I fixed the issue with the keyboard key text sizes are being too large

what do you think @andrewtavis ?

Screenrecorder-2025-08-10-17-55-59-395.mp4

@andrewtavis
Copy link
Member

@angrezichatterbox, FYI it looks like @DeleMike sent along a change for the key text sizes. Was that what you were referring to here? Is #438 ready to review if we're doing that fix here?

@DeleMike
Copy link
Collaborator Author

Yeah, thanks @andrewtavis for notifying. This PR is ready for review. thanks!

@angrezichatterbox
Copy link
Member

Could the size be increased a bit more. It was one of the constant suggestions that I received within the hackathon from a lot of people.

What do you think @andrewtavis

@andrewtavis
Copy link
Member

Let's go for something in the middle, or maybe a bit more reactive to the device size, as the image that @DeleMike sent along definitely made it look too big, but then when I was reviewing #471 the text size did look appropriate on a Pixel 9.

@DeleMike
Copy link
Collaborator Author

DeleMike commented Aug 11, 2025

definitely @andrewtavis. We need to make it reactive.

I did some research and then added the values-w720dp file. It seems there was a gap between 600dp and 1240dp. It may look better now for you. It still looks good on my real device. How's the keyboard like now?

@angrezichatterbox can you check too?

@DeleMike
Copy link
Collaborator Author

Hi all, I hope we are all good!

Has anyone had a chance to test this PR, please? 🙏🏾☺️

@angrezichatterbox
Copy link
Member

Screenshot 2025-08-13 at 8 54 35 PM

I felt the letter felt a little too small on Pixel 9

Sorry for the delay I was having a cold for the past few days.

@DeleMike
Copy link
Collaborator Author

Hi @angrezichatterbox , thanks for the update. I will look into it and revert.

I fell ill too, so I have not been able to contribute for a few days.

shrimpnaur and others added 3 commits August 17, 2025 06:38
)

* Fix translate button disappearing in SELECT_COMMAND mode

* fix:linting issues

* Remove extra blank line for lint compliance

* feat: highlight selected popup character when sliding over popup characters

* Fix: Adjusted KeyboardTest expectations for handleDelete

* Partial fix for instrumentation tests, remaining failures to be addressed

* chore:remove unneccesary tests

* fix:linting issues

* fix: command button text input behavior

* fix:linting issues

* fix: preserve command button listeners in SELECT_COMMAND mode

* fix: preserve command button listeners in SELECT_COMMAND mode

* fix: preserve command button listeners in SELECT_COMMAND mode

* chore:remove debug statements

---------

Co-authored-by: Gautham Mohanraj <[email protected]>
Co-authored-by: angrezichatterbox <[email protected]>
Co-authored-by: ashwinpraveengo <[email protected]>
* Update SelectLanguageScreen.kt

* Update SelectLanguageScreen.kt

Changes for Alphabetic order to view the lanuage

* Add spaces between language strings

* Order other instances of the settings page

---------

Co-authored-by: Andrew Tavis McAllister <[email protected]>
@angrezichatterbox
Copy link
Member

Hi @angrezichatterbox , thanks for the update. I will look into it and revert.

I fell ill too, so I have not been able to contribute for a few days.

No Worries. Hope you are doing better now

@DeleMike
Copy link
Collaborator Author

Hi @angrezichatterbox , thanks for the update. I will look into it and revert.
I fell ill too, so I have not been able to contribute for a few days.

No Worries. Hope you are doing better now

I am feeling much better. Thanks!


I have made some new updates. Can you please check them out when you are free? thanks! I think the default values/dimens.xml values were too small initially, so I fixed that and also bumped the values in the w600dp, w720dp, and w1240dp resource files to keep the progression smooth.

@angrezichatterbox
Copy link
Member

For some reason for the Pixel 9 values are still derived from the dimens.xml

@DeleMike
Copy link
Collaborator Author

Is it still small?

@angrezichatterbox
Copy link
Member

angrezichatterbox commented Aug 22, 2025

I suppose it is fine. We could merge this in.

@angrezichatterbox
Copy link
Member

I have increased the key size a bit. We can have an issue created for making it proper across sizes. It is to some extend good now.

Copy link
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decreased the text size just a bit as the capital M was getting quite close to the side of the key, but just by 1dp 😊 Thank you both so much for the hard work and collaboration here! Two more Next Release issues done! 🚀

@andrewtavis andrewtavis merged commit 3063b98 into scribe-org:main Aug 23, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plural word is not being recognized by the Keyboard Return already plural message to user when trying to execute the plural command on a plural word
5 participants