Template:optionalGeneric

  • Revision slug: Template:optionalGeneric
  • Revision title: Template:optionalGeneric
  • Revision id: 298268
  • 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; default: break; } var attr = ""; if ($1) attr = template("geckoRelease", [$1]); switch($0) { case 'inline': %><%- str %><% break; case 'method': %>
<%- str %>

<%= $2 %>

<% break; default : %><%- str %><% 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;
    default: break;
}

var attr = "";

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

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