From ede4808ec41d3906c1ffa830cdf30ec8677055cc Mon Sep 17 00:00:00 2001 From: paweldomas Date: Wed, 2 Nov 2016 11:28:44 -0500 Subject: [PATCH] fix(LargeVideoManager): frozen displayname in a msg The "data-i18n-options" attribute value is stored in jQuery cache and at the time when i18-next tries to access it to do the translation it gets the old value from the cache and the message is not updated correctly. Passing the "msgOptions" explicitly to "translateElement" fixes the problem by avoiding jQuery cache. --- modules/UI/videolayout/LargeVideoManager.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/UI/videolayout/LargeVideoManager.js b/modules/UI/videolayout/LargeVideoManager.js index 2ce6fa080..e41d87b40 100644 --- a/modules/UI/videolayout/LargeVideoManager.js +++ b/modules/UI/videolayout/LargeVideoManager.js @@ -382,7 +382,8 @@ export default class LargeVideoManager { $('#remoteConnectionMessage') .attr("data-i18n", msgKey) .attr("data-i18n-options", JSON.stringify(msgOptions)); - APP.translation.translateElement($('#remoteConnectionMessage')); + APP.translation.translateElement( + $('#remoteConnectionMessage'), msgOptions); } this.videoContainer.positionRemoteConnectionMessage(); @@ -394,14 +395,12 @@ export default class LargeVideoManager { * * @param {string} msgKey the translation key which will be used to get * the message text to be displayed on the large video. - * @param {object} msgOptions translation options object * * @private */ - _setLocalConnectionMessage (msgKey, msgOptions) { + _setLocalConnectionMessage (msgKey) { $('#localConnectionMessage') - .attr("data-i18n", msgKey) - .attr("data-i18n-options", JSON.stringify(msgOptions)); + .attr("data-i18n", msgKey); APP.translation.translateElement($('#localConnectionMessage')); }