-
-
Notifications
You must be signed in to change notification settings - Fork 26
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 Belarusan Cyrillic and Latin layouts #70
Conversation
Created a Belarusan Cyrillic layout
Added LANGUAGE_BELARUSIAN_CYRL -> getString(R.string.translation_belarusian)
Added strings for Belarusan Cyrillic layout
Added string for Belarusan Cyrillic layout
Update Context.kt
Update Constants.kt
Update SimpleKeyboardIME.kt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing, it's really helpful when native/advanced speakers can provide us more keyboard layouts, even if they're not familiar with Android development.
I've added a few comments, because right now the app doesn't compile, but fixes are simple ones. Also, I have two additional questions:
- In the original issue, you wrote that it's only Cyrillic layout for now. I'm not Belarusian speaker, but doesn't it only have Cyrillic alphabet? I mean, even if Belarusian native would like to write Latin characters, wouldn't English keyboard be enough? Just asking to make sure, whether it's really needed. For other languages with Cyrillic alphabet (like Russian or Ukrainian) we don't have a separate version.
- Here's how the layout looks like. Please check if it's how you wanted it to look:
@@ -207,6 +207,7 @@ fun Context.getKeyboardLanguagesRadioItems(): ArrayList<RadioItem> { | |||
fun Context.getKeyboardLanguageText(language: Int): String { | |||
return when (language) { | |||
LANGUAGE_ARABIC -> getString(R.string.translation_arabic) | |||
LANGUAGE_BELARUSIAN_CYRL -> getString(R.string.translation_belarusian) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This string doesn't exist. You should add it in Commons in https://github.com/FossifyOrg/Commons/blob/master/commons/src/main/res/values/strings.xml. When creating a pull request in Commons, please mention that it's for this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: FossifyOrg/Commons#60
Thank you for your instructions!
@@ -439,6 +439,7 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared | |||
private fun getKeyboardLayoutXML(): Int { | |||
return when (baseContext.config.keyboardLanguage) { | |||
LANGUAGE_ARABIC -> R.xml.keys_letters_arabic | |||
LANGUAGE_BELARUSIAN_CYRL -> R.xml.keys_belarusian_cyrl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LANGUAGE_BELARUSIAN_CYRL -> R.xml.keys_belarusian_cyrl | |
LANGUAGE_BELARUSIAN_CYRL -> R.xml.keys_letters_belarusian_cyrl |
Thank you very much! The Belarusan language has two equivalent scripts: Cyrillic and Latin. Unlike Ukrainian and Russian, which use only Cyrillic, the Serbian language, for example, also has both scripts. Here is a bit more about Belarusan Latin: https://en.wikipedia.org/wiki/Belarusian_Latin_alphabet. Many Belarusans use the Latin script today (I won't go into details). However, the English keyboard layout contains many symbols that can interfere with convenient writing in Belarusan Latin, and it lacks certain essential symbols, such as ŭ. In my opinion, a dedicated Latin layout would be a wonderful option for Belarusans. ———— Yes, the layout looks correct, but it would be better if it were more balanced. Is there any way to achieve what is shown in my image? (Please look at the bottom row with the letters) upd: I tried changing the width of the Shift and Backspace keys to 14%, but I'm not sure how it looks (the image below was made in a graphics editor as an example). |
Changed the width of the two keys
Thanks for explaining! If so, it makes sense to have two separate keyboard layouts.
Now it looks like this: |
No need for a separate PR, you can add it here 🙂 |
Add a string for Belarusan Latin script and fixed for Cyrillic
Added two strings for Belarusan Latin script
Added a string for Belarusan Latin script and fixed for Cyrillic
Thank you for the answer! It's done. I hope I did everything right 😬 |
@Belarusan For the Latin layout, wouldn't adding dedicated keys for the letters Ć Č Ł Ń Ś Š Ŭ Ź Ž be better? I have made a layout with dedicated keys in my keyboard. |
Thank you for sharing. I didn't want to create anything new, so I focused on existing options. I added the symbols Ć, Č, Ł, Ń, Ś, Š, Ŭ, Ź, Ž, etc., to the popup. By the way, this approach is also used in Polish. |
It does not need to be new, the letters can just be added above the existing layout. So something like this:
|
Thank you, I understand your point. However, layouts are not just a random set of letters; they need to be systematic. For instance, the currently popular Cyrillic Belarusan layout „йцукен“ isn't actually a systematic one — it's simply a modified version of the Russian layout. That being said, I didn't want to take it upon myself to create something entirely new. This task should involve linguists, designers, and the wider community, not just me. |
I tried to learn this language but I failed, miserably. I hope this works alright ;) |
Thank you for your support! I'm happy to say that the layout works well. However, I noticed a problem with the Cyrillic layout popups due to my oversight. I’ve fixed it and submitted a Pull Request. I also made a small change to the Latin layout. It's quite an impressive challenge to learn Belarusan! Unfortunately, there are not many good resources available for learning Belarusan as a foreign language. I hope that in the future, if you still have the desire to learn, better materials will become available. |
Created a Belarusan Cyrillic layout
What is it?
Description of the changes in your PR
Fixes the following issue(s)
Acknowledgement