Merge pull request #1393 from ONLYOFFICE/fix/fix-bugs

[SSE] Fix bug 54386
This commit is contained in:
Julia Radzhabova 2021-12-06 21:16:17 +03:00 committed by GitHub
commit c31ab9a376
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -229,6 +229,20 @@ Common.UI.HintManager = new(function() {
if (visibleItems.length === visibleItemsWithTitle.length) { // all buttons have data-hint-title
visibleItems.forEach(function (item) {
var el = $(item);
if (_lang !== 'en') {
var title = el.attr('data-hint-title').toLowerCase(),
firstLetter = title.substr(0, 1);
if (_arrAlphabet.indexOf(firstLetter) === -1) { // tip is in English
var newTip = '';
for (var i = 0; i < title.length; i++) {
var letter = title.substr(i, 1),
ind = _arrEnAlphabet.indexOf(letter);
newTip = newTip + _arrAlphabet[ind].toUpperCase();
}
el.attr('data-hint-title', newTip);
}
}
_currentControls.push(el);
});
return;