diff --git a/following.html b/following.html index 6f7c88a..a869b89 100755 --- a/following.html +++ b/following.html @@ -117,13 +117,13 @@ diff --git a/home.html b/home.html index fcd8724..65eb83e 100755 --- a/home.html +++ b/home.html @@ -118,13 +118,13 @@ @@ -166,7 +166,7 @@
-

Top Trends

+

Top Trends

@@ -185,8 +185,8 @@
diff --git a/js/interface_common.js b/js/interface_common.js index 4a9fb20..eb1b200 100755 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -125,6 +125,9 @@ function openProfileModal(e) unfollow(username); }); }; + + $(".tox-ctc").attr("title", polyglot.t("Copy to clipboard")); + $(".bitmessage-ctc").attr("title", polyglot.t("Copy to clipboard")); } function newHashtagModal(hashtag) { @@ -1111,7 +1114,7 @@ function convert2Unicodes(s, ta) { if (unicodeConversionStack.length > 0){ var ub = ta.closest(".post-area-new").find(".undo-unicode"); - ub.text("undo: " + unicodeConversionStack[0].u); + ub.text(polyglot.t("undo") + ": " + unicodeConversionStack[0].u); $.MAL.enableButton(ub); } else { $.MAL.disableButton(ta.closest(".post-area-new").find(".undo-unicode")); @@ -1144,7 +1147,7 @@ function undoLastUnicode(e) { } if (unicodeConversionStack.length > 0) - $(this).text("undo: " + unicodeConversionStack[0].u); + $(this).text(polyglot.t("undo") + ": " + unicodeConversionStack[0].u); else $.MAL.disableButton($(this)); diff --git a/js/interface_localization.js b/js/interface_localization.js index bbd1981..a457cbc 100755 --- a/js/interface_localization.js +++ b/js/interface_localization.js @@ -226,11 +226,31 @@ if(preferredLanguage == "en"){ "follows you": "follows you", "Show conversation": "Show conversation", "Mark all as read": "Mark all as read", - "show_more_count": "%{count} more...", + "show_more_count": "%{smart_count} more...", "hide": "hide", "Show more in this conversation...": "Show more in this conversation...", "conversation_title": "Conversation of @%{username}", - "copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close" + "copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close", + "Normal posts": "Normal posts", + "Promoted posts": "Promoted posts", + "Messages": "Messages", + "Edit profile": "Edit profile", + "Top Trends": "Top Trends", + "twisted again by": "twisted again by", + "undo": "undo", + "Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.", + "Daemon exited...": "Daemon exited...", + "Secret Key": "Secret Key", + "Copy to clipboard": "Copy to clipboard", + "Full name here": "Full name here", + "Describe yourself": "Describe yourself", + "Location": "Location", + "website": "website", + "Tox address": "Tox address", + "Bitmessage address": "Bitmessage address", + "Language": "Language", + "Sound": "Sound", + "Users": "Users", }; } if(preferredLanguage == "es"){ @@ -1875,7 +1895,7 @@ if(preferredLanguage == "tr"){ "follows you": "seni takip ediyor", "Show conversation": "Sohbeti göster", "Mark all as read": "hepsini okundu olarak işaretle", - "show_more_count": "%{count} tane daha...", + "show_more_count": "%{smart_count} tane daha...", "hide": "gizle", "Show more in this conversation...": "Sohbetin tamamını göster...", "conversation_title": "@%{username} kullanıcısının bir sohbeti", diff --git a/js/interface_profile-edit.js b/js/interface_profile-edit.js index eb038f5..4ae2919 100755 --- a/js/interface_profile-edit.js +++ b/js/interface_profile-edit.js @@ -103,18 +103,22 @@ function verifyUserAlreadyInBlockchain() }); } else { if( !newUserWarnDisplayed ) { - alert("Other peers have not yet accepted this new user.\n" + - "Unfortunately it is not possible to save profile\n" + - "or send any posts in this state.\n\n" + - "Please wait a few minutes to continue.\n\n" + - "The 'Save Changes' will be automatically enabled\n" + - "when the process completes. (I promise this is\n"+ - "the last time you will have to wait before using\n" + - "twister).\n\n" + - "Tip: choose your avatar in the meantime!"); + alert(polyglot.t("user_not_yet_accepted")); newUserWarnDisplayed = true; } setTimeout("verifyUserAlreadyInBlockchain()", 5000); } }, {} ); } + +function localizePlaceholders() +{ + $(".input-name").attr("placeholder",polyglot.t("Full name here")); + $(".input-description").attr("placeholder",polyglot.t("Describe yourself")); + $(".input-city").attr("placeholder",polyglot.t("Location")); + $(".input-website").attr("placeholder",polyglot.t("website")); + $(".input-tox").attr("placeholder",polyglot.t("Tox address")); + $(".input-bitmessage").attr("placeholder",polyglot.t("Bitmessage address")); +} + +$(document).ready(localizePlaceholders); diff --git a/js/mobile_abstract.js b/js/mobile_abstract.js index 567d5e5..614c72b 100755 --- a/js/mobile_abstract.js +++ b/js/mobile_abstract.js @@ -98,7 +98,7 @@ var MAL = function() var newTweetsBarMenu = $(".userMenu").find(".menu-news"); // added for home menu entry if( newPosts ) { document.title = "(" + String(newPosts) + ") twister"; - newTweetsBar.text(String(newPosts) + " new posts"); + newTweetsBar.text(polyglot.t("new_posts", newPosts)); newTweetsBar.fadeIn("slow"); newTweetsBarMenu.text(String(newPosts)); newTweetsBarMenu.addClass("show"); diff --git a/js/options.js b/js/options.js index 803ab03..1953df6 100755 --- a/js/options.js +++ b/js/options.js @@ -105,6 +105,7 @@ var TwisterOptions = function() $('#language').val($.Options.getOption('locLang','auto')) $('#language').on('change', function(){ $.Options.setOption('locLang', $(this).val()); + location.reload(); }) } @@ -347,3 +348,14 @@ var TwisterOptions = function() jQuery.Options = new TwisterOptions; +function localizeLabels() +{ + $("label[for=tab_language]").text(polyglot.t("Language")); + $("label[for=t-2]").text(polyglot.t("Theme")); + $("label[for=t-3]").text(polyglot.t("Sound")); + $("label[for=t-4]").text(polyglot.t("Keys")); + $("label[for=t-5]").text(polyglot.t("Postboard")); + $("label[for=t-6]").text(polyglot.t("Users")); +} + +$(document).ready(localizeLabels); diff --git a/js/twister_following.js b/js/twister_following.js index eb19360..aca4fdf 100755 --- a/js/twister_following.js +++ b/js/twister_following.js @@ -477,7 +477,7 @@ function getWhoFollows(username, item) { fillWhoFollows(list, item, 0, (list.length > 5 ? 5 : list.length)); if (list.length > 5) { - var more_link = $('' + polyglot.t('show_more_count', {'count': list.length - 5}) + ''); + var more_link = $('' + polyglot.t('show_more_count', {'smart_count': list.length - 5}) + ''); more_link.on('click', function() { fillWhoFollows(list, item, 5, list.length - 5); diff --git a/js/twister_network.js b/js/twister_network.js index d953ee2..bcf2ee8 100755 --- a/js/twister_network.js +++ b/js/twister_network.js @@ -222,7 +222,7 @@ function setSpamMsg() { } function exitDaemon() { - if (confirm('Are you sure you want to exit the daemon?\nThe Twister client will stop working.')) { + if (confirm(polyglot.t("Are you sure you want to exit the daemon?\nThe Twister client will stop working."))) { $( ".terminate-daemon").text("Exiting..."); $( ".terminate-daemon").addClass("disabled"); $.MAL.disableButton( $( ".terminate-daemon") ); diff --git a/login.html b/login.html index cb270f9..32ba271 100755 --- a/login.html +++ b/login.html @@ -55,7 +55,7 @@

twister login

-

Existing local users

+

Existing local users

@@ -66,7 +66,7 @@
-

Create a new user

+

Create a new user

@@ -81,11 +81,11 @@
-

Import secret key

+

Import secret key

-

With nickname

+

With nickname

diff --git a/options.html b/options.html index 6f2aa2a..f42f53e 100755 --- a/options.html +++ b/options.html @@ -185,7 +185,7 @@

Posts display

-

Line feeds

+

Line feeds