uhjee/vue-i18n-mcp-server
If you are the rightful owner of vue-i18n-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Vue I18n MCP Server is a tool designed to automate the conversion of Korean text in Vue.js files to i18n keys, fully compatible with GitHub Copilot Agent Mode.
π Vue I18n MCP Server
GitHub Copilot Agent Modeμ μμ νΈνλλ Vue.js λ€κ΅μ΄ μλν λꡬμ λλ€.
π μ΄ λκ΅¬κ° νλ μΌ
Vue νμΌμμ νκΈ ν μ€νΈλ₯Ό μλμΌλ‘ μ°Ύμμ i18n ν€λ‘ λ³νν΄μ£Όλ MCP μλ²μ λλ€.
Before (λ³ν μ ):
<template>
<h1>μ¬μ©μ νλ‘ν</h1>
<button>μ μ₯</button>
</template>
After (λ³ν ν):
<template>
<h1>{{ $localeMessage('WATCHALL.WORD.USER_PROFILE') }}</h1>
<button>{{ $localeMessage('WATCHALL.WORD.SAVE') }}</button>
</template>
π λΉ λ₯Έ μμ
1. μ€μΉ λ° λΉλ
# μμ‘΄μ± μ€μΉ
npm install
# TypeScript λΉλ
npm run build
2. VS Code MCP μ€μ (μ΅μ λ°©μ)
λ°©λ² 1: μν¬μ€νμ΄μ€ μ€μ (κΆμ₯)
Vue νλ‘μ νΈ λ£¨νΈμ .vscode/mcp.json
νμΌμ μμ±νκ³ λ€μ λ΄μ©μ μΆκ°νμΈμ:
{
// π‘ μ
λ ₯κ°λ€μ μλ² μ²« μμ μ ν둬ννΈλλ©°, VS Codeμ μμ νκ² μ μ₯λ©λλ€.
"inputs": [
{
"type": "promptString",
"id": "project-root",
"description": "νλ‘μ νΈ λ£¨νΈ κ²½λ‘",
"password": false
},
{
"type": "promptString",
"id": "locales-path",
"description": "λ²μ νμΌ λλ ν 리 κ²½λ‘ (νλ‘μ νΈ λ£¨νΈ κΈ°μ€ μλκ²½λ‘)",
"password": false
}
],
"servers": {
"vueI18nAutomation": {
"type": "stdio",
"command": "node",
"args": [
"/μ λκ²½λ‘/vue-i18n-mcp-server/dist/src/index.js"
],
"env": {
"PROJECT_ROOT": "${input:project-root}",
"LOCALES_PATH": "${input:locales-path}",
"I18N_FUNCTION_TYPE": "VUE_I18N_WATCHALL"
}
}
}
}
μ€μ: /μ λκ²½λ‘/vue-i18n-mcp-server/dist/src/index.js
λ₯Ό μ€μ κ²½λ‘λ‘ λ³κ²½νμΈμ.
λ°©λ² 2: μ¬μ©μ μ€μ
VS Code μ€μ (settings.json
)μ μΆκ°:
{
"mcp": {
"servers": {
"vueI18nAutomation": {
"type": "stdio",
"command": "node",
"args": ["/μ λκ²½λ‘/vue-i18n-mcp-server/dist/src/index.js"],
"env": {
"PROJECT_ROOT": "/your/project/path",
"LOCALES_PATH": "src/locales",
"I18N_FUNCTION_TYPE": "VUE_I18N_WATCHALL"
}
}
}
}
}
3. VS Codeμμ MCP νμ±ν
- MCP κΈ°λ₯ νμ±ν: VS Code μ€μ μμ
chat.mcp.enabled
λ₯Όtrue
λ‘ μ€μ - μλ² μμ:
.vscode/mcp.json
νμΌμμ Start λ²νΌ ν΄λ¦ - μλ² μν νμΈ: Command Paletteμμ MCP: List Servers μ€ν
4. Copilot Chatμμ μ¬μ©
- Copilot Chat μ΄κΈ°:
Ctrl+Alt+I
(Windows/Linux) λλββI
(Mac) - Agent λͺ¨λ μ ν: μ±ν λ°μ€μμ Agent μ ν
- λꡬ νμΈ: Tools λ²νΌμ ν΄λ¦νμ¬ Vue i18n λκ΅¬κ° νμ±νλμ΄ μλμ§ νμΈ
- μ¬μ© μμ:
Vue νμΌμμ νκΈ ν
μ€νΈλ₯Ό μ°Ύμμ i18nμΌλ‘ λ³νν΄μ€
Windows μ¬μ©μ μ£Όμμ¬ν:
- PowerShell λλ Command Promptμμ μ€ννμΈμ
- κ²½λ‘μ νκΈμ΄ ν¬ν¨λ κ²½μ° λ¬Έμ κ° λ°μν μ μμΌλ μλ¬Έ κ²½λ‘λ₯Ό μ¬μ©νμΈμ
- Git Bash μ¬μ© μ κ²½λ‘ κ΅¬λΆμ λ¬Έμ κ° μμ μ μμΌλ PowerShell μ¬μ©μ κΆμ₯ν©λλ€
π― μ€μ μ¬μ© μμ
μ λ ₯ (Vue νμΌ)
<template>
<div>
<h1>λ‘κ·ΈμΈ</h1>
<input placeholder="μμ΄λ" />
<button>λΉλ°λ²νΈ μ°ΎκΈ°</button>
</div>
</template>
μΆλ ₯ (Copilot λΆμ κ²°κ³Ό)
π λΆμ κ²°κ³Ό
- λ°κ²¬λ νκΈ: 3κ°
- λ§€μΉλ λ²μ: 3κ° (100%)
β
λ§€μΉλ λ²μ:
1. "λ‘κ·ΈμΈ" β WATCHALL.WORD.LOGIN
2. "μμ΄λ" β WATCHALL.WORD.ID
3. "λΉλ°λ²νΈ μ°ΎκΈ°" β [WATCHALL.WORD.PASSWORD, WATCHALL.WORD.FIND]
π λ³ν μμ:
- {{ $localeMessage('WATCHALL.WORD.LOGIN') }}
- {{ $localeMessage('WATCHALL.WORD.ID') }}
- {{ $localeMessage(['WATCHALL.WORD.PASSWORD', 'WATCHALL.WORD.FIND']) }}
π νμ νμΌ κ΅¬μ‘°
MCP μλ²κ° μλνλ €λ©΄ Vue νλ‘μ νΈμ μΈμ΄ νμΌμ΄ μμ΄μΌ ν©λλ€:
your-vue-project/
βββ src/
β βββ locales/ π LOCALES_PATHμμ μ§μ ν ν΄λ
β βββ ko.js π νκΈ λ²μ νμΌ
β βββ en.js π μλ¬Έ λ²μ νμΌ
βββ .vscode/
βββ mcp.json π MCP μ€μ νμΌ (μλ‘μ΄ λ°©μ)
ko.js μμ:
export default {
WATCHALL: {
WORD: {
LOGIN: 'λ‘κ·ΈμΈ',
ID: 'μμ΄λ',
PASSWORD: 'λΉλ°λ²νΈ',
FIND: 'μ°ΎκΈ°'
}
}
};
en.js μμ:
export default {
WATCHALL: {
WORD: {
LOGIN: 'Login',
ID: 'ID',
PASSWORD: 'Password',
FIND: 'Find'
}
}
};
βοΈ κ³ κΈ μ€μ
i18n ν¨μ 컀μ€ν°λ§μ΄μ§
I18N_FUNCTION_TYPE
νκ²½λ³μλ‘ μ¬μ©ν ν¨μλ₯Ό λ³κ²½ν μ μμ΅λλ€:
μ€μ κ° | Template | Script | JavaScript |
---|---|---|---|
VUE_I18N_WATCHALL | $localeMessage | this.$localeMessage | i18n.localeMessage |
DEFAULT | $t | this.$t | i18n.t |
VUE_I18N_COMPOSABLE | t | t | i18n.global.t |
μ λ ₯ λ³μ νμ©
μ΅μ MCP μ€μ μμλ inputs
μΉμ
μ ν΅ν΄ μμ νκ² μ€μ κ°μ κ΄λ¦¬ν μ μμ΅λλ€:
- νλ‘μ νΈ λ£¨νΈ: μλ² μ²« μμ μ ν둬ννΈλ‘ μ λ ₯λ°μ VS Codeμ μμ νκ² μ μ₯
- λ²μ νμΌ κ²½λ‘: νλ‘μ νΈλ³λ‘ λ€λ₯Έ κ²½λ‘ μ€μ κ°λ₯
- 보μ: λ―Όκ°ν μ 보λ
"password": true
μ΅μ μΌλ‘ μ¨κΉ μ²λ¦¬ κ°λ₯
μλ νμ§ κΈ°λ₯
MCP μλ²λ λ€μκ³Ό κ°μ μλ νμ§ κΈ°λ₯μ μ 곡ν©λλ€:
- Claude Desktop μ€μ μλ λ°κ²¬:
chat.mcp.discovery.enabled
μ€μ μΌλ‘ κΈ°μ‘΄ Claude μ€μ μ¬μ¬μ© - μν¬μ€νμ΄μ€ ν΄λ μλ μ λ¬: VS Codeκ° νμ¬ μν¬μ€νμ΄μ€ μ 보λ₯Ό μλ²μ μλ μ λ¬
- νμΌ μμ μκ° κΈ°λ° μΊμ±: λ²μ νμΌμ΄ λ³κ²½λ κ²½μ°μλ§ λ€μ λ‘λ
π§ͺ ν μ€νΈ
π ν μ€νΈ ꡬ쑰
π― ν΅μ¬ ν μ€νΈ
test-namespace-fix.js
- ν€ λ€μμ€νμ΄μ€ μλ μ κ·ν ν μ€νΈ- AIκ° μλͺ»λ μ λμ¬ μμ± μ μλ μμ νμΈ
LOGIN.SIGNUP
βWATCHALL.WORD.SIGNUP
λ³ν
π μ’ ν© ν μ€νΈ
tests/test-comprehensive-i18n.js
- μ 체 μμ€ν ν΅ν© ν μ€νΈ- λμ©λ μ€μ λ²μ νμΌ ν μ€νΈ
- 91.7% λ§€μΉ μ±κ³΅λ₯ λ¬μ±
π ν μ€νΈ λ°μ΄ν°
tests/sample-files/
- ν μ€νΈμ© λ²μ νμΌko.js
- νκ΅μ΄ λ²μ λ°μ΄ν°en.js
- μμ΄ λ²μ λ°μ΄ν°
π ν μ€νΈ μ€ν
# ν΅μ¬ ν
μ€νΈ μ€ν
node test-namespace-fix.js
# μ’
ν© ν
μ€νΈ μ€ν
node tests/test-comprehensive-i18n.js
# νλ‘μ νΈ λΉλ (ν
μ€νΈ μ νμ)
npm run build
β ν μ€νΈ μ±κ³Ό
- λ¬Έμ₯ νν°λ§: 100% μ νλ
- ν€ λ€μμ€νμ΄μ€ μ κ·ν: 100% μ±κ³΅λ₯
- νμΌ μ λ°μ΄νΈ: WATCHALL.WORD μΉμ μ νν μ½μ
- λ²μ λ§€μΉ: 91.7% μ±κ³΅λ₯ (λμ©λ μ€μ λ°μ΄ν°)
π κ°λ°
π λΌμ΄μ μ€
MIT License
π€ κΈ°μ¬
μ΄μ 리ν¬νΈλ ν 리νμ€νΈλ₯Ό νμν©λλ€!