-
Notifications
You must be signed in to change notification settings - Fork 515
/
Copy pathjs_property_attributes.ejs
120 lines (117 loc) · 2.96 KB
/
js_property_attributes.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<%
// Generate a table of JavaScript object property's attributes
//
// Parameters:
//
// $0 - writable
// $1 - enumerable
// $2 - configurable
//
// {{js_property_attributes(1,1,0)}}
const isWritable = $0 == 1;
const isEnumerable = $1 == 1;
const isConfigurable = $2 == 1;
const text = mdn.localStringMap({
"de": {
header: `Eigenschaften der <code>${env.title}</code>-Property`,
writableName: "Schreibbar",
enumerableName: "Aufzählbar",
configurableName: "Konfigurierbar",
yes: "ja",
no: "nein"
},
"en-US": {
header: `Property attributes of <code>${env.title}</code>`,
writableName: "Writable",
enumerableName: "Enumerable",
configurableName: "Configurable",
yes: "yes",
no: "no"
},
"es": {
header: `Atributos de la propiedad <code>${env.title}</code>`,
writableName: "Sobrescribir",
enumerableName: "Numerable",
configurableName: "Configurable",
yes: "Sí",
no: "No"
},
"fr": {
header: `Attributs de <code>${env.title}</code>`,
writableName: "Écrivable",
enumerableName: "Énumérable",
configurableName: "Configurable",
yes: "Oui",
no: "Non"
},
"ja": {
header: `<code>${env.title}</code> のプロパティ属性`,
writableName: "書込可能",
enumerableName: "列挙可能",
configurableName: "設定可能",
yes: "可",
no: "不可"
},
"ko": {
header: 'Property attributes of <code>' + env.title + '</code>',
writable_name: '쓰기 가능',
enumerable_name: '열거 가능',
configurable_name: '설정 가능',
yes: '가능',
no: '불가능',
},
"pt-BR": {
header: `Property attributes of <code>${env.title}</code>`,
writableName: "Writable",
enumerableName: "Enumerable",
configurableName: "Configurable",
yes: "yes",
no: "no"
},
"ru": {
header: `Атрибуты свойства <code>${env.title}</code>`,
writableName: "Записываемое",
enumerableName: "Перечисляемое",
configurableName: "Настраиваемое",
yes: "да",
no: "нет"
},
"zh-CN": {
header: `<code>${env.title}</code> 的属性特性`,
writableName: "可写",
enumerableName: "可枚举",
configurableName: "可配置",
yes: "是",
no: "否"
},
"zh-TW": {
header: `<code>${env.title}</code> 的屬性特性`,
writableName: "可寫",
enumerableName: "可列舉",
configurableName: "可配置",
yes: "是",
no: "否"
}
})
%>
<table class="standard-table">
<thead>
<tr>
<th class="header" colspan="2"><%-text.header%></th>
</tr>
</thead>
<tbody>
<tr>
<td><%=text.writableName%></td>
<td><%=(isWritable ? text.yes : text.no)%></td>
</tr>
<tr>
<td><%=text.enumerableName%></td>
<td><%=(isEnumerable ? text.yes : text.no)%></td>
</tr>
<tr>
<td><%=text.configurableName%></td>
<td><%=(isConfigurable ? text.yes : text.no)%></td>
</tr>
</tbody>
</table>