mozilla

Revision 233545 of Template:unimplemented inline

  • Revision slug: Template:Unimplemented_inline
  • Revision title: Template:unimplemented inline
  • Revision id: 233545
  • Created:
  • Creator: FreakCERS
  • Is current revision? No
  • Comment border was hard to see, made it look less tall than similar boxes (obsolete, deprecated, etc); 3 words added, 3 words removed
Tags: 

Revision Content

/* optional parameter: bug number */
/* 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 str = "Unimplemented";
var see = "see";
 
switch(lang) {
  case 'fr':
    str = "Non implémenté";
    break;
  case 'de':
    str = "Nicht implementiert";
    see = "siehe";
    break;
  case 'ja':
    str = "未実装";
    see = "参照";
    break;
  case 'es':
    str = "No implementado";
    see = "mira";
    break;
}

if ($0) {
  str = str + " (" + see + bug($0) + ")";
}

(web.html(str))

unimplemented_inline()

Revision Source

<pre class="script">
/* optional parameter: bug number */
/* 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 str = "Unimplemented";
var see = "see";
 
switch(lang) {
  case 'fr':
    str = "Non implémenté";
    break;
  case 'de':
    str = "Nicht implementiert";
    see = "siehe";
    break;
  case 'ja':
    str = "未実装";
    see = "参照";
    break;
  case 'es':
    str = "No implementado";
    see = "mira";
    break;
}

if ($0) {
  str = str + " (" + see + bug($0) + ")";
}

<span class="unimplementedInlineTemplate" style="border: 1px solid rgb(246, 111, 111); background-color: rgb(255, 153, 204); font-size: x-small; white-space: nowrap; padding: 2px;">(web.html(str))</span>
</pre>
<p class="noinclude"><span class="script">unimplemented_inline()</span></p>