Module:Transliterator: Difference between revisions

From Linguifex
Jump to navigation Jump to search
(Testing.)
m (Reverted edits by Sware (talk) to last revision by Учхљёная)
Tag: Rollback
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
local p = {}
local p = {}
function p.main( frame )
function p.aurebeshlatn( frame )
local word = tonumber( frame.args[1] )
local word = frame.args[1]  
local images = {
local a = string.gsub( word, "a", "ឆ" )
["a"] = "[[File:Aurebesh-AE.svg|18px]]",
local aa = string.gsub( a, "á", "ឹ" )
["ā"] = "[[File:Aurebesh-A.svg|22px]]",
local b = string.gsub( aa, "b", "េ" )
["b"] = "[[File:Aurebesh-B.svg|21px]]",
local ch = string.gsub( b, "ch", "➽" )
["h"] = "[[File:Aurebesh-H.svg|21px]]",
local c = string.gsub( ch, "c", "⇇" )
["i"] = "[[File:Aurebesh-E.svg|20px]]",
local d = string.gsub( c, "d", "⥣" )
["ī"] = "[[File:Aurebesh-I.svg|8px]]",
local f = string.gsub( d, "f", "⬇︎" )
["j"] = "[[File:Aurebesh-J.svg|19px]]",
local ng = string.gsub( f, "ng", "⇲" )
["k"] = "[[File:Aurebesh-K.svg|20px]]",
local g = string.gsub( ng, "g", "↹" )
["l"] = "[[File:Aurebesh-L.svg|13px]]",
local kh = string.gsub( g, "kh", "↨" )
["m"] = "[[File:Aurebesh-M.svg|12px]]",
local sh = string.gsub( kh, "sh", "រ" )
["n"] = "[[File:Aurebesh-N.svg|21px]]",
local th = string.gsub( sh, "th", "⥺" )
["o"] = "[[File:Aurebesh-O.svg|19px]]",
local h = string.gsub( th, "h", "ត" )
["ō"] = "[[File:Aurebesh-EO.svg|21px]]",
local i = string.gsub( h, "i", "យ" )
["p"] = "[[File:Aurebesh-P.svg|13px]]",
local ii = string.gsub( i, "í", "ុ" )
["q"] = "[[File:Aurebesh-Q.svg|17px]]",
local j = string.gsub( ii, "j", "ិ" )
["r"] = "[[File:Aurebesh-R.svg|16px]]",
local k = string.gsub( j, "k", "ោ" )
["sh"] = "[[File:Aurebesh-SH.svg|24px]]",
local l = string.gsub( k, "l", "ផ" )
["t"] = "[[File:Aurebesh-T.svg|21px]]",
local m = string.gsub( l, "m", "ៀ" )
["u"] = "[[File:Aurebesh-U.svg|19px]]",
local n = string.gsub( m, "n", "ឪ" )
["x"] = "[[File:Aurebesh-X.svg|17px]]",
local o = string.gsub( n, "o", "ា" )
local oo = string.gsub( o, "ó", "ស" )
}
local p = string.gsub( oo, "p", "ដ" )
return word
local q = string.gsub( p, "q", "ថ" )
end
local r = string.gsub( q, "r", "ង" )
local s = string.gsub( r, "s", "Ӝ" )
local t = string.gsub( s, "t", "ហ" )
local u = string.gsub( t, "u", "្" )
local uu = string.gsub( u, "ú", "ᑓ" )
local v = string.gsub( uu, "v", "א" )
local w = string.gsub( v, "w", "ב" )
local x = string.gsub( w, "x", "ក" )
local y = string.gsub( x, "y", "ג" )
local z = string.gsub( y, "z", "ד" )
local dash = string.gsub( z, "-", "@" )
local aimg = string.gsub( dash, "ឆ", "[[File:Aurebesh-AE.svg|18px]]" )
local aaimg = string.gsub( aimg, "ឹ", "[[File:Aurebesh-A.svg|22px]]" )
local bimg = string.gsub( aaimg, "េ", "[[File:Aurebesh-B.svg|21px]]" )
local chimg = string.gsub( bimg, "➽", "[[File:Aurebesh-CH.svg|22px]]" )
local cimg = string.gsub( chimg, "⇇", "[[File:Aurebesh-C.svg|13px]]" )
local dimg = string.gsub( cimg, "⥣", "[[File:Aurebesh-D.svg|18px]]" )
local fimg = string.gsub( dimg, "⬇︎", "[[File:Aurebesh-F.svg|21px]]" )
local ngimg = string.gsub( fimg, "⇲", "[[File:Aurebesh-NG.svg|17px]]" )
local gimg = string.gsub( ngimg, "↹", "[[File:Aurebesh-G.svg|20px]]" )
local khimg = string.gsub( gimg, "↨", "[[File:Aurebesh-KH.svg|15px]]" )
local shimg = string.gsub( khimg, "រ", "[[File:Aurebesh-SH.svg|24px]]" )
local thimg = string.gsub( shimg, "⥺", "[[File:Aurebesh-TH.svg|19px]]" )
local himg = string.gsub( thimg, "ត", "[[File:Aurebesh-H.svg|21px]]")
local iimg = string.gsub( himg, "យ", "[[File:Aurebesh-E.svg|20px]]" )
local iiimg = string.gsub( iimg, "", "[[File:Aurebesh-I.svg|8px]]" )
local jimg = string.gsub( iiimg, "", "[[File:Aurebesh-J.svg|19px]]" )
local kimg = string.gsub( jimg, "", "[[File:Aurebesh-K.svg|20px]]" )
local limg = string.gsub( kimg, "", "[[File:Aurebesh-L.svg|13px]]" )
local mimg = string.gsub( limg, "", "[[File:Aurebesh-M.svg|12px]]" )
local nimg = string.gsub( mimg, "", "[[File:Aurebesh-N.svg|21px]]" )
local oimg = string.gsub( nimg, "", "[[File:Aurebesh-O.svg|19px]]" )
local ooimg = string.gsub( oimg, "", "[[File:Aurebesh-EO.svg|21px]]" )
local pimg = string.gsub( ooimg, "", "[[File:Aurebesh-P.svg|13px]]" )
local qimg = string.gsub( pimg, "", "[[File:Aurebesh-Q.svg|17px]]" )
local rimg = string.gsub( qimg, "", "[[File:Aurebesh-R.svg|16px]]" )
local simg = string.gsub( rimg, "Ӝ", "[[File:Aurebesh-S.svg|20px]]" )
local timg = string.gsub( simg, "ហ", "[[File:Aurebesh-T.svg|21px]]" )
local uimg = string.gsub( timg, "្", "[[File:Aurebesh-U.svg|19px]]" )
local uuimg = string.gsub( uimg, "ᑓ", "[[File:Aurebesh-OO.svg|13px]]" )
local vimg = string.gsub( uuimg, "א", "[[File:Aurebesh-V.svg|16px]]" )
local wimg = string.gsub( vimg, "ב", "[[File:Aurebesh-W.svg|21px]]" )
local ximg = string.gsub( wimg, "ក", "[[File:Aurebesh-X.svg|17px]]" )
local yimg = string.gsub( ximg, "ג", "[[File:Aurebesh-Y.svg|21px]]" )
local zimg = string.gsub( yimg, "ד", "[[File:Aurebesh-Z.svg|18px]]" )
local dshimg = string.gsub( zimg, "@", "[[File:Aurebesh--.svg|14px]]")
return dshimg
end
 
