{group.pkg}{text.apiPageGroup}components{text.apiCanvasGroup}{text.apiCanvasNote}
+ {canvasGroups.map(group =>{type.name}{synopsis}
} + {type.fields && type.fields.length > 0 &&| {text.apiField} | {text.apiType} | {text.apiDescription} |
|---|---|---|
{field.name} |
+ {(() => {
+ const href = typeHref(data, group.pkg, field.type, locale);
+ return href ? {field.type} : {field.type};
+ })()} |
+
| {text.apiMethods} | {text.apiSignature} | {text.apiDescription} |
|---|---|---|
{method.name} |
+ {method.signature ?? method.name} |
+
{text.apiFunctions}
+| {text.apiFunctions} | {text.apiSignature} | {text.apiDescription} |
|---|---|---|
{func.name} |
+ {func.signature ?? func.name} |
+
{part.text} : part.italic ? {part.text} : part.text;
+ return part.href ? {content} : content;
+})}
diff --git a/website/src/lib/api-zh.ts b/website/src/lib/api-zh.ts
new file mode 100644
index 00000000..d36b966b
--- /dev/null
+++ b/website/src/lib/api-zh.ts
@@ -0,0 +1,66 @@
+// Chinese descriptions for the API tables on component pages. The Go doc
+// comments remain the English source of truth and fill any key missing here;
+// this dictionary only translates the pages that have tables today. Keys are
+// "package.Symbol" for a type or function, and "package.Symbol.Field" or
+// "package.Symbol.Method" for one row.
+export const apiZh: Record{section.Text}
{section.Items && section.Items.length > 0 &&{text.keyboardIntro}