All files / mutxt-react/src/translit/schemes eo-xsystem.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                        2x                                
import type {TranslitScheme} from '../types';
 
/**
 * Esperanto x-system. Latin pass-through with six digraphs:
 *
 *   cx → ĉ    gx → ĝ    hx → ĥ    jx → ĵ    sx → ŝ    ux → ŭ
 *
 * All other Latin letters fall through unchanged. The matcher is
 * specifically suited to this convention because typing `c` buffers
 * pending the possible `cx`; if any other char follows, the buffered
 * `c` is committed literal and the next char is reprocessed.
 */
export const eoXsystem: TranslitScheme = {
  id: 'eo-xsystem',
  name: 'Esperanto (x-system)',
  short: 'EO',
  language: 'eo',
  script: 'Latn',
  kind: 'alphabet',
  rules: [
    {in: 'cx', out: 'ĉ'},
    {in: 'gx', out: 'ĝ'},
    {in: 'hx', out: 'ĥ'},
    {in: 'jx', out: 'ĵ'},
    {in: 'sx', out: 'ŝ'},
    {in: 'ux', out: 'ŭ'},
  ],
};