function p.aureaure( frame )
local word = frame.args[1]
end
 
function p.qdtcyrl( frame )
local word = frame.args[1]
local a = string.gsub( word, "а", "a" )
local aa = string.gsub( a, "А", "A" )
local b = string.gsub( aa, "б", "b" )
local bb = string.gsub( b, "Б", "B" )
local v = string.gsub( bb, "в", "v" )
local vv = string.gsub( v, "В", "V" )
local g = string.gsub( vv, "г", "g" )
local gg = string.gsub( g, "Г", "G" )
local d = string.gsub( gg, "д", "d" )
local dd = string.gsub( d, "Д", "D" )
local je = string.gsub( dd, "е", "ê" )
local jeje = string.gsub( je, "Е", "Ê" )
local jo = string.gsub( jeje, "ё", "ĕ" )
local jojo = string.gsub( jo, "Ё", "Ĕ" )
local zh = string.gsub( jojo, "ж", "ž" )
local zhzh = string.gsub( zh, "Ж", "Ž" )
end
 
function p.qrqcyrl( frame )
local word = frame.args[1]
local a = string.gsub( word, "а", "a" )
local aa = string.gsub( a, "А", "A" )
local b = string.gsub( aa, "б", "b" )
local bb = string.gsub( b, "Б", "B" )
local v = string.gsub( bb, "в", "v" )
local vv = string.gsub( v, "В", "V" )
local g = string.gsub( vv, "г", "g" )
local gg = string.gsub( g, "Г", "G" )
local d = string.gsub( gg, "д", "d" )
local dd = string.gsub( d, "Д", "D" )
local je = string.gsub( dd, "е", "e" )
local jeje = string.gsub( je, "Е", "E" )
local jo = string.gsub( jeje, "ё", "ô" )
local jojo = string.gsub( jo, "Ё", "Ô" )
local zh = string.gsub( jojo, "ж", "ž" )
local zhzh = string.gsub( zh, "Ж", "Ž" )
local z = string.gsub( zhzh, "з", "z" )
local zz = string.gsub( z, "З", "Z" )
local i = string.gsub( zz, "и", "i" )
local ii = string.gsub( i, "И", "I" )
local j = string.gsub( ii, "й", "j" )
local jj = string.gsub( j, "Й", "J" )
local k = string.gsub( jj, "к", "k" )
local kk = string.gsub( k, "К", "K" )
local l = string.gsub( kk, "л", "l" )
local ll = string.gsub( l, "Л", "L" )
local m = string.gsub( ll, "м", "m" )
local mm = string.gsub( m, "М", "M" )
local n = string.gsub( mm, "н", "n" )
local nn = string.gsub( n, "Н", "N" )
local o = string.gsub( nn, "о", "o" )
local oo = string.gsub( o, "О", "O" )
local p = string.gsub( oo, "п", "p" )
local pp = string.gsub( p, "П", "P" )
local r = string.gsub( pp, "р", "r" )
local rr = string.gsub( r, "Р", "R" )
local s = string.gsub( rr, "с", "s" )
local ss = string.gsub( s, "С", "S" )
local t = string.gsub( ss, "т", "t" )
local tt = string.gsub( t, "Т", "T" )
local u = string.gsub( tt, "у", "u" )
local uu = string.gsub( u, "У", "U" )
local f = string.gsub( uu, "ф", "f" )
local ff = string.gsub( f, "Ф", "F" )
local x = string.gsub( ff, "х", "x" )
local xx = string.gsub( x, "Х", "X" )
local c = string.gsub( xx, "ц", "c" )
local cc = string.gsub( c, "Ц", "C" )
local ch = string.gsub( cc, "ч", "č" )
local chch = string.gsub( ch, "Ч", "Č" )
local sh = string.gsub( chch, "ш", "š" )
local shsh = string.gsub( sh, "Ш", "Š" )
local nsh = string.gsub( shsh, "щ", "nš" )
local nshc = string.gsub( nsh, "Щ", "NŠ" )
local y = string.gsub( nshc, "ы", "y" )
local yy = string.gsub( y, "Ы", "Y" )
local apostr = string.gsub( yy, "ъ", "j" )
local apostrc = string.gsub( apostr, "Ъ", "J" )
local papostr = string.gsub( apostrc, "'", "j" )
local prime = string.gsub( papostr, "ь", "′" )
local primec = string.gsub( prime, "Ь", "′" )
local e = string.gsub( primec, "э", "ɛ" )
local ee = string.gsub( e, "Э", "Ɛ" )
local ju = string.gsub( ee, "ю", "û" )
local juju = string.gsub( ju, "Ю", "Û" )
local ja = string.gsub( juju, "я", "â" )
local jaja = string.gsub( ja, "Я", "Â" )
local ji = string.gsub( jaja, "і", "î" )
local jiji = string.gsub( ji, "І", "Î" )
local ng = string.gsub( jiji, "ҥ", "ŋ" )
local ngng = string.gsub( ng, "Ҥ", "Ŋ" )
local oe = string.gsub( ngng, "ө", "ô" )
local oeoe = string.gsub( oe, "Ө", "Ô" )
local jy = string.gsub( oeoe, "ѣ", "ŷ" )
local jyjy = string.gsub( jy, "Ѣ", "Ŷ" )
return jyjy
end
return p
return p

