Used Zammad version: 4.1.x
Used Zammad installation type: (package)
Operating system: Ubuntu 20.4.0
Browser + version: Chrom Edge
Expected behavior:
I tried updating the default text in Chat.js and others to update the default text messages in Zammad chat including (Connecting, All colleagues are busy, etc…)
*
Actual behavior:
Whatever I change nothing is happening to Zammad Chat Messages … seems like I can’t locate the source where it is configured
*
Steps to reproduce the behavior:
Edit Chat.js or Chat.coffee
*
You mean this file…?
ZammadChat.prototype.translations = {
'da': {
'<strong>Chat</strong> with us!': '<strong>Chat</strong> med os!',
'Scroll down to see new messages': 'Scroll ned for at se nye beskeder',
'Online': 'Online',
'Offline': 'Offline',
'Connecting': 'Forbinder',
'Connection re-established': 'Forbindelse genoprettet',
'Today': 'I dag',
'Send': 'Send',
'Chat closed by %s': 'Chat lukket af %s',
'Compose your message...': 'Skriv en besked...',
'All colleagues are busy.': 'Alle kollegaer er optaget.',
'You are on waiting list position <strong>%s</strong>.': 'Du er i venteliste som nummer <strong>%s</strong>.',
'Start new conversation': 'Start en ny samtale',
'Since you didn\'t respond in the last %s minutes your conversation with <strong>%s</strong> got closed.': 'Da du ikke har svaret i de sidste %s minutter er din samtale med <strong>%s</strong> blevet lukket.',
'Since you didn\'t respond in the last %s minutes your conversation got closed.': 'Da du ikke har svaret i de sidste %s minutter er din samtale blevet lukket.',
'We are sorry, it takes longer as expected to get an empty slot. Please try again later or send us an email. Thank you!': 'Vi beklager, det tager længere end forventet at få en ledig plads. Prøv venligst igen senere eller send os en e-mail. På forhånd tak!'
},
'de': {
This file has been truncated. show original
Note that changing source files is a) not update safe and b) requires precompiling in most situations.
You should only use that option if you understand the scopes you’re changing because other wise you may break stuff.
zammad run rake assets:precompile
does the precompile.
Don’t forget to clear caches…
Azd325
September 10, 2021, 8:19am
3
You could set the map before chat init.
ZammadChat.prototype.translations = {}
const chat = new ZammadChat({})
Hello, This is yes the defaults but these are translations. I want to change the English version of the text and not add any translations.
Well yes then you gotta change the originating strings.
They look like so:
}
__out.push('\n <br>\n <div class="zammad-chat-button js-restart"');
if (this.background) {
__out.push(__sanitize(" style='background: " + this.background + "'"));
}
__out.push('>');
__out.push(this.T('Start new conversation'));
__out.push('</div>\n</div>');
}).call(this);
}).call(__obj);
__obj.safe = __objSafe, __obj.escape = __escape;
return __out.join('');
};
It’s simply not supported by Zammad core to adjust the originating strings.
This is as far as I can help. Good luck!
system
Closed
January 19, 2022, 4:05pm
6
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.