Node.js + TypeScript MCP 서버 구현: - 5개 도구: inspect_page, inspect_site, get_inspection, get_issues, get_history - 듀얼 트랜스포트: stdio (Claude Desktop) + Streamable HTTP (Docker/원격) - i18n 지원 (영어/한국어) - Docker 통합 (port 3100) + Nginx /mcp 프록시 - Smithery 레지스트리 배포 설정 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
566 B
JavaScript
18 lines
566 B
JavaScript
import { en } from "./en.js";
|
|
import { ko } from "./ko.js";
|
|
const messages = { en, ko };
|
|
/**
|
|
* Translate a key with optional interpolation.
|
|
* Usage: t("inspect_page.description", "ko")
|
|
* t("result.title", "en", { url: "..." })
|
|
*/
|
|
export function t(key, lang, params) {
|
|
let text = messages[lang]?.[key] || messages["en"]?.[key] || key;
|
|
if (params) {
|
|
for (const [k, v] of Object.entries(params)) {
|
|
text = text.replace(new RegExp(`\\{${k}\\}`, "g"), String(v));
|
|
}
|
|
}
|
|
return text;
|
|
}
|
|
//# sourceMappingURL=index.js.map
|