Latest revision as of 12:11, 28 November 2023



local p = {}
function p.aurebeshlatn( frame )
	local word = frame.args[1] 
	local a = string.gsub( word, "a", "ឆ" )
	local aa = string.gsub( a, "á", "ឹ" )
	local b = string.gsub( aa, "b", "េ" )
	local ch = string.gsub( b, "ch", "➽" )
	local c = string.gsub( ch, "c", "⇇" )
	local d = string.gsub( c, "d", "⥣" )
	local f = string.gsub( d, "f", "⬇︎" )
	local ng = string.gsub( f, "ng", "⇲" )
	local g = string.gsub( ng, "g", "↹" )
	local kh = string.gsub( g, "kh", "↨" )
	local sh = string.gsub( kh, "sh", "រ" )
	local th = string.gsub( sh, "th", "⥺" )
	local h = string.gsub( th, "h", "ត" )
	local i = string.gsub( h, "i", "យ" )
	local ii = string.gsub( i, "í", "ុ" )
	local j = string.gsub( ii, "j", "ិ" )
	local k = string.gsub( j, "k", "ោ" )
	local l = string.gsub( k, "l", "ផ" )
	local m = string.gsub( l, "m", "ៀ" )
	local n = string.gsub( m, "n", "ឪ" )
	local o = string.gsub( n, "o", "ា" )
	local oo = string.gsub( o, "ó", "ស" )
	local p = string.gsub( oo, "p", "ដ" )
	local q = string.gsub( p, "q", "ថ" )
	local r = string.gsub( q, "r", "ង" )
	local s = string.gsub( r, "s", "Ӝ" )
	local t = string.gsub( s, "t", "ហ" )
	local u = string.gsub( t, "u", "្" )
	local uu = string.gsub( u, "ú", "ᑓ" )
	local v = string.gsub( uu, "v", "א" )
	local w = string.gsub( v, "w", "ב" )
	local x = string.gsub( w, "x", "ក" )
	local y = string.gsub( x, "y", "ג" )
	local z = string.gsub( y, "z", "ד" )
	local dash = string.gsub( z, "-", "@" )
	
	local aimg = string.gsub( dash, "ឆ", "[[File:Aurebesh-AE.svg|18px]]" )
	local aaimg = string.gsub( aimg, "ឹ", "[[File:Aurebesh-A.svg|22px]]" )
	local bimg = string.gsub( aaimg, "េ", "[[File:Aurebesh-B.svg|21px]]" )
	local chimg = string.gsub( bimg, "➽", "[[File:Aurebesh-CH.svg|22px]]" )
	local cimg = string.gsub( chimg, "⇇", "[[File:Aurebesh-C.svg|13px]]" )
	local dimg = string.gsub( cimg, "⥣", "[[File:Aurebesh-D.svg|18px]]" )
	local fimg = string.gsub( dimg, "⬇︎", "[[File:Aurebesh-F.svg|21px]]" )
	local ngimg = string.gsub( fimg, "⇲", "[[File:Aurebesh-NG.svg|17px]]" )
	local gimg = string.gsub( ngimg, "↹", "[[File:Aurebesh-G.svg|20px]]" )
	local khimg = string.gsub( gimg, "↨", "[[File:Aurebesh-KH.svg|15px]]" )
	local shimg = string.gsub( khimg, "រ", "[[File:Aurebesh-SH.svg|24px]]" )
	local thimg = string.gsub( shimg, "⥺", "[[File:Aurebesh-TH.svg|19px]]" )
	local himg = string.gsub( thimg, "ត", "[[File:Aurebesh-H.svg|21px]]")
	local iimg = string.gsub( himg, "យ", "[[File:Aurebesh-E.svg|20px]]" )
	local iiimg = string.gsub( iimg,  "ុ", "[[File:Aurebesh-I.svg|8px]]" )
	local jimg = string.gsub( iiimg,  "ិ", "[[File:Aurebesh-J.svg|19px]]" )
	local kimg = string.gsub( jimg, "ោ", "[[File:Aurebesh-K.svg|20px]]" )
	local limg = string.gsub( kimg, "ផ", "[[File:Aurebesh-L.svg|13px]]" )
	local mimg = string.gsub( limg, "ៀ", "[[File:Aurebesh-M.svg|12px]]" )
	local nimg = string.gsub( mimg, "ឪ", "[[File:Aurebesh-N.svg|21px]]" )
	local oimg = string.gsub( nimg, "ា", "[[File:Aurebesh-O.svg|19px]]" )
	local ooimg = string.gsub( oimg, "ស", "[[File:Aurebesh-EO.svg|21px]]" )
	local pimg = string.gsub( ooimg, "ដ", "[[File:Aurebesh-P.svg|13px]]" )
	local qimg = string.gsub( pimg, "ថ", "[[File:Aurebesh-Q.svg|17px]]" )
	local rimg = string.gsub( qimg, "ង", "[[File:Aurebesh-R.svg|16px]]" )
	local simg = string.gsub( rimg, "Ӝ", "[[File:Aurebesh-S.svg|20px]]" )
	local timg = string.gsub( simg, "ហ", "[[File:Aurebesh-T.svg|21px]]" )
	local uimg = string.gsub( timg, "្", "[[File:Aurebesh-U.svg|19px]]" )
	local uuimg = string.gsub( uimg, "ᑓ", "[[File:Aurebesh-OO.svg|13px]]" )
	local vimg = string.gsub( uuimg, "א", "[[File:Aurebesh-V.svg|16px]]" )
	local wimg = string.gsub( vimg, "ב", "[[File:Aurebesh-W.svg|21px]]" )
	local ximg = string.gsub( wimg, "ក", "[[File:Aurebesh-X.svg|17px]]" )
	local yimg = string.gsub( ximg, "ג", "[[File:Aurebesh-Y.svg|21px]]" )
	local zimg = string.gsub( yimg, "ד", "[[File:Aurebesh-Z.svg|18px]]" )
	local dshimg = string.gsub( zimg, "@", "[[File:Aurebesh--.svg|14px]]")
	
	return dshimg
