(function() {
var clicked = 0;
var seen = new Set();
function tryClick(el) {
if (!el || seen.has(el)) return;
seen.add(el);
var style = getComputedStyle(el);
if (el.offsetParent !== null && style.display !== 'none' && style.visibility !== 'hidden') {
el.click();
clicked++;
}
}
// Field-level translate buttons (any table prefix)
['short_description_translate.btn', 'description_translate.btn'].forEach(function(suffix) {
document.querySelectorAll('button[id$="' + suffix + '"]').forEach(tryClick);
});
// Any other translate button
document.querySelectorAll('button[id*="translate"]').forEach(tryClick);
// Activity feed translate links
document.querySelectorAll('a[href*="translation-link-toggle"]').forEach(tryClick);
// Fallback: plain links labelled Translate
document.querySelectorAll('a').forEach(function(el) {
if (el.textContent.trim() === 'Translate') tryClick(el);
});
var toast = document.createElement('div');
toast.textContent = 'Clicked ' + clicked + ' translation button(s)';
toast.style.cssText = 'position:fixed;bottom:30px;right:30px;background:#2e7d32;color:#fff;padding:12px 20px;border-radius:6px;font-family:sans-serif;font-size:14px;font-weight:bold;z-index:99999;box-shadow:0 4px 12px rgba(0,0,0,0.3);';
document.body.appendChild(toast);
setTimeout(function() { if (toast.parentNode) toast.parentNode.removeChild(toast); }, 3500);
})();
Translate Everything
Hint: Click every Translate button on the page, fields and activity alike
Trigger: \translateall