All files / mutxt-react/src/translit/schemes bg-translit.ts

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58                    2x                                                                                              
import type {TranslitScheme} from '../types';
 
/**
 * Bulgarian translit. Russian rules minus ё / ы / э, with Bulgarian's
 * `sht → щ` digraph (Bulgarian щ is pronounced "sht").
 *
 *   a→а  b→б  v→в  g→г  d→д  e→е  zh→ж  z→з  i→и  y→й
 *   k→к  l→л  m→м  n→н  o→о  p→п  r→р  s→с  t→т  u→у
 *   f→ф  h→х  c→ц  ch→ч  sh→ш  sht→щ  '→ь  ''→ъ  yu→ю  ya→я
 */
export const bgTranslit: TranslitScheme = {
  id: 'bg-translit',
  name: 'Bulgarian (translit)',
  short: 'BG',
  language: 'bg',
  script: 'Cyrl',
  kind: 'alphabet',
  rules: [
    // Trigraphs.
    {in: 'sht', out: 'щ'},
 
    // Digraphs.
    {in: 'sh', out: 'ш'},
    {in: 'ch', out: 'ч'},
    {in: 'zh', out: 'ж'},
    {in: 'yu', out: 'ю'},
    {in: 'ya', out: 'я'},
    {in: "''", out: 'ъ'},
 
    // Soft sign.
    {in: "'", out: 'ь', caseFold: false},
 
    // Single chars.
    {in: 'a', out: 'а'},
    {in: 'b', out: 'б'},
    {in: 'v', out: 'в'},
    {in: 'g', out: 'г'},
    {in: 'd', out: 'д'},
    {in: 'e', out: 'е'},
    {in: 'z', out: 'з'},
    {in: 'i', out: 'и'},
    {in: 'y', out: 'й'},
    {in: 'k', out: 'к'},
    {in: 'l', out: 'л'},
    {in: 'm', out: 'м'},
    {in: 'n', out: 'н'},
    {in: 'o', out: 'о'},
    {in: 'p', out: 'п'},
    {in: 'r', out: 'р'},
    {in: 's', out: 'с'},
    {in: 't', out: 'т'},
    {in: 'u', out: 'у'},
    {in: 'f', out: 'ф'},
    {in: 'h', out: 'х'},
    {in: 'c', out: 'ц'},
  ],
};