|
|
|
@ -12,8 +12,16 @@ const stateMachine = {}
|
|
|
|
|
socket.on('msgmgr:event', async (eventType, eventData) => {
|
|
|
|
|
console.log(eventType, eventData)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const umlautMap = {
|
|
|
|
|
const umlautMapGermany = {
|
|
|
|
|
'\u00dc': ']',
|
|
|
|
|
'\u00c4': '[',
|
|
|
|
|
'\u00d6': "\\",
|
|
|
|
|
'\u00fc': '}',
|
|
|
|
|
'\u00e4': '{',
|
|
|
|
|
'\u00f6': '|',
|
|
|
|
|
'\u00df': '~',
|
|
|
|
|
}
|
|
|
|
|
const umlautMapIntl = {
|
|
|
|
|
'\u00dc': 'U',
|
|
|
|
|
'\u00c4': 'A',
|
|
|
|
|
'\u00d6': 'O',
|
|
|
|
@ -24,6 +32,9 @@ const umlautMap = {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)];
|
|
|
|
|