mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-06-05 21:49:26 +02:00
Add Bulgarian language support
This commit is contained in:
@@ -2,6 +2,7 @@ package com.simplemobiletools.keyboard.activities
|
|||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import androidx.core.content.ContextCompat.startActivity
|
||||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.NavigationIcon
|
import com.simplemobiletools.commons.helpers.NavigationIcon
|
||||||
@@ -114,7 +115,8 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
RadioItem(LANGUAGE_ROMANIAN, getKeyboardLanguageText(LANGUAGE_ROMANIAN)),
|
RadioItem(LANGUAGE_ROMANIAN, getKeyboardLanguageText(LANGUAGE_ROMANIAN)),
|
||||||
RadioItem(LANGUAGE_RUSSIAN, getKeyboardLanguageText(LANGUAGE_RUSSIAN)),
|
RadioItem(LANGUAGE_RUSSIAN, getKeyboardLanguageText(LANGUAGE_RUSSIAN)),
|
||||||
RadioItem(LANGUAGE_SLOVENIAN, getKeyboardLanguageText(LANGUAGE_SLOVENIAN)),
|
RadioItem(LANGUAGE_SLOVENIAN, getKeyboardLanguageText(LANGUAGE_SLOVENIAN)),
|
||||||
RadioItem(LANGUAGE_SPANISH, getKeyboardLanguageText(LANGUAGE_SPANISH))
|
RadioItem(LANGUAGE_SPANISH, getKeyboardLanguageText(LANGUAGE_SPANISH)),
|
||||||
|
RadioItem(LANGUAGE_BULGARIAN, getKeyboardLanguageText(LANGUAGE_BULGARIAN)),
|
||||||
)
|
)
|
||||||
|
|
||||||
RadioGroupDialog(this@SettingsActivity, items, config.keyboardLanguage) {
|
RadioGroupDialog(this@SettingsActivity, items, config.keyboardLanguage) {
|
||||||
@@ -134,6 +136,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
LANGUAGE_SPANISH -> getString(R.string.translation_spanish)
|
LANGUAGE_SPANISH -> getString(R.string.translation_spanish)
|
||||||
LANGUAGE_SLOVENIAN -> getString(R.string.translation_slovenian)
|
LANGUAGE_SLOVENIAN -> getString(R.string.translation_slovenian)
|
||||||
LANGUAGE_ROMANIAN -> getString(R.string.translation_romanian)
|
LANGUAGE_ROMANIAN -> getString(R.string.translation_romanian)
|
||||||
|
LANGUAGE_BULGARIAN -> getString(R.string.translation_bulgarian)
|
||||||
else -> "${getString(R.string.translation_english)} (QWERTY)"
|
else -> "${getString(R.string.translation_english)} (QWERTY)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -26,6 +26,7 @@ const val LANGUAGE_GERMAN = 5
|
|||||||
const val LANGUAGE_ENGLISH_DVORAK = 6
|
const val LANGUAGE_ENGLISH_DVORAK = 6
|
||||||
const val LANGUAGE_ROMANIAN = 7
|
const val LANGUAGE_ROMANIAN = 7
|
||||||
const val LANGUAGE_SLOVENIAN = 8
|
const val LANGUAGE_SLOVENIAN = 8
|
||||||
|
const val LANGUAGE_BULGARIAN = 9
|
||||||
|
|
||||||
|
|
||||||
const val EMOJI_SPEC_FILE_PATH = "media/emoji_spec.txt"
|
const val EMOJI_SPEC_FILE_PATH = "media/emoji_spec.txt"
|
||||||
|
@@ -257,6 +257,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
|
|||||||
LANGUAGE_GERMAN -> R.xml.keys_letters_german
|
LANGUAGE_GERMAN -> R.xml.keys_letters_german
|
||||||
LANGUAGE_SLOVENIAN -> R.xml.keys_letters_slovenian
|
LANGUAGE_SLOVENIAN -> R.xml.keys_letters_slovenian
|
||||||
LANGUAGE_ROMANIAN -> R.xml.keys_letters_romanian
|
LANGUAGE_ROMANIAN -> R.xml.keys_letters_romanian
|
||||||
|
LANGUAGE_BULGARIAN -> R.xml.keys_letters_bulgarian
|
||||||
else -> R.xml.keys_letters_english_qwerty
|
else -> R.xml.keys_letters_english_qwerty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
140
app/src/main/res/xml/keys_letters_bulgarian.xml
Normal file
140
app/src/main/res/xml/keys_letters_bulgarian.xml
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
<Row app:keyWidth="9.05%p">
|
||||||
|
<Key
|
||||||
|
app:keyEdgeFlags="left"
|
||||||
|
app:keyLabel="я"
|
||||||
|
app:popupCharacters="1"
|
||||||
|
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||||
|
app:topSmallNumber="1" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="в"
|
||||||
|
app:popupCharacters="2"
|
||||||
|
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||||
|
app:topSmallNumber="2" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="е"
|
||||||
|
app:popupCharacters="3"
|
||||||
|
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||||
|
app:topSmallNumber="3" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="р"
|
||||||
|
app:popupCharacters="4"
|
||||||
|
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||||
|
app:topSmallNumber="4" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="т"
|
||||||
|
app:popupCharacters="5"
|
||||||
|
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||||
|
app:topSmallNumber="5" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="ъ"
|
||||||
|
app:popupCharacters="6"
|
||||||
|
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||||
|
app:topSmallNumber="6" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="у"
|
||||||
|
app:popupCharacters="7"
|
||||||
|
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||||
|
app:topSmallNumber="7" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="и"
|
||||||
|
app:popupCharacters="8"
|
||||||
|
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||||
|
app:topSmallNumber="8" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="о"
|
||||||
|
app:popupCharacters="9"
|
||||||
|
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||||
|
app:topSmallNumber="9" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="п"
|
||||||
|
app:popupCharacters="0"
|
||||||
|
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||||
|
app:topSmallNumber="0" />
|
||||||
|
<Key
|
||||||
|
app:keyEdgeFlags="right"
|
||||||
|
app:keyLabel="ч" />
|
||||||
|
</Row>
|
||||||
|
<Row app:keyWidth="9.05%p">
|
||||||
|
<Key
|
||||||
|
app:keyEdgeFlags="left"
|
||||||
|
app:keyLabel="а" />
|
||||||
|
<Key app:keyLabel="с" />
|
||||||
|
<Key app:keyLabel="д" />
|
||||||
|
<Key app:keyLabel="ф" />
|
||||||
|
<Key app:keyLabel="г" />
|
||||||
|
<Key app:keyLabel="х" />
|
||||||
|
<Key app:keyLabel="й" />
|
||||||
|
<Key app:keyLabel="к" />
|
||||||
|
<Key app:keyLabel="л" />
|
||||||
|
<Key app:keyLabel="ш" />
|
||||||
|
<Key
|
||||||
|
app:keyEdgeFlags="right"
|
||||||
|
app:keyLabel="щ" />
|
||||||
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<Key
|
||||||
|
app:code="-1"
|
||||||
|
app:keyEdgeFlags="left"
|
||||||
|
app:keyIcon="@drawable/ic_caps_outline_vector"
|
||||||
|
app:keyWidth="14%p" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="з"
|
||||||
|
app:keyWidth="9%p" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="ь"
|
||||||
|
app:keyWidth="9%p" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="ц"
|
||||||
|
app:keyWidth="9%p" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="ж"
|
||||||
|
app:keyWidth="9%p" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="б"
|
||||||
|
app:keyWidth="9%p" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="н"
|
||||||
|
app:keyWidth="9%p" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="м"
|
||||||
|
app:keyWidth="9%p" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="ю"
|
||||||
|
app:keyWidth="9%p" />
|
||||||
|
<Key
|
||||||
|
app:code="-5"
|
||||||
|
app:isRepeatable="true"
|
||||||
|
app:keyEdgeFlags="right"
|
||||||
|
app:keyIcon="@drawable/ic_clear_vector"
|
||||||
|
app:keyWidth="14%p" />
|
||||||
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<Key
|
||||||
|
app:code="-2"
|
||||||
|
app:keyEdgeFlags="left"
|
||||||
|
app:keyLabel="123"
|
||||||
|
app:keyWidth="15%p" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel=","
|
||||||
|
app:keyWidth="10%p" />
|
||||||
|
<Key
|
||||||
|
app:code="-6"
|
||||||
|
app:keyEdgeFlags="left"
|
||||||
|
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
|
||||||
|
app:keyWidth="8%p" />
|
||||||
|
<Key
|
||||||
|
app:code="32"
|
||||||
|
app:isRepeatable="true"
|
||||||
|
app:keyWidth="40%p" />
|
||||||
|
<Key
|
||||||
|
app:keyLabel="."
|
||||||
|
app:keyWidth="10%p" />
|
||||||
|
<Key
|
||||||
|
app:code="-4"
|
||||||
|
app:keyEdgeFlags="right"
|
||||||
|
app:keyIcon="@drawable/ic_enter_vector"
|
||||||
|
app:keyWidth="15%p" />
|
||||||
|
</Row>
|
||||||
|
</Keyboard>
|
Reference in New Issue
Block a user