Template:bug

  • Revision slug: Template:bug
  • Revision title: Template:bug
  • Revision id: 59923
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment 6 words added, 2 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;
}
(web.text(bug + $0))
%>

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;
}
<a class="external" rel="external" target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=(web.text($0))">(web.text(bug + $0))</a>
%>
Revert to this revision