function PseudoLocalize.pseudoLocalize(T)local S=PseudoLocalize.PSEUDO_CHARACTER_MAP local v=""local t=false for a,u in utf8.graphemes(T)do local R=T:sub(a,u)if R=="\123"or R=="\091"or R=="\060"then t=true v=v..R elseif R=="\125"or R=="\093"or R=="\062"then t=false v=v..R elseif not t and S[R]then v=v..S[R]else v=v..R end end return v end

function PseudoLocalize.pseudoLocalize(line)
	local charMap = PseudoLocalize.PSEUDO_CHARACTER_MAP
	local out = ""
	local isParam = false

	for start, stop in utf8.graphemes(line) do
		local char = line:sub(start, stop)
		if char == "{" or char == "[" or char == "<" then
			isParam = true
			out = out .. char
		elseif char == "}" or char == "]" or char == ">" then
			isParam = false
			out = out .. char
		elseif not isParam and charMap[char] then
			out = out .. charMap[char]
		else
			out = out .. char
		end
	end

	return out
end
