Skip to content

Instantly share code, notes, and snippets.

@azder
Last active September 6, 2018 10:44
Show Gist options
  • Save azder/52d63717a1b7312661bc265b8d4d582c to your computer and use it in GitHub Desktop.
Save azder/52d63717a1b7312661bc265b8d4d582c to your computer and use it in GitHub Desktop.
mk-transliteration
extensions.tocyrillic.layouts.macedonianutf8.description = Macedonian – UTF8 (Џ = Dž)
extensions.tocyrillic.layouts.macedonianutf8 = [["gj","ѓ"],["è","Ѐ"],["`e","Ѐ"],["e'","Ѐ"],["e`","Ѐ"],["ž","Ж"],["zh","Ж"],["zj","Ж"],["dz","ѕ"],["ì","Ѝ"],["`i","Ѝ"],["i'","Ѝ"],["i`","Ѝ"],["lj","Љ"],["ly","Љ"],["nj","Њ"],["ny","Њ"],["ć","ќ"],["kj","ќ"],["ky","ќ"],["ќ","Ќ"],["č","Ч"],["ch","Ч"],["cj","Ч"],["dž","Џ"],["dzh","Џ"],["dzj","Џ"],["š","Ш"],["sh","Ш"],["sj","Ш"],["a","А"],["b","Б"],["v","В"],["g","Г"],["d","Д"],["e","Е"],["z","З"],["i","И"],["j","Ј"],["k","К"],["l","Л"],["m","М"],["n","Н"],["o","О"],["p","П"],["r","Р"],["s","С"],["t","Т"],["u","У"],["f","Ф"],["h","Х"],["c","Ц"]]
extensions.tocyrillic.layouts.macedonianlatin1.description = Macedonian – Latin 1 (Џ = Dzh)
extensions.tocyrillic.layouts.macedonianlatin1 = [["gj","ѓ"],["e'","Ѐ"],["`e","Ѐ"],["e`","Ѐ"],["è","Ѐ"],["zh","Ж"],["zj","Ж"],["ž","Ж"],["dz","ѕ"],["i'","Ѝ"],["`i","Ѝ"],["i`","Ѝ"],["ì","Ѝ"],["lj","Љ"],["ly","Љ"],["nj","Њ"],["ny","Њ"],["kj","ќ"],["ky","ќ"],["ќ","Ќ"],["ć","ќ"],["ch","Ч"],["cj","Ч"],["č","Ч"],["dzh","Џ"],["dzj","Џ"],["dž","Џ"],["sh","Ш"],["sj","Ш"],["š","Ш"],["a","А"],["b","Б"],["v","В"],["g","Г"],["d","Д"],["e","Е"],["z","З"],["i","И"],["j","Ј"],["k","К"],["l","Л"],["m","М"],["n","Н"],["o","О"],["p","П"],["r","Р"],["s","С"],["t","Т"],["u","У"],["f","Ф"],["h","Х"],["c","Ц"]]
extensions.tocyrillic.layouts.macedonianlatin2.description = Macedonian – Latin 2 (Џ = Dzj)
extensions.tocyrillic.layouts.macedonianlatin2 = [["gj","ѓ"],["e'","Ѐ"],["`e","Ѐ"],["e`","Ѐ"],["è","Ѐ"],["zj","Ж"],["zh","Ж"],["ž","Ж"],["dz","ѕ"],["i'","Ѝ"],["`i","Ѝ"],["i`","Ѝ"],["ì","Ѝ"],["lj","Љ"],["ly","Љ"],["nj","Њ"],["ny","Њ"],["kj","ќ"],["ky","ќ"],["ќ","Ќ"],["ć","ќ"],["cj","Ч"],["ch","Ч"],["č","Ч"],["dzj","Џ"],["dzh","Џ"],["dž","Џ"],["sj","Ш"],["sh","Ш"],["š","Ш"],["a","А"],["b","Б"],["v","В"],["g","Г"],["d","Д"],["e","Е"],["z","З"],["i","И"],["j","Ј"],["k","К"],["l","Л"],["m","М"],["n","Н"],["o","О"],["p","П"],["r","Р"],["s","С"],["t","Т"],["u","У"],["f","Ф"],["h","Х"],["c","Ц"]]

Hi.

I read your letter and made some changes to the Macedonian layouts. I wanted to preserve the grave e and i UTF8 letters so I send them to you in an ms word document.

I checked the previous three layouts and included all their string pairs in all the new ones, so they will all do the same work when the toCyrillic command is invoked.

The difference in all three is with the using of the toTranslit command. The UTF8 version is the best in keeping correct round-trip conversion of all the 31 normal letters plus the two grave letters. The Latin 1 version is mostly used when only latin script is availible/possible. As for the Latin 2 version, I put it in because it was there already, despite the fact that to date I have not seen it in use. The difference between Latin 1 and Latin 2 are only four letters Zh, Ch, Dzh, Sh in Latin 1 with Zj, Cj, Dzj, Sj in Latin 2.

There is however another version which uses doubling of a same letter, but it's not wideley used and it could present problems when transliteraitng because of the nature of the macedonian language of doubling some letters. So I didn't use it.

I also put a little sample of the letter Dž, Dzh, Dzj in the descriptions so the layouts could be easily differentiable when selecting.

In short:

  • The old Macedonian layouts should be removed and replaced with the new ones;
  • The UTF8 layout is the best when UTF8 is availible;
  • The Latin 1 is ASCII friendly, this makes it best for when only latin is available, still the most common situation;
  • The Latin 2 could be removed but it should stay in for the users who prefer it;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment