Template:bug

  • Revision slug: Template:bug
  • Revision title: Template:bug
  • Revision id: 322661
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment

Revision Content

<% var bugPageURL = 'https://bugzilla.mozilla.org/show_bug.cgi?id=' + $0; var s = ""; /*TODO: Enable after Bug 765642 is fixed. var bugPageXML = web.xml(bugPageURL); if (#bugPageXML == 0) { s = "Unable to access bug's page. Try reloading this page to see bug's status and summary in this tooltip."; } else { s = xml.text(bugPageXML, '//span[@id="static_bug_status"]'); if (s){ // Remove \n and redundant spaces s = string.trimEnd(string.replace(s, "\n", "")); if (string.contains(s, " ")) s = string.join(list.select(string.split(s, " "), "#$>0"), " "); s += ' - ' + xml.text(bugPageXML, '//span[@id="short_desc_nonedit_display"]'); } else if (string.contains(bugPageXML, "Access Denied")) s = "The access to the bug's page is restricted."; } */ var s_bug = mdn.localString({ "en-US": "bug", "ca" : "errada", "cs" : "chyba", "pl" : "błąd" }); %> <%=s_bug%> <%=$0%>

Revision Source

<%
var bugPageURL = 'https://bugzilla.mozilla.org/show_bug.cgi?id=' + $0;
var s = "";
/*TODO: Enable after Bug 765642 is fixed.
var bugPageXML = web.xml(bugPageURL);
if (#bugPageXML == 0) {
  s = "Unable to access bug's page. Try reloading this page to see bug's status and summary in this tooltip.";
} else {
  s = xml.text(bugPageXML, '//span[@id="static_bug_status"]');
  if (s){
    // Remove \n and redundant spaces
    s = string.trimEnd(string.replace(s, "\n", ""));
    if (string.contains(s, "  "))
      s = string.join(list.select(string.split(s, " "), "#$>0"), " ");
    s += ' - ' + xml.text(bugPageXML, '//span[@id="short_desc_nonedit_display"]');
  }
  else if (string.contains(bugPageXML, "Access Denied"))
    s = "The access to the bug's page is restricted.";
}
*/
var s_bug = mdn.localString({
    "en-US": "bug", 
    "ca"   : "errada", 
    "cs"   : "chyba", 
    "pl"   : "błąd"
});
%>
<a rel="external" href="<%=bugPageURL%>" rel="external" title="<%=s%>"><%=s_bug%>&nbsp;<%=$0%></a>
Revert to this revision