Template:bug

  • Revision slug: Template:bug
  • Revision title: Template:bug
  • Revision id: 59927
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment simplifications; 5 words added, 12 words removed

Revision Content

/* get the page language */

var u = uri.parts(Page.uri);
var lang = string.tolower(u.path[0]);
if (string.contains(lang, "project") || string.contains(lang, "Project")) {
  lang = string.substr(lang, 8);
}
/* fall back to page.language on a user page */
else if (string.StartsWith(lang, "user:")) {
 lang = page.language;
}

var bug = " bug ";

switch(lang) {
  case 'ca':
    bug = " errada ";
    break;
  case 'cs':
    bug = " chyba ";
    break;
  case 'pl':
    bug = " błąd ";
    break;
}
var link = 'https://bugzilla.mozilla.org/show_bug.cgi?id=' + $0;
var linktext = bug + $0;

(linktext)

%>

Revision Source

<pre class="script">
/* get the page language */

var u = uri.parts(Page.uri);
var lang = string.tolower(u.path[0]);
if (string.contains(lang, "project") || string.contains(lang, "Project")) {
  lang = string.substr(lang, 8);
}
/* fall back to page.language on a user page */
else if (string.StartsWith(lang, "user:")) {
 lang = page.language;
}

var bug = " bug ";

switch(lang) {
  case 'ca':
    bug = " errada ";
    break;
  case 'cs':
    bug = " chyba ";
    break;
  case 'pl':
    bug = " błąd ";
    break;
}
var link = 'https://bugzilla.mozilla.org/show_bug.cgi?id=' + $0;
var linktext = bug + $0;

<a rel="external" href=(link) class="external">(linktext)</a>

%>
Revert to this revision