mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 05:52:47 +00:00
improve layout for gujarati, fixes #417
This commit is contained in:
parent
8601b841f2
commit
bf05980349
3 changed files with 31 additions and 33 deletions
|
@ -67,6 +67,7 @@ class LocaleKeyTexts(dataStream: InputStream?, locale: Locale) {
|
|||
val colonSpaceRegex = ":\\s+".toRegex()
|
||||
reader.forEachLine { l ->
|
||||
val line = l.trim()
|
||||
if (line.isEmpty()) return@forEachLine
|
||||
when (line) {
|
||||
"[morekeys]" -> { mode = READER_MODE_MORE_KEYS; return@forEachLine }
|
||||
"[extra_keys]" -> { mode = READER_MODE_EXTRA_KEYS; return@forEachLine }
|
||||
|
@ -284,7 +285,7 @@ private fun getCurrencyKey(locale: Locale): Pair<String, Array<String>> {
|
|||
return genericCurrencyKey(getCurrency(locale))
|
||||
if (locale.country != "IN" && locale.language == "ta")
|
||||
return genericCurrencyKey("௹")
|
||||
if (locale.country == "IN" || locale.language.matches("hi|kn|ml|mr|ta|te".toRegex()))
|
||||
if (locale.country == "IN" || locale.language.matches("hi|kn|ml|mr|ta|te|gu".toRegex()))
|
||||
return rupee
|
||||
if (locale.country == "GB")
|
||||
return pound
|
||||
|
|
|
@ -102,7 +102,7 @@ public final class PreferencesSettingsFragment extends SubScreenFragment {
|
|||
final Preference pref = findPreference(Settings.PREF_LOCALIZED_NUMBER_ROW);
|
||||
if (pref == null) return;
|
||||
// locales that have a number row defined (not good to have it hardcoded, but reading a bunch of files may be noticeably slow)
|
||||
final String[] numberRowLocales = new String[] { "ar", "bn", "fa", "hi", "mr", "ne", "ur" };
|
||||
final String[] numberRowLocales = new String[] { "ar", "bn", "fa", "gu", "hi", "mr", "ne", "ur" };
|
||||
for (final InputMethodSubtype subtype : SubtypeSettingsKt.getEnabledSubtypes(getSharedPreferences(), true)) {
|
||||
if (ArraysKt.any(numberRowLocales, (l) -> l.equals(subtype.getLocale().substring(0, 2)))) {
|
||||
pref.setVisible(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue