1
0
Fork 0
* Serbian language: dictionary + icons

* updated icon generation script
This commit is contained in:
Dimo Karaivanov 2025-07-01 12:12:28 +03:00 committed by sspanak
parent d2e09195d6
commit b114370e91
11 changed files with 1502349 additions and 3 deletions

View file

@ -0,0 +1,15 @@
locale: sr-RS
dictionaryFile: sr-utf8.csv
iconABC: ic_lang_cyrillic
iconT9: ic_lang_sr
layout:
- [SPECIAL] # 0
- [PUNCTUATION_DE] # 1
- [а, б, в, г] # 2
- [д, ђ, џ, е, ж, з] # 3
- [и, ј, к, л, љ] # 4
- [м, н, њ, о, п] # 5
- [р, с, т, у] # 6
- [ф, х, ц, ч, ћ] # 7
- [ш] # 8
- [] # 9 no letters

File diff suppressed because it is too large Load diff

View file

@ -41,6 +41,7 @@ class LocaleCompat {
return switch (language) {
case "ar" -> "ع";
case "bg" -> "бг";
case "ca", "ga", "sw" -> language;
case "en" -> "in".equals(country) ? "hn" : language; // en-IN = Hinglish
case "fa" -> "ف";
case "fi" -> "su";
@ -53,11 +54,11 @@ class LocaleCompat {
case "ja" -> "";
case "ko" -> "";
case "ru" -> "ру";
case "sr" -> "rs".equals(country) ? "ср" : language;
case "th" -> "ไท";
case "uk" -> "ук";
case "zgh" -> "dz".equals(country) ? "tm" : "ⵜⵎ";
case "zh" -> "cn".equals(country) ? "" : language;
case "ca", "ga", "sw" -> language;
default -> country;
};
}

File diff suppressed because one or more lines are too long

View file

@ -129,7 +129,7 @@ public class SoftKeyNumber2to9 extends SoftKeyNumber {
// used to seeing just "ABC", "DEF", etc.
(isLatinBased && currentLetter > 'z')
// Cyrillic. Same as above.
|| currentLetter == 'ѝ' || currentLetter == 'ґ'
|| currentLetter == 'ѝ' || currentLetter == 'ґ' || currentLetter == 'љ' || currentLetter == 'њ' || currentLetter == 'ћ'
// Korean double consonants
|| (currentLetter == 'ㄲ' || currentLetter == 'ㄸ' || currentLetter == 'ㅃ' || currentLetter == 'ㅆ' || currentLetter == 'ㅉ')
// Greek diacritics and ending sigma

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="16dp" android:viewportWidth="48" android:viewportHeight="32"><path android:fillColor="#FFFFFF" android:pathData="M13,4h8v1h-8z"/><path android:fillColor="#FFFFFF" android:pathData="M10,5h13v1h-13z"/><path android:fillColor="#FFFFFF" android:pathData="M9,6h14v1h-14z"/><path android:fillColor="#FFFFFF" android:pathData="M8,7h15v1h-15z"/><path android:fillColor="#FFFFFF" android:pathData="M7,8h7v1h-7z"/><path android:fillColor="#FFFFFF" android:pathData="M20,8h2v1h-2z"/><path android:fillColor="#FFFFFF" android:pathData="M7,9h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M34,9h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M6,10h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M27,10h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M33,10h7v1h-7z"/><path android:fillColor="#FFFFFF" android:pathData="M6,11h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,11h14v1h-14z"/><path android:fillColor="#FFFFFF" android:pathData="M6,12h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,12h15v1h-15z"/><path android:fillColor="#FFFFFF" android:pathData="M6,13h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,13h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M36,13h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M6,14h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,14h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M37,14h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M6,15h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,15h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M38,15h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M6,16h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,16h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M38,16h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M6,17h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,17h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M38,17h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M6,18h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,18h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M38,18h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M6,19h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,19h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M38,19h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M6,20h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M27,20h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M38,20h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M7,21h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M27,21h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M37,21h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M7,22h7v1h-7z"/><path android:fillColor="#FFFFFF" android:pathData="M21,22h2v1h-2z"/><path android:fillColor="#FFFFFF" android:pathData="M27,22h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M37,22h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M8,23h15v1h-15z"/><path android:fillColor="#FFFFFF" android:pathData="M27,23h15v1h-15z"/><path android:fillColor="#FFFFFF" android:pathData="M9,24h14v1h-14z"/><path android:fillColor="#FFFFFF" android:pathData="M27,24h14v1h-14z"/><path android:fillColor="#FFFFFF" android:pathData="M10,25h13v1h-13z"/><path android:fillColor="#FFFFFF" android:pathData="M27,25h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M32,25h9v1h-9z"/><path android:fillColor="#FFFFFF" android:pathData="M12,26h10v1h-10z"/><path android:fillColor="#FFFFFF" android:pathData="M27,26h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M33,26h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M27,27h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M27,28h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M27,29h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M27,30h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M27,31h4v1h-4z"/></vector>

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="16dp" android:viewportWidth="48" android:viewportHeight="32"><path android:fillColor="#FFFFFF" android:pathData="M14,9h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M32,9h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M11,10h10v1h-10z"/><path android:fillColor="#FFFFFF" android:pathData="M25,10h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M31,10h7v1h-7z"/><path android:fillColor="#FFFFFF" android:pathData="M10,11h11v1h-11z"/><path android:fillColor="#FFFFFF" android:pathData="M25,11h14v1h-14z"/><path android:fillColor="#FFFFFF" android:pathData="M9,12h12v1h-12z"/><path android:fillColor="#FFFFFF" android:pathData="M25,12h15v1h-15z"/><path android:fillColor="#FFFFFF" android:pathData="M8,13h7v1h-7z"/><path android:fillColor="#FFFFFF" android:pathData="M19,13h1v1h-1z"/><path android:fillColor="#FFFFFF" android:pathData="M25,13h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M34,13h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M8,14h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M25,14h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M35,14h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M8,15h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M25,15h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M36,15h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M7,16h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M25,16h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M36,16h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M7,17h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M25,17h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M36,17h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M7,18h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M25,18h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M36,18h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M7,19h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M25,19h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M36,19h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M8,20h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M25,20h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M36,20h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M8,21h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M25,21h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M35,21h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M8,22h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M25,22h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M35,22h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M8,23h13v1h-13z"/><path android:fillColor="#FFFFFF" android:pathData="M25,23h15v1h-15z"/><path android:fillColor="#FFFFFF" android:pathData="M9,24h12v1h-12z"/><path android:fillColor="#FFFFFF" android:pathData="M25,24h14v1h-14z"/><path android:fillColor="#FFFFFF" android:pathData="M10,25h11v1h-11z"/><path android:fillColor="#FFFFFF" android:pathData="M25,25h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M30,25h9v1h-9z"/><path android:fillColor="#FFFFFF" android:pathData="M12,26h9v1h-9z"/><path android:fillColor="#FFFFFF" android:pathData="M25,26h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M31,26h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M25,27h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M25,28h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M25,29h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M25,30h4v1h-4z"/><path android:fillColor="#FFFFFF" android:pathData="M25,31h4v1h-4z"/></vector>

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="16dp" android:viewportWidth="48" android:viewportHeight="32"><path android:fillColor="#FFFFFF" android:pathData="M13,5h8v1h-8z"/><path android:fillColor="#FFFFFF" android:pathData="M27,5h10v1h-10z"/><path android:fillColor="#FFFFFF" android:pathData="M10,6h13v1h-13z"/><path android:fillColor="#FFFFFF" android:pathData="M27,6h13v1h-13z"/><path android:fillColor="#FFFFFF" android:pathData="M9,7h14v1h-14z"/><path android:fillColor="#FFFFFF" android:pathData="M27,7h14v1h-14z"/><path android:fillColor="#FFFFFF" android:pathData="M8,8h15v1h-15z"/><path android:fillColor="#FFFFFF" android:pathData="M27,8h15v1h-15z"/><path android:fillColor="#FFFFFF" android:pathData="M7,9h7v1h-7z"/><path android:fillColor="#FFFFFF" android:pathData="M20,9h2v1h-2z"/><path android:fillColor="#FFFFFF" android:pathData="M27,9h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M36,9h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M7,10h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M27,10h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M37,10h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M6,11h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M27,11h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M37,11h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M6,12h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,12h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M38,12h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M6,13h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,13h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M37,13h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M6,14h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,14h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M37,14h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M6,15h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,15h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M36,15h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M6,16h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,16h14v1h-14z"/><path android:fillColor="#FFFFFF" android:pathData="M6,17h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,17h14v1h-14z"/><path android:fillColor="#FFFFFF" android:pathData="M6,18h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,18h13v1h-13z"/><path android:fillColor="#FFFFFF" android:pathData="M6,19h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,19h11v1h-11z"/><path android:fillColor="#FFFFFF" android:pathData="M6,20h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M27,20h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M6,21h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M27,21h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M7,22h6v1h-6z"/><path android:fillColor="#FFFFFF" android:pathData="M27,22h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M7,23h7v1h-7z"/><path android:fillColor="#FFFFFF" android:pathData="M21,23h2v1h-2z"/><path android:fillColor="#FFFFFF" android:pathData="M27,23h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M8,24h15v1h-15z"/><path android:fillColor="#FFFFFF" android:pathData="M27,24h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M9,25h14v1h-14z"/><path android:fillColor="#FFFFFF" android:pathData="M27,25h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M10,26h13v1h-13z"/><path android:fillColor="#FFFFFF" android:pathData="M27,26h5v1h-5z"/><path android:fillColor="#FFFFFF" android:pathData="M12,27h10v1h-10z"/><path android:fillColor="#FFFFFF" android:pathData="M27,27h5v1h-5z"/></vector>

View file

@ -0,0 +1,21 @@
Serbian word list by: Jovan Turanjanin
Version: aa2d0308ee633d22b4b663d90507bf2747a6399c (2022-06-29)
Source: https://github.com/turanjanin/spisak-srpskih-reci
License: (CC0 1.0 Universal) https://github.com/turanjanin/spisak-srpskih-reci/blob/master/LICENSE.md
Serbian word frequencies by: CC-100
Version: 2020
Source: https://data.statmt.org/cc-100/
References (PDF links are available in the source URL):
- Unsupervised Cross-lingual Representation Learning at Scale, Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer, Veselin Stoyanov, Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL), p. 8440-8451, July 2020.
- CCNet: Extracting High Quality Monolingual Datasets from Web Crawl Data, Guillaume Wenzek, Marie-Anne Lachaux, Alexis Conneau, Vishrav Chaudhary, Francisco Guzmán, Armand Joulin, Edouard Grave, Proceedings of the 12th Language Resources and Evaluation Conference (LREC), p. 4003-4012, May 2020.
More Serbian word frequencies from The Leipzig Corpora Collection:
Source: https://wortschatz.uni-leipzig.de/en/download/Serbian
Version: Web/2016/1M, Wikipedia/2021/1M
License: https://creativecommons.org/licenses/by-nc/4.0/
Yet even more word frequencies obtained from LatinIME dictionaries:
Source: https://android.googlesource.com/platform/packages/inputmethods/LatinIME
Version: 66093bf509ea92fa31d796326d5f30a8d9582ffe (2023-12-21)
License: https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/refs/heads/main/NOTICE

BIN
downloads/sr-utf8.zip Normal file

Binary file not shown.

View file

@ -96,7 +96,9 @@ generate_all_cases "NotoSans-Bold.ttf" "pl" "pl" -0.08 -0.15 -0.15
generate_all_cases "NotoSans-Bold.ttf" "pt" "pt" -0.08 -0.15 -0.15
generate_all_cases "NotoSans-Bold.ttf" "ro" "ro" -0.15 -0.15 -0.15
generate_all_cases "NotoSans-Bold.ttf" "ру" "ru" -0.08 -0.08 -0.15
generate_all_cases "NotoSans-Bold.ttf" "sk" "sk" -0.15 -0.15 -0.15
generate_all_cases "NotoSans-Bold.ttf" "sl" "sl" -0.15 -0.15 -0.15
generate_all_cases "NotoSans-Bold.ttf" "ср" "sr" -0.08 -0.08 -0.15
generate_all_cases "NotoSans-Bold.ttf" "es" "es" -0.15 -0.15 -0.15
generate_all_cases "NotoSans-Bold.ttf" "sv" "sv" -0.15 -0.15 -0.15
generate_all_cases "NotoSans-Bold.ttf" "tm" "tm" -0.15 -0.15 -0.15