Detect browser translations

pull/11/head
Squidly271 2022-02-20 11:18:03 -05:00
parent 355957afe5
commit 52b1d9eadc
3 changed files with 8 additions and 4 deletions

View File

@ -1653,14 +1653,14 @@ function installMulti() {
}); });
} }
function updateDisplay(data) { function updateDisplay(content) {
// This has to be first. If this doesn't happen, performance gets worse the more you click around // This has to be first. If this doesn't happen, performance gets worse the more you click around
$(".supportButtonCardContext,.actionsButtonContext").each(function() { $(".supportButtonCardContext,.actionsButtonContext").each(function() {
var ID = $(this).attr("id"); var ID = $(this).attr("id");
context.destroy("#"+ID); context.destroy("#"+ID);
}); });
$("#templates_content").html(data); $("#templates_content").html(content);
setToolTip(); setToolTip();
enableSearch(); enableSearch();
$('img').on("error",function() { $('img').on("error",function() {
@ -1707,7 +1707,11 @@ function updateDisplay(data) {
$(this).css("font-size",newSize+"px"); $(this).css("font-size",newSize+"px");
} }
}); });
if ( $("html").hasClass("translated-ltr") || $("html").hasClass("translated-rtl") || $("head").hasClass("translated-ltr") || $("head").hasClass("translated-rtl") ) {
data.translationBanner = addBannerWarning("<?=tr("Browser translation detected. Display issues may result")?>");
} else {
removeBannerWarning(data.translationBanner);
}
saveState(); saveState();
} }

View File

@ -1,4 +1,4 @@
865abbf25bbd17d8de176b1772ff3bb7 ./Apps.page e09e3baad003519ebba28645b59c818c ./Apps.page
4e55f7483b661af21a25b677179baffe ./CA_notices.page 4e55f7483b661af21a25b677179baffe ./CA_notices.page
c7c6da0a4a4a7ac33f387ea178319bae ./ca_settings.page c7c6da0a4a4a7ac33f387ea178319bae ./ca_settings.page
ed2883d6c44c19304c431079596a1731 ./default.cfg ed2883d6c44c19304c431079596a1731 ./default.cfg