Skip to content

Commit

Permalink
fix: Update transletiration mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
0niel committed Sep 22, 2023
1 parent 20e68f2 commit e532b95
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const visibleCategoryNames = {
/// Транслитерирует название группы для использования в качестве названия
/// категории уведомлений.
String transletirateGroupName(String groupName) {
final transliteration = {
final mappings = {
'А': 'A',
'Б': 'B',
'В': 'V',
Expand All @@ -50,23 +50,23 @@ String transletirateGroupName(String groupName) {
'Т': 'T',
'У': 'U',
'Ф': 'F',
'Х': 'Kh',
'Х': 'H',
'Ц': 'Ts',
'Ч': 'Ch',
'Ш': 'Sh',
'Щ': 'Shch',
'Щ': 'Sch',
'Ъ': '',
'Ы': 'Y',
'Ь': '',
'Э': 'E',
'Ю': 'Yu',
'Я': 'Ya',
'Ю': 'Ju',
'Я': 'Ja',
};

return groupName
.split('-')
.map((word) =>
word.split('').map((char) => transliteration[char] ?? char).join(''))
word.split('').map((char) => mappings[char] ?? char).join(''))
.join('-');
}

Expand Down

0 comments on commit e532b95

Please sign in to comment.