From 40ec173e68d47c821cb09875a44aab81d33cd89d Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 20 May 2017 15:43:55 +0200 Subject: JS translation --- tpl/default/js/shaarli.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tpl/default/js') diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index 55656f80..09b07eed 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js @@ -138,6 +138,9 @@ window.onload = function () { }); foldAllButton.firstElementChild.classList.toggle('fa-chevron-down'); foldAllButton.firstElementChild.classList.toggle('fa-chevron-up'); + foldAllButton.title = state === 'down' + ? document.getElementById('translation-fold-all').innerHTML + : document.getElementById('translation-expand-all').innerHTML }); }); } @@ -146,7 +149,7 @@ window.onload = function () { { // Switch fold/expand - up = fold if (button.classList.contains('fa-chevron-up')) { - button.title = 'Expand'; + button.title = document.getElementById('translation-expand').innerHTML; if (description != null) { description.style.display = 'none'; } @@ -155,7 +158,7 @@ window.onload = function () { } } else { - button.title = 'Fold'; + button.title = document.getElementById('translation-fold').innerHTML; if (description != null) { description.style.display = 'block'; } @@ -173,7 +176,7 @@ window.onload = function () { var deleteLinks = document.querySelectorAll('.confirm-delete'); [].forEach.call(deleteLinks, function(deleteLink) { deleteLink.addEventListener('click', function(event) { - if(! confirm('Are you sure you want to delete this link ?')) { + if(! confirm(document.getElementById('translation-delete-link').innerHTML)) { event.preventDefault(); } }); @@ -618,7 +621,7 @@ function activateFirefoxSocial(node) { // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable. var data = { name: title, - description: "The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community.", + description: document.getElementById('translation-delete-link').innerHTML, author: "Shaarli", version: "1.0.0", -- cgit v1.2.3