Skip to content
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 language specific autocapitalization. Fixes #429 #484

Merged
merged 12 commits into from
Oct 14, 2023

Conversation

storvik
Copy link
Contributor

@storvik storvik commented Oct 12, 2023

I tried to tackle issue #429 by adding language specific autocapitalization. The idea is to put all language specific autocapitalization functions inside AutoCapitalize.kt. Each keyboard defines autocapitalization functions inside an array, which are passed through and run in serial.

ATM the only function is autocapitalizeI, but in the future this can be expanded. Expample would be autocapitalizeGermanNoun etc.

Seems to be working for me when switching between English and Norwegian!

@storvik
Copy link
Contributor Author

storvik commented Oct 13, 2023

@dessalines I have started refactoring keyboard layouts. How do you like the changes in f36cbea? I think renaming both files and keyboard titles will make it easier to maintain and discover layouts in the future. However, if you not like the changes we don't need to do this.

Should every layout and title have a version number? Or should we just omit version number wherever only one version exist? I'm not sure why there are version numbers?

Copy link
Owner

@dessalines dessalines left a comment

Choose a reason for hiding this comment

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

Changing the keyboard names is probably fine, as long as their db index stays the same. Prefixing by language code is fine too.

My original idea with versioning, is that someone might prefer older versions of keyboards... So I spose you can get rid of any version titling for keyboards that don't have multiple versions in the code, which I think none do.

@dessalines dessalines marked this pull request as draft October 13, 2023 17:48
@storvik
Copy link
Contributor Author

storvik commented Oct 13, 2023

I have refactored it, and it was a lot of work! Went through every layout, converted it to use the class and changed all names.

Please review it! Hopefully I wont have to go through every layout again 😆

@storvik storvik marked this pull request as ready for review October 13, 2023 23:00
@storvik
Copy link
Contributor Author

storvik commented Oct 14, 2023

Seems like commit 3244032 in main broke key borders. I now have to set it to 10 just to get it to display border. Don't think i screwed up when merging.

Edit: Tested main and issue seems to persist.

@dessalines
Copy link
Owner

That's got nothing to do with your PR then, I'll open a separate issue.

Copy link
Owner

@dessalines dessalines left a comment

Choose a reason for hiding this comment

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

I tested and it works great. Thanks a ton for doing all this work!

@dessalines dessalines merged commit 8c06dea into dessalines:main Oct 14, 2023
1 check passed
@Terrance Terrance mentioned this pull request Oct 16, 2023
@storvik storvik deleted the feature-autocapitalize branch October 24, 2023 06:55
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.

None yet

2 participants