[Pkg-mozext-commits] [wot] 105/226: Fixed #42 Warning on a site without reputation is missing labels "unknown"

David Prévot taffit at moszumanska.debian.org
Fri May 1 00:35:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository wot.

commit f5abecc7ffd3f3d03f8c4007b35d21c81084706f
Author: Sergey Andryukhin <sorgoz at yandex.com>
Date:   Wed Aug 7 12:29:40 2013 +0300

    Fixed #42 Warning on a site without reputation is missing labels "unknown"
---
 content/ui.js               | 10 +++++-----
 content/warning.js          | 38 +++++---------------------------------
 locale/en-US/wot.properties |  4 ++--
 3 files changed, 12 insertions(+), 40 deletions(-)

diff --git a/content/ui.js b/content/ui.js
index 6ae8814..76fc1f8 100644
--- a/content/ui.js
+++ b/content/ui.js
@@ -316,15 +316,15 @@ var wot_ui = {
 //
 //				if (help && link) {
 //					if (testimony >= WOT_MIN_REPUTATION_5) {
-//						help.value = wot_util.getstring("help_5");
+//						help.value = wot_util.getstring("reputationlevels_5");
 //					} else if (testimony >= WOT_MIN_REPUTATION_4) {
-//						help.value = wot_util.getstring("help_4");
+//						help.value = wot_util.getstring("reputationlevels_4");
 //					} else if (testimony >= WOT_MIN_REPUTATION_3) {
-//						help.value = wot_util.getstring("help_3");
+//						help.value = wot_util.getstring("reputationlevels_3");
 //					} else if (testimony >= WOT_MIN_REPUTATION_2) {
-//						help.value = wot_util.getstring("help_2");
+//						help.value = wot_util.getstring("reputationlevels_2");
 //					} else if (testimony >= 0) {
-//						help.value = wot_util.getstring("help_1");
+//						help.value = wot_util.getstring("reputationlevels_1");
 //					} else {
 //						help.value = "";
 //					}
diff --git a/content/warning.js b/content/warning.js
index 3a380a9..c26cea2 100644
--- a/content/warning.js
+++ b/content/warning.js
@@ -155,36 +155,6 @@ var wot_warning =
             "</div>";
 
         return wot_warning;
-
-//			"<div class='wot-desc'>{DESC}</div>" +
-//			"<div class='wot-openscorecard-wrap'>" +
-//			"<span id='wotinfobutton' class='wot-openscorecard wot-link'>{INFO}</span>" +
-//			"</div>" +
-//			"<div id='wot-ws-ratings'>";
-//
-//		for(var c=0; c < WOT_APPLICATIONS; c++) {
-//
-//			if(!wot_prefs["show_application_" + c]) continue;
-//
-//			var S_COMPNAME = "RATINGDESC" + c,
-//				S_RATING = "RATING" + c,
-//				S_RATING_EXPL = "RATINGEXPL" + c;
-//
-//			wot_warning += "" +
-//				"<div class='wot-component'>" +
-//				"<div class='wot-comp-name'>{" + S_COMPNAME + "}</div>" +
-//				"<div class='wot-comp-level' r='{" + S_RATING + "}'>{" + S_RATING_EXPL + "}</div>" +
-//				"<div class='wot-comp-icon' r='{" + S_RATING + "}'></div>" +
-//				"</div>";
-//		}
-//
-//		wot_warning +=
-//			"</div>" +
-//				"<div class='wot-rateit-wrap'>" +
-//				"<span>{RATETEXT}</span>" +
-//				"</div>" +
-//				"<div class='wot-buttons'>";
-
 	},
 
 	load_delayed: function(blocked)
@@ -486,11 +456,13 @@ var wot_warning =
 				}
 
 
-				var r_level = wot_util.get_level(WOT_REPUTATIONLEVELS, r).level;
+				var rep_l = wot_util.get_level(WOT_REPUTATIONLEVELS, r),
+                    r_level = rep_l.level,
+                    r_name = rep_l.name;
 
 				if (r_level >= 0) {
-					replaces.push([ "RATING" + i, "r" + r_level ]);
-					replaces.push([ "RATINGEXPL" + i, wot_util.getstring("help_" + r_level) ]);
+					replaces.push([ "RATING" + i, r_name ]);
+					replaces.push([ "RATINGEXPL" + i, wot_util.getstring("reputationlevels_" + r_name) ]);
                     replaces.push([ "CONFIDENCE" + i, wot_util.get_level(WOT_CONFIDENCELEVELS, c).name ]);
 
 				} else if (x) {
diff --git a/locale/en-US/wot.properties b/locale/en-US/wot.properties
index b12fd0b..289d39b 100644
--- a/locale/en-US/wot.properties
+++ b/locale/en-US/wot.properties
@@ -22,7 +22,7 @@ description_rating_0 = Not enough ratings for this site
 description_restart = Restart the browser to activate WOT.
 description_uninstall = WOT will be uninstalled after restart.
 description_reputation = Reputation of
-help_0 =
+help_0 = Unknown
 help_1 = Very poor
 help_2 = Poor
 help_3 = Unsatisfactory
@@ -82,7 +82,7 @@ components__short_0 = Trustworthiness
 components__short_1 = Vendor reliability 
 components__short_2 = Privacy 
 components__short_4 = Child safety 
-reputationlevels_r0 = Unknown 
+reputationlevels_r0 = Unknown
 reputationlevels_r1 = Very poor 
 reputationlevels_r2 = Poor 
 reputationlevels_r3 = Unsatisfactory 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/wot.git



More information about the Pkg-mozext-commits mailing list