All files / mutxt-react/src/translit/schemes el-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                    2x                                                                                    
import type {TranslitScheme} from '../types';
 
/**
 * Greek (monotonic) translit. Uses common ASCII conventions; final-sigma
 * (σ → ς) handled via `finalForms`.
 *
 *   a→α  b→β  g→γ  d→δ  e→ε  z→ζ  h→η  th→θ  i→ι  k→κ
 *   l→λ  m→μ  n→ν  x→ξ  o→ο  p→π  r→ρ  s→σ  t→τ  u→υ  y→υ
 *   f→φ  ph→φ  ch→χ  ps→ψ  w→ω
 */
export const elTranslit: TranslitScheme = {
  id: 'el-translit',
  name: 'Greek (translit)',
  short: 'EL',
  language: 'el',
  script: 'Grek',
  kind: 'alphabet',
  rules: [
    // Digraphs.
    {in: 'th', out: 'θ'},
    {in: 'ph', out: 'φ'},
    {in: 'ch', out: 'χ'},
    {in: 'ps', out: 'ψ'},
 
    // Single chars.
    {in: 'a', out: 'α'},
    {in: 'b', out: 'β'},
    {in: 'g', out: 'γ'},
    {in: 'd', out: 'δ'},
    {in: 'e', out: 'ε'},
    {in: 'z', out: 'ζ'},
    {in: 'h', out: 'η'},
    {in: 'i', out: 'ι'},
    {in: 'k', out: 'κ'},
    {in: 'l', out: 'λ'},
    {in: 'm', out: 'μ'},
    {in: 'n', out: 'ν'},
    {in: 'x', out: 'ξ'},
    {in: 'o', out: 'ο'},
    {in: 'p', out: 'π'},
    {in: 'r', out: 'ρ'},
    {in: 's', out: 'σ'},
    {in: 't', out: 'τ'},
    {in: 'u', out: 'υ'},
    {in: 'y', out: 'υ'},
    {in: 'f', out: 'φ'},
    {in: 'w', out: 'ω'},
  ],
  finalForms: {
    σ: 'ς',
  },
};