Template:optionalGeneric

  • Revision slug: Template:optionalGeneric
  • Revision title: Template:optionalGeneric
  • Revision id: 296223
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment

Revision Content

<% /* * parameter 0: "inline" or "method" * parameter 1: string of indicator * parameter 2: string of heading */ var str = "Optional" + ($1 ? ' from Gecko ' + $1 : ''); switch(env.locale){ case 'zh-CN': str = "可选" + ($1 ? '试用于Gecko ' + $1 : ''); break; case 'zh-TW': str = ($1 ? '自 Gecko ' + $1 + '開始變為' : '') + "選擇性"; break; } var attr = ""; if ($1){ attr = template("geckoRelease", [$1]); } switch($0) { case 'inline': %><%- str %><% break; case 'method': %>
<%- str %>

<%= $2 %>

<% break; } %>

Revision Source

<%
/*
 * parameter 0: "inline" or "method"
 * parameter 1: string of indicator
 * parameter 2: string of heading
*/

var str = "Optional" + ($1 ? ' from Gecko ' + $1 : '');

switch(env.locale){
  case 'zh-CN':
    str = "可选" + ($1 ? '试用于Gecko ' + $1 : '');
    break;
  case 'zh-TW':
    str = ($1 ? '自 Gecko ' + $1 + '開始變為' : '') + "選擇性";
    break;
}

var attr = "";

if ($1){
  attr = template("geckoRelease", [$1]);
}

switch($0) {
    case 'inline':
        %><span title="<%=attr%>" class="optionalInline"><%- str %></span><%
    break;
    case 'method':
        %><div>
            <span title="<%=attr%>" class="optionalMethod"><%- str %></span>
            <h3><%= $2 %></h3>
        </div><%
    break;
}
%>
Revert to this revision