Changeset 7f18d25


Ignore:
Timestamp:
Jul 23, 2012 9:49:30 PM (9 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
c61a185, e2aa2af
Parents:
c145e426
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java

    rc145e426 r7f18d25  
    973973        if (err != null) {
    974974            if (isRunning && curPeers > 0 && !showPeers)
    975                 statusString = "<img border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" +
     975                statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" +
    976976                               "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Tracker Error") +
    977977                               ": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" +
     
    979979                               ngettext("1 peer", "{0} peers", knownPeers) + "</a>";
    980980            else if (isRunning)
    981                 statusString = "<img border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" +
     981                statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" +
    982982                               "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Tracker Error") +
    983983                               ": " + curPeers + thinsp(noThinsp) +
     
    986986                if (err.length() > MAX_DISPLAYED_ERROR_LENGTH)
    987987                    err = err.substring(0, MAX_DISPLAYED_ERROR_LENGTH) + "&hellip;";
    988                 statusString = "<img border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" +
     988                statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" +
    989989                               "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Tracker Error");
    990990            }
    991991        } else if (snark.isStarting()) {
    992             statusString = "<img border=\"0\" src=\"" + _imgPath + "stalled.png\" title=\"" + _("Starting") + "\"></td>" +
     992            statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "stalled.png\" title=\"" + _("Starting") + "\"></td>" +
    993993                           "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Starting");
    994994        } else if (remaining == 0 || needed == 0) {  // < 0 means no meta size yet
     
    10061006                }
    10071007                if (curPeers > 0 && !showPeers)
    1008                     statusString = "<img border=\"0\" src=\"" + _imgPath + img + ".png\" title=\"" + txt + "\"></td>" +
     1008                    statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + img + ".png\" title=\"" + txt + "\"></td>" +
    10091009                               "<td class=\"snarkTorrentStatus " + rowClass + "\">" + txt +
    10101010                               ": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" +
     
    10121012                               ngettext("1 peer", "{0} peers", knownPeers) + "</a>";
    10131013                else
    1014                     statusString = "<img border=\"0\" src=\"" + _imgPath + img + ".png\" title=\"" + txt + "\"></td>" +
     1014                    statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + img + ".png\" title=\"" + txt + "\"></td>" +
    10151015                               "<td class=\"snarkTorrentStatus " + rowClass + "\">" + txt +
    10161016                               ": " + curPeers + thinsp(noThinsp) +
    10171017                               ngettext("1 peer", "{0} peers", knownPeers);
    10181018            } else {
    1019                 statusString = "<img border=\"0\" src=\"" + _imgPath + "complete.png\" title=\"" + _("Complete") + "\"></td>" +
     1019                statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "complete.png\" title=\"" + _("Complete") + "\"></td>" +
    10201020                               "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Complete");
    10211021            }
    10221022        } else {
    10231023            if (isRunning && curPeers > 0 && downBps > 0 && !showPeers)
    1024                 statusString = "<img border=\"0\" src=\"" + _imgPath + "downloading.png\" title=\"" + _("OK") + "\"></td>" +
     1024                statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "downloading.png\" title=\"" + _("OK") + "\"></td>" +
    10251025                               "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("OK") +
    10261026                               ": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" +
     
    10281028                               ngettext("1 peer", "{0} peers", knownPeers) + "</a>";
    10291029            else if (isRunning && curPeers > 0 && downBps > 0)
    1030                 statusString = "<img border=\"0\" src=\"" + _imgPath + "downloading.png\" title=\"" + _("OK") + "\"></td>" +
     1030                statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "downloading.png\" title=\"" + _("OK") + "\"></td>" +
    10311031                               "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("OK") +
    10321032                               ": " + curPeers + thinsp(noThinsp) +
    10331033                               ngettext("1 peer", "{0} peers", knownPeers);
    10341034            else if (isRunning && curPeers > 0 && !showPeers)
    1035                 statusString = "<img border=\"0\" src=\"" + _imgPath + "stalled.png\" title=\"" + _("Stalled") + "\"></td>" +
     1035                statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "stalled.png\" title=\"" + _("Stalled") + "\"></td>" +
    10361036                               "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Stalled") +
    10371037                               ": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" +
     
    10391039                               ngettext("1 peer", "{0} peers", knownPeers) + "</a>";
    10401040            else if (isRunning && curPeers > 0)
    1041                 statusString = "<img border=\"0\" src=\"" + _imgPath + "stalled.png\" title=\"" + _("Stalled") + "\"></td>" +
     1041                statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "stalled.png\" title=\"" + _("Stalled") + "\"></td>" +
    10421042                               "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Stalled") +
    10431043                               ": " + curPeers + thinsp(noThinsp) +
    10441044                               ngettext("1 peer", "{0} peers", knownPeers);
    10451045            else if (isRunning && knownPeers > 0)
    1046                 statusString = "<img border=\"0\" src=\"" + _imgPath + "nopeers.png\" title=\"" + _("No Peers") + "\"></td>" +
     1046                statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "nopeers.png\" title=\"" + _("No Peers") + "\"></td>" +
    10471047                               "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("No Peers") +
    10481048                               ": 0" + thinsp(noThinsp) + knownPeers ;
    10491049            else if (isRunning)
    1050                 statusString = "<img border=\"0\" src=\"" + _imgPath + "nopeers.png\" title=\"" + _("No Peers") + "\"></td>" +
     1050                statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "nopeers.png\" title=\"" + _("No Peers") + "\"></td>" +
    10511051                               "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("No Peers");
    10521052            else
    1053                 statusString = "<img border=\"0\" src=\"" + _imgPath + "stopped.png\" title=\"" + _("Stopped") + "\"></td>" +
     1053                statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "stopped.png\" title=\"" + _("Stopped") + "\"></td>" +
    10541054                               "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Stopped");
    10551055        }
     
    10991099            icon = "magnet";
    11001100        if (isValid) {
    1101             out.write(toImg(icon, _("Info")));
     1101            out.write(toImg(icon));
    11021102            out.write("</a>");
    11031103        } else {
Note: See TracChangeset for help on using the changeset viewer.