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

Virtual keyboard: Scandinavian layouts (Norwegian, Swedish & Danish) #11365

Merged
merged 6 commits into from Jan 16, 2024
Merged

Virtual keyboard: Scandinavian layouts (Norwegian, Swedish & Danish) #11365

merged 6 commits into from Jan 16, 2024

Conversation

cookiebit
Copy link
Contributor

@cookiebit cookiebit commented Jan 15, 2024

Added Norwegian keyboard layout with the "æ", "ø", and "å" keys with some extra symbols for layer 3 and 4 (bullet points, arrows, checkmarks).

I also changed the language name for nb_NO from "Norsk" to "Norsk bokmål", since there are two written standards for the Norwegian language (bokmål and nynorsk), while there is only one Norwegian keyboard layout. This means that the UI and dictionaries could be in either "Norsk bokmål" or "Norsk nynorsk", but it makes no sense to call the keyboard layout anything besides "Norsk" ("Norwegian").

letters

symbols


This change is Reviewable

@Frenzie Frenzie added the i18n label Jan 15, 2024
@Frenzie Frenzie added this to the 2024.02 milestone Jan 15, 2024
@Frenzie
Copy link
Member

Frenzie commented Jan 15, 2024

Very nice!

I also changed the language name for nb_NO from "Norsk" to "Norsk bokmål", since there are two written standards for the Norwegian language (bokmål and nynorsk), while there is only one Norwegian keyboard layout. This means that the UI and dictionaries could be in either "Norsk bokmål" or "Norsk nynorsk", but it makes no sense to call the keyboard layout anything besides "Norsk" ("Norwegian").

Note that this does have the disadvantage that it won't be automatically selected when switching languages. There's currently no mechanism in place for anything other than a one to one relationship.

@cookiebit
Copy link
Contributor Author

Note that this does have the disadvantage that it won't be automatically selected when switching languages. There's currently no mechanism in place for anything other than a one to one relationship.

I see, I was not aware of that, so thanks for the info! Then I guess I'll change it so that the keyboard layout is tied to nb_NO instead of no, so that the keyboard layout is selected if the interface language is selected. This shouldn't be problematic or unintuitive as long as there is no "Norsk Nynorsk" translation for the interface yet anyway, and the majority of norwegians use the Bokmål standard. If/when there is a Nynorsk translation in place down the line, it's also possible to tie that to the same keyboard layout (even though the keyboard layout would have a "duplicate" entry in the layout list, which is suboptimal).

@Frenzie
Copy link
Member

Frenzie commented Jan 16, 2024

Then I guess I'll change it so that the keyboard layout is tied to nb_NO instead of no, so that the keyboard layout is selected if the interface language is selected.

Yes, I think that's best in the short term.

@cookiebit
Copy link
Contributor Author

cookiebit commented Jan 16, 2024

Yes, I think that's best in the short term.

Agreed. I'll consider adding Swedish and Danish keyboard layouts as well when doing that change, since those are quite similar to the Norwegian one, and should therefore be relatively easy to implement.

@cookiebit cookiebit marked this pull request as draft January 16, 2024 13:25
@cookiebit cookiebit changed the title Added norwegian keyboard layout and changed language name Virtual keyboard: Norwegian layout Jan 16, 2024
Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

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

Still draft on purpose?

@cookiebit cookiebit changed the title Virtual keyboard: Norwegian layout Virtual keyboard: Scandinavian layouts (Norwegian, Swedish & Danish) Jan 16, 2024
@cookiebit
Copy link
Contributor Author

cookiebit commented Jan 16, 2024

Still draft on purpose?

It was, I was working on adding Swedish and Danish layouts as well, and wanted to include them too.

I'm fairly new to this, but it should be ready now. Think there's a couple of commits that could be omitted (sync), but I'm not sure if possible, or how.

@cookiebit cookiebit marked this pull request as ready for review January 16, 2024 17:11
@Frenzie
Copy link
Member

Frenzie commented Jan 16, 2024

git rebase -i followed by force push, but don't worry about it, I'll just squash them.

@cookiebit
Copy link
Contributor Author

cookiebit commented Jan 16, 2024

git rebase -i followed by force push, but don't worry about it, I'll just squash them.

That seems to do the trick, yes. Thanks! I think I'll not push it now though, since I don't know how or if that will affect the PR in any way in it's current state. The end result should be the same, just with a cleaner history.

@Frenzie
Copy link
Member

Frenzie commented Jan 16, 2024

I also recently learned about git commit --fixup <SHA of commit to be fixed up> from @wfdewith, which will automatically be squashed together during rebase. But not on GitHub! Only locally.

@Frenzie Frenzie merged commit e3b4cbe into koreader:master Jan 16, 2024
3 checks passed
@cookiebit cookiebit deleted the norwegian-keyboard branch January 17, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants