function PseudoLocalize.pseudoLocalize(b)local E=PseudoLocalize.PSEUDO_CHARACTER_MAP local p=""local l=false for m,M in utf8.graphemes(b)do local D=b:sub(m,M)if D=="\123"or D=="\091"then l=true p=p..D elseif D=="\125"or D=="\093"then l=false p=p..D elseif not l and E[D]then p=p..E[D]else p=p..D end end return p end
--[=[
    Translates a line into pseudo text while maintaining params
    @param line string -- The line to translate
    @return string -- The translated line
]=]
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
