一键导入
system-translations
Use when adding localized strings in PHP or HTML, including gettext usage patterns and context-aware translation strings for Zolinga Intl.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when adding localized strings in PHP or HTML, including gettext usage patterns and context-aware translation strings for Zolinga Intl.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when creating or updating MCP resources — static files exposed to MCP clients via `resources/list` and `resources/read`. Covers `.meta.json` descriptors, URI rewriting, dynamic resources via `mcp:resources/list` event hook, and the `mcp-system` scheme.
Use when exposing an existing `origin: ["remote"]` listener as an MCP tool without rewriting the handler. Covers the one-line manifest pattern that re-uses the same class+method, plus the minimal schema work needed to satisfy `McpToolsListHandler::collectTools()`. Complements system-create-mcp-tool (which covers the greenfield case).
Use when exposing a Zolinga event handler as an MCP (Model Context Protocol) tool — i.e. a method clients can invoke via JSON-RPC `tools/call`. Covers handler class, manifest binding, JSON Schemas, the `Tools\CallEvent` contract, and the `schema.response` requirement enforced by `McpToolsListHandler::collectTools()`.
Use when working with the JavaScript client-side event system in Zolinga. Covers the Event class, Api gateway, dispatching events from JS to PHP, receiving broadcastBack responses, inter-component communication via BroadcastChannel, and web component integration.
Use when writing or reviewing PHP code in this repository to enforce strict typing, naming, file layout, and listener/service interface conventions.
Use when creating a new event handler/listener in a Zolinga module, including event naming, class placement, origin filtering, rights checks, and event object selection.
| name | system-translations |
| description | Use when adding localized strings in PHP or HTML, including gettext usage patterns and context-aware translation strings for Zolinga Intl. |
| argument-hint | <module-name> [string-scope] |
dgettext('<module-name>', '<string>') (or dngettext(...) for plural forms).locale/ folders manually.gettext attribute and related document translation metadata."\x04" separator (end of transmission character).dgettext('system-intl', "Confirm form submission\x04Send")
When the element's text content should be translated:
<h1 gettext="default:.#HASH">Heading Text</h1>
<p gettext="default:.#HASH">Paragraph text</p>
The . means "translate the element's text content". The #HASH is generated by bin/zolinga gettext:extract.
When only an attribute should be translated and the element has no direct text content:
<table gettext="default:aria-label#HASH" aria-label="Table description">
<input gettext="default:placeholder#HASH" placeholder="Enter text">
CRITICAL: Do NOT use . when the element has no direct text content unless it has more then one direct child elements. If it has exactly one direct child element, use the child element's gettext attribute instead.
When translating multiple attributes on the same element:
<div gettext="default:title#HASH1 default:aria-label#HASH2" title="Tooltip" aria-label="Label">
When translating the content attribute of a <meta> tag:
<meta name="description" gettext="default:content" content="Description text">
<meta name="page.topic" gettext="default:content" content="Topic text">
Use gettext="default:content" (no hash needed for content attributes on meta tags).
When translating custom data-* attributes:
<div gettext="default:data-providers#HASH default:data-source#HASH"
data-providers="Provider list"
data-source="Source description">
WRONG - Element has no direct content but uses .:
<table gettext="default:.#HASH default:aria-label#HASH2" aria-label="...">
CORRECT - Only list attributes when no direct content:
<table gettext="default:aria-label#HASH" aria-label="...">
WRONG - meta tag uses . instead of content:
<meta name="description" gettext="default:." content="...">
CORRECT - meta tag uses content:
<meta name="description" gettext="default:content" content="...">
gettext attributes with appropriate format (see above)bin/zolinga gettext:extract --domains=<domain> to generate/update .po files and add hashes.po files in modules/{module}/locale/ or data/zolinga-intl/default/locale/bin/zolinga gettext:compile --all to compile .mo filesmodules/zolinga-intl/wiki/Zolinga Intl.md — primary translation documentationsystem/wiki/Zolinga Core/Running the System.mdsystem/wiki/Zolinga Core/Running the System/Page Request.mdsystem/wiki/Zolinga Core/Running the System/Page Request/Processing Page Content.mdsystem/wiki/ref/event/system/content.mdsystem/wiki/Zolinga Core/WIKI.md