From b3fbeca50f8939dbafb2b9bb45c77266942edaf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ko=CC=88lling?= Date: Thu, 10 Aug 2017 10:57:47 +0200 Subject: [PATCH 1/3] translatable title and img alt for sharing buttons --- js/lib/sharing.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/js/lib/sharing.js b/js/lib/sharing.js index 7b8b8301..a4b783b8 100644 --- a/js/lib/sharing.js +++ b/js/lib/sharing.js @@ -10,14 +10,18 @@ window.addEventListener("load",function(){ text = encodeURIComponent(text); link = encodeURIComponent(link); + var facebook = sharingDOM.getAttribute("facebook"); + var twitter = sharingDOM.getAttribute("twitter"); + var email = sharingDOM.getAttribute("email"); + // Create full html var sharing = document.createElement("div"); sharing.className = "sharing"; - sharing.innerHTML = 'Share on Facebook'+ - 'Tweet'+ - 'Send email'; + sharing.innerHTML = ''+facebook+''+ + ''+twitter+''+ + ''+email+''; // Replace it in the dom sharingDOM.parentNode.replaceChild(sharing, sharingDOM); -}); \ No newline at end of file +}); From 09a12d7bbb37f6d1429b8d8e1a4a7b812e867f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ko=CC=88lling?= Date: Thu, 10 Aug 2017 11:13:34 +0200 Subject: [PATCH 2/3] translatable title and img alt for sharing buttons (part 2) --- index.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 06cb69c2..664332a6 100644 --- a/index.html +++ b/index.html @@ -77,9 +77,13 @@ + + link="http://ncase.me/trust/" + facebook="Share on Facebook" + twitter="Tweet" + email="Send email">
From e355158e46514ec92351baca829607c3d394d969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ko=CC=88lling?= Date: Thu, 10 Aug 2017 11:15:02 +0200 Subject: [PATCH 3/3] capitalized translate to match other occurences --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 664332a6..eafd2c3e 100644 --- a/index.html +++ b/index.html @@ -77,7 +77,7 @@ - +