|
|
|
@ -12,18 +12,29 @@ const stateMachine = {}
|
|
|
|
|
socket.on('msgmgr:event', async (eventType, eventData) => {
|
|
|
|
|
console.log(eventType, eventData)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const umlautMap = {
|
|
|
|
|
'\u00dc': 'U',
|
|
|
|
|
'\u00c4': 'A',
|
|
|
|
|
'\u00d6': 'O',
|
|
|
|
|
'\u00fc': 'u',
|
|
|
|
|
'\u00e4': 'a',
|
|
|
|
|
'\u00f6': 'o',
|
|
|
|
|
'\u00df': 'ss',
|
|
|
|
|
const umlautMapGermany = {
|
|
|
|
|
'\u00dc': ']',
|
|
|
|
|
'\u00c4': '[',
|
|
|
|
|
'\u00d6': "\\",
|
|
|
|
|
'\u00fc': '}',
|
|
|
|
|
'\u00e4': '{',
|
|
|
|
|
'\u00f6': '|',
|
|
|
|
|
'\u00df': '~',
|
|
|
|
|
}
|
|
|
|
|
const umlautMapIntl = {
|
|
|
|
|
'\u00dc': 'U',
|
|
|
|
|
'\u00c4': 'A',
|
|
|
|
|
'\u00d6': 'O',
|
|
|
|
|
'\u00fc': 'u',
|
|
|
|
|
'\u00e4': 'a',
|
|
|
|
|
'\u00f6': 'o',
|
|
|
|
|
'\u00df': 'ss',
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function replaceUmlaute(str) {
|
|
|
|
|
let umlautMap = config.germanUmlautSupport
|
|
|
|
|
? umlautMapGermany
|
|
|
|
|
: umlautMapIntl
|
|
|
|
|
return str
|
|
|
|
|
.replace(/[\u00dc|\u00c4|\u00d6][a-z]/g, (a) => {
|
|
|
|
|
const big = umlautMap[a.slice(0, 1)];
|
|
|
|
|