end

function p.aureaure( frame )
	local word = frame.args[1]
end

function p.qdtcyrl( frame )
	local word = frame.args[1] 
	local a = string.gsub( word, "а", "a" )
	local aa = string.gsub( a, "А", "A" )
	local b = string.gsub( aa, "б", "b" )
	local bb = string.gsub( b, "Б", "B" )
	local v = string.gsub( bb, "в", "v" )
	local vv = string.gsub( v, "В", "V" )
	local g = string.gsub( vv, "г", "g" )
	local gg = string.gsub( g, "Г", "G" )
	local d = string.gsub( gg, "д", "d" )
	local dd = string.gsub( d, "Д", "D" )
	local je = string.gsub( dd, "е", "ê" )
	local jeje = string.gsub( je, "Е", "Ê" )
	local jo = string.gsub( jeje, "ё", "ĕ" )
	local jojo = string.gsub( jo, "Ё", "Ĕ" )
	local zh = string.gsub( jojo, "ж", "ž" )
	local zhzh = string.gsub( zh, "Ж", "Ž" )
end

function p.qrqcyrl( frame )
	local word = frame.args[1]
	local a = string.gsub( word, "а", "a" )
	local aa = string.gsub( a, "А", "A" )
	local b = string.gsub( aa, "б", "b" )
	local bb = string.gsub( b, "Б", "B" )
	local v = string.gsub( bb, "в", "v" )
	local vv = string.gsub( v, "В", "V" )
	local g = string.gsub( vv, "г", "g" )
	local gg = string.gsub( g, "Г", "G" )
	local d = string.gsub( gg, "д", "d" )
	local dd = string.gsub( d, "Д", "D" )
	local je = string.gsub( dd, "е", "e" )
	local jeje = string.gsub( je, "Е", "E" )
	local jo = string.gsub( jeje, "ё", "ô" )
	local jojo = string.gsub( jo, "Ё", "Ô" )
	local zh = string.gsub( jojo, "ж", "ž" )
	local zhzh = string.gsub( zh, "Ж", "Ž" )
	local z = string.gsub( zhzh, "з", "z" )
	local zz = string.gsub( z, "З", "Z" )
	local i = string.gsub( zz, "и", "i" )
	local ii = string.gsub( i, "И", "I" )
	local j = string.gsub( ii, "й", "j" )
	local jj = string.gsub( j, "Й", "J" )
	local k = string.gsub( jj, "к", "k" )
	local kk = string.gsub( k, "К", "K" )
	local l = string.gsub( kk, "л", "l" )
	local ll = string.gsub( l, "Л", "L" )
	local m = string.gsub( ll, "м", "m" )
	local mm = string.gsub( m, "М", "M" )
	local n = string.gsub( mm, "н", "n" )
	local nn = string.gsub( n, "Н", "N" )
	local o = string.gsub( nn, "о", "o" )
	local oo = string.gsub( o, "О", "O" )
	local p = string.gsub( oo, "п", "p" )
	local pp = string.gsub( p, "П", "P" )
	local r = string.gsub( pp, "р", "r" )
	local rr = string.gsub( r, "Р", "R" )
	local s = string.gsub( rr, "с", "s" )
	local ss = string.gsub( s, "С", "S" )
	local t = string.gsub( ss, "т", "t" )
	local tt = string.gsub( t, "Т", "T" )
	local u = string.gsub( tt, "у", "u" )
	local uu = string.gsub( u, "У", "U" )
	local f = string.gsub( uu, "ф", "f" )
	local ff = string.gsub( f, "Ф", "F" )
	local x = string.gsub( ff, "х", "x" )
	local xx = string.gsub( x, "Х", "X" )
	local c = string.gsub( xx, "ц", "c" )
	local cc = string.gsub( c, "Ц", "C" )
	local ch = string.gsub( cc, "ч", "č" )
	local chch = string.gsub( ch, "Ч", "Č" )
	local sh = string.gsub( chch, "ш", "š" )
	local shsh = string.gsub( sh, "Ш", "Š" )
	local nsh = string.gsub( shsh, "щ", "nš" )
	local nshc = string.gsub( nsh, "Щ", "NŠ" )
	local y = string.gsub( nshc, "ы", "y" )
	local yy = string.gsub( y, "Ы", "Y" )
	local apostr = string.gsub( yy, "ъ", "j" )
	local apostrc = string.gsub( apostr, "Ъ", "J" )
	local papostr = string.gsub( apostrc, "'", "j" )
	local prime = string.gsub( papostr, "ь", "′" )
	local primec = string.gsub( prime, "Ь", "′" )
	local e = string.gsub( primec, "э", "ɛ" )
	local ee = string.gsub( e, "Э", "Ɛ" )
	local ju = string.gsub( ee, "ю", "û" )
	local juju = string.gsub( ju, "Ю", "Û" )
	local ja = string.gsub( juju, "я", "â" )
	local jaja = string.gsub( ja, "Я", "Â" )
	local ji = string.gsub( jaja, "і", "î" )
	local jiji = string.gsub( ji, "І", "Î" )
	local ng = string.gsub( jiji, "ҥ", "ŋ" )
	local ngng = string.gsub( ng, "Ҥ", "Ŋ" )
	local oe = string.gsub( ngng, "ө", "ô" )
	local oeoe = string.gsub( oe, "Ө", "Ô" )
	local jy = string.gsub( oeoe, "ѣ", "ŷ" )
	local jyjy = string.gsub( jy, "Ѣ", "Ŷ" )
	
	return jyjy
end
return p