I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 7f18d25d authored by str4d's avatar str4d
Browse files

Re-add alt="" to some icons in snark to prevent double text in text browsers

parent c145e426
No related branches found
No related tags found
No related merge requests found
...@@ -972,24 +972,24 @@ public class I2PSnarkServlet extends DefaultServlet { ...@@ -972,24 +972,24 @@ public class I2PSnarkServlet extends DefaultServlet {
String statusString; String statusString;
if (err != null) { if (err != null) {
if (isRunning && curPeers > 0 && !showPeers) if (isRunning && curPeers > 0 && !showPeers)
statusString = "<img border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Tracker Error") + "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Tracker Error") +
": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" + ": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" +
curPeers + thinsp(noThinsp) + curPeers + thinsp(noThinsp) +
ngettext("1 peer", "{0} peers", knownPeers) + "</a>"; ngettext("1 peer", "{0} peers", knownPeers) + "</a>";
else if (isRunning) else if (isRunning)
statusString = "<img border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Tracker Error") + "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Tracker Error") +
": " + curPeers + thinsp(noThinsp) + ": " + curPeers + thinsp(noThinsp) +
ngettext("1 peer", "{0} peers", knownPeers); ngettext("1 peer", "{0} peers", knownPeers);
else { else {
if (err.length() > MAX_DISPLAYED_ERROR_LENGTH) if (err.length() > MAX_DISPLAYED_ERROR_LENGTH)
err = err.substring(0, MAX_DISPLAYED_ERROR_LENGTH) + "&hellip;"; err = err.substring(0, MAX_DISPLAYED_ERROR_LENGTH) + "&hellip;";
statusString = "<img border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Tracker Error"); "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Tracker Error");
} }
} else if (snark.isStarting()) { } else if (snark.isStarting()) {
statusString = "<img border=\"0\" src=\"" + _imgPath + "stalled.png\" title=\"" + _("Starting") + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "stalled.png\" title=\"" + _("Starting") + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Starting"); "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Starting");
} else if (remaining == 0 || needed == 0) { // < 0 means no meta size yet } else if (remaining == 0 || needed == 0) { // < 0 means no meta size yet
// partial complete or seeding // partial complete or seeding
...@@ -1005,52 +1005,52 @@ public class I2PSnarkServlet extends DefaultServlet { ...@@ -1005,52 +1005,52 @@ public class I2PSnarkServlet extends DefaultServlet {
txt = _("Complete"); txt = _("Complete");
} }
if (curPeers > 0 && !showPeers) if (curPeers > 0 && !showPeers)
statusString = "<img border=\"0\" src=\"" + _imgPath + img + ".png\" title=\"" + txt + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + img + ".png\" title=\"" + txt + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + txt + "<td class=\"snarkTorrentStatus " + rowClass + "\">" + txt +
": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" + ": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" +
curPeers + thinsp(noThinsp) + curPeers + thinsp(noThinsp) +
ngettext("1 peer", "{0} peers", knownPeers) + "</a>"; ngettext("1 peer", "{0} peers", knownPeers) + "</a>";
else else
statusString = "<img border=\"0\" src=\"" + _imgPath + img + ".png\" title=\"" + txt + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + img + ".png\" title=\"" + txt + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + txt + "<td class=\"snarkTorrentStatus " + rowClass + "\">" + txt +
": " + curPeers + thinsp(noThinsp) + ": " + curPeers + thinsp(noThinsp) +
ngettext("1 peer", "{0} peers", knownPeers); ngettext("1 peer", "{0} peers", knownPeers);
} else { } else {
statusString = "<img border=\"0\" src=\"" + _imgPath + "complete.png\" title=\"" + _("Complete") + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "complete.png\" title=\"" + _("Complete") + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Complete"); "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Complete");
} }
} else { } else {
if (isRunning && curPeers > 0 && downBps > 0 && !showPeers) if (isRunning && curPeers > 0 && downBps > 0 && !showPeers)
statusString = "<img border=\"0\" src=\"" + _imgPath + "downloading.png\" title=\"" + _("OK") + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "downloading.png\" title=\"" + _("OK") + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("OK") + "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("OK") +
": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" + ": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" +
curPeers + thinsp(noThinsp) + curPeers + thinsp(noThinsp) +
ngettext("1 peer", "{0} peers", knownPeers) + "</a>"; ngettext("1 peer", "{0} peers", knownPeers) + "</a>";
else if (isRunning && curPeers > 0 && downBps > 0) else if (isRunning && curPeers > 0 && downBps > 0)
statusString = "<img border=\"0\" src=\"" + _imgPath + "downloading.png\" title=\"" + _("OK") + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "downloading.png\" title=\"" + _("OK") + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("OK") + "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("OK") +
": " + curPeers + thinsp(noThinsp) + ": " + curPeers + thinsp(noThinsp) +
ngettext("1 peer", "{0} peers", knownPeers); ngettext("1 peer", "{0} peers", knownPeers);
else if (isRunning && curPeers > 0 && !showPeers) else if (isRunning && curPeers > 0 && !showPeers)
statusString = "<img border=\"0\" src=\"" + _imgPath + "stalled.png\" title=\"" + _("Stalled") + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "stalled.png\" title=\"" + _("Stalled") + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Stalled") + "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Stalled") +
": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" + ": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" +
curPeers + thinsp(noThinsp) + curPeers + thinsp(noThinsp) +
ngettext("1 peer", "{0} peers", knownPeers) + "</a>"; ngettext("1 peer", "{0} peers", knownPeers) + "</a>";
else if (isRunning && curPeers > 0) else if (isRunning && curPeers > 0)
statusString = "<img border=\"0\" src=\"" + _imgPath + "stalled.png\" title=\"" + _("Stalled") + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "stalled.png\" title=\"" + _("Stalled") + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Stalled") + "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Stalled") +
": " + curPeers + thinsp(noThinsp) + ": " + curPeers + thinsp(noThinsp) +
ngettext("1 peer", "{0} peers", knownPeers); ngettext("1 peer", "{0} peers", knownPeers);
else if (isRunning && knownPeers > 0) else if (isRunning && knownPeers > 0)
statusString = "<img border=\"0\" src=\"" + _imgPath + "nopeers.png\" title=\"" + _("No Peers") + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "nopeers.png\" title=\"" + _("No Peers") + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("No Peers") + "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("No Peers") +
": 0" + thinsp(noThinsp) + knownPeers ; ": 0" + thinsp(noThinsp) + knownPeers ;
else if (isRunning) else if (isRunning)
statusString = "<img border=\"0\" src=\"" + _imgPath + "nopeers.png\" title=\"" + _("No Peers") + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "nopeers.png\" title=\"" + _("No Peers") + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("No Peers"); "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("No Peers");
else else
statusString = "<img border=\"0\" src=\"" + _imgPath + "stopped.png\" title=\"" + _("Stopped") + "\"></td>" + statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "stopped.png\" title=\"" + _("Stopped") + "\"></td>" +
"<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Stopped"); "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Stopped");
} }
...@@ -1098,7 +1098,7 @@ public class I2PSnarkServlet extends DefaultServlet { ...@@ -1098,7 +1098,7 @@ public class I2PSnarkServlet extends DefaultServlet {
else else
icon = "magnet"; icon = "magnet";
if (isValid) { if (isValid) {
out.write(toImg(icon, _("Info"))); out.write(toImg(icon));
out.write("</a>"); out.write("</a>");
} else { } else {
out.write(toImg(icon)); out.write(toImg(icon));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment