From dcd61b9b32f6c6ef690ccc5292896862b2700b55 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 5 Aug 2017 14:18:20 +0300 Subject: [PATCH 1/7] Update shareit.js --- shareit.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shareit.js b/shareit.js index 9f67d13..6bcfcb9 100644 --- a/shareit.js +++ b/shareit.js @@ -27,7 +27,13 @@ ShareIt = { iconOnly: false, faSize: '', faClass: '', - applyColors: true + applyColors: true, + titles: { + 'facebook': 'Share on Facebook', + 'googleplus': 'Share on Google+', + 'pinterest': 'Share on Pinterest', + 'twitter': 'Share on Twitter' + } }, configure: function(hash) { return this.settings = $.extend(true, this.settings, hash); From 5aae80eae3aae70b19552c98c1e86000b9b79e2f Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 5 Aug 2017 14:19:05 +0300 Subject: [PATCH 2/7] Update facebook.html --- client/views/facebook/facebook.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/views/facebook/facebook.html b/client/views/facebook/facebook.html index fcafc7b..81008e7 100644 --- a/client/views/facebook/facebook.html +++ b/client/views/facebook/facebook.html @@ -1,6 +1,6 @@ From da709dff3233b8f123237ca17bb2afaf09866be3 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 5 Aug 2017 14:19:43 +0300 Subject: [PATCH 3/7] Update googleplus.html --- client/views/googleplus/googleplus.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/views/googleplus/googleplus.html b/client/views/googleplus/googleplus.html index 71c6d98..6ff49a9 100644 --- a/client/views/googleplus/googleplus.html +++ b/client/views/googleplus/googleplus.html @@ -1,6 +1,6 @@ From db9d11c3e05e84cddf1b04a903cdfe2bcf36ee13 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 5 Aug 2017 14:20:05 +0300 Subject: [PATCH 4/7] Update pinterest.html --- client/views/pinterest/pinterest.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/views/pinterest/pinterest.html b/client/views/pinterest/pinterest.html index 4e1c1f1..4894630 100644 --- a/client/views/pinterest/pinterest.html +++ b/client/views/pinterest/pinterest.html @@ -1,5 +1,5 @@ From 3fab98b388c3ca2534464195392477e86efc1849 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 5 Aug 2017 14:20:29 +0300 Subject: [PATCH 5/7] Update twitter.html --- client/views/twitter/twitter.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/views/twitter/twitter.html b/client/views/twitter/twitter.html index 78bd10f..a466747 100644 --- a/client/views/twitter/twitter.html +++ b/client/views/twitter/twitter.html @@ -1,5 +1,5 @@ From 699908f353d998392cb130dd322cb851685743d8 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 5 Aug 2017 14:29:24 +0300 Subject: [PATCH 6/7] Update shareit.js --- shareit.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shareit.js b/shareit.js index 6bcfcb9..5e48ac0 100644 --- a/shareit.js +++ b/shareit.js @@ -61,6 +61,10 @@ ShareIt = { } }; +Template.registerHelper('titleShareIt', function(name) { + return typeof(ShareIt.settings.titles[name]) == "function" ? ShareIt.settings.titles[name]() : ShareIt.settings.titles[name]; +}); + ShareIt.init = function(hash) { this.settings = $.extend(true, this.settings, hash); window.twttr = (function(d, s, id) { From ed50525871df97d92570633a9cfaaed9252ae867 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 5 Aug 2017 14:31:30 +0300 Subject: [PATCH 7/7] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 53e522e..4a13a77 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,18 @@ If you have valid facebook app id, we recommend you configure it to use Facebook }); ``` +## I18n + +```js + ShareIt.configure({ + titles: { + 'facebook': function() {return TAPi18n.__('Share on Facebook');}, + 'googleplus': function() {return TAPi18n.__('Share on Google+');}, + 'pinterest': function() {return TAPi18n.__('Share on Pinterest');}, + 'twitter': function() {return TAPi18n.__('Share on Twitter');} + } + }); +``` ## Roadmap