function PseudoLocalize.pseudoLocalize(w)local r=PseudoLocalize.PSEUDO_CHARACTER_MAP local e=""local b=false for V,O in utf8.graphemes(w)do local Z=w:sub(V,O)if Z=="\123"or Z=="\091"then b=true e=e..Z elseif Z=="\125"or Z=="\093"then b=false e=e..Z elseif not b and r[Z]then e=e..r[Z]else e=e..Z end end return e 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 == "[" then
			isParam = true
			out = out .. char
		elseif 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
