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

Swedish language support #219

Closed
wants to merge 9 commits into from
Closed

Conversation

KaniJonas
Copy link
Contributor

Support for Swedish language

@@ -271,6 +274,11 @@ protected boolean onRight(boolean repeat) {
protected boolean onNumber(int key, boolean hold, int repeat) {
String currentWord = getComposingText();

if(mInputMode.isABC()) {
Copy link
Owner

Choose a reason for hiding this comment

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

Perhaps, this would be a better alternative?

Suggested change
if(mInputMode.isABC()) {
if (delayHandler.hasCallbacks(delayAction)) {

@@ -117,7 +117,7 @@ private void generateList() {

addIfDeviceHasKey(KeyEvent.KEYCODE_BACK, R.string.key_back, false);
addIfDeviceHasKey(KeyEvent.KEYCODE_CLEAR, R.string.key_clear, false);
addIfDeviceHasKey(KeyEvent.KEYCODE_DEL, R.string.key_delete, false);
add(KeyEvent.KEYCODE_DEL, R.string.key_delete, false);
Copy link
Owner

Choose a reason for hiding this comment

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

@KaniJonas, I am not so keen on on merging this "temporary fix". It will make the option appear on phones that don't have the key.

Would it be possible for you to find another solution? I would even agree modifying addIfDeviceHasKey() to detect the Kyocera using Build.MODEL, Build.MANUFACTURER or some other method, and always returning true for that key. But whatever you choose, please, let's do it in a separate pull request.

@sspanak sspanak added enhancement New feature or request languages Dictionary or language related issues labels Mar 20, 2023
@@ -271,6 +274,11 @@ protected boolean onRight(boolean repeat) {
protected boolean onNumber(int key, boolean hold, int repeat) {
String currentWord = getComposingText();

if(mInputMode.isABC()) {
delayHandler.removeCallbacks(delayAction);
delayHandler.postDelayed(delayAction, 800);
Copy link
Owner

Choose a reason for hiding this comment

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

Let's make this an on/off setting under Keyboard -> ABC Mode. Personally, I find it confusing when the keyboards auto-accept letters or words, so I would like to keep it turned off.

Copy link
Contributor Author

@KaniJonas KaniJonas Mar 21, 2023

Choose a reason for hiding this comment

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

Hello, I will have to apologize, I am quite new to GitHub and didn't realize these changes would get included in the pull request for the Swedish language.

My intention was to only use the changes for Traditional T9 and Hotkeys in my own fork. Possibly contributing with the delay function later on with on/off option and adjustable delay.

Copy link
Owner

@sspanak sspanak Mar 21, 2023

Choose a reason for hiding this comment

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

But I do want to include this feature for other people to use it. It's nice that you shared it. 🙂

You almost got it perfect, it's just missing the toggle switch. If you don't mind, I can add the setting in your branch, when I get free time in the following days.

After a more careful review, I think it needs a bit more work, but it is a good start and I can include most of the code later.

Copy link
Contributor Author

@KaniJonas KaniJonas Mar 21, 2023

Choose a reason for hiding this comment

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

Thanks, that sounds wonderful if you have the time! :) If you don't, I can probably figure most of it out myself when I get the chance.
I can't in words tell you how much I love this app and all the time you put down. I've been suffering with Nokia's buggy horrible T9 for years.

This was unlinked from issues Mar 21, 2023
@sspanak sspanak mentioned this pull request Mar 21, 2023
@sspanak sspanak removed a link to an issue Mar 21, 2023
@sspanak
Copy link
Owner

sspanak commented Mar 21, 2023

I have extracted only the code related to Swedish language in #223 and merged it. I will now close this PR, because it has become obsolete.

Feel free to open a new one only for the ABC auto accept feature or the fix for Kyocera.

@sspanak sspanak closed this Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request languages Dictionary or language related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants