@intlayer/docs 8.9.4-canary.0 → 8.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generated/docs.entry.cjs +20 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +20 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +1 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/mcp_server.md +30 -17
- package/docs/ar/plugins/sync-po.md +354 -0
- package/docs/de/mcp_server.md +29 -16
- package/docs/de/plugins/sync-po.md +354 -0
- package/docs/en/mcp_server.md +31 -18
- package/docs/en/plugins/sync-po.md +354 -0
- package/docs/en-GB/mcp_server.md +31 -18
- package/docs/en-GB/plugins/sync-po.md +354 -0
- package/docs/es/mcp_server.md +30 -17
- package/docs/es/plugins/sync-po.md +354 -0
- package/docs/fr/mcp_server.md +30 -17
- package/docs/fr/plugins/sync-po.md +354 -0
- package/docs/hi/mcp_server.md +31 -18
- package/docs/hi/plugins/sync-po.md +354 -0
- package/docs/id/mcp_server.md +30 -17
- package/docs/id/plugins/sync-po.md +354 -0
- package/docs/it/mcp_server.md +30 -17
- package/docs/it/plugins/sync-po.md +354 -0
- package/docs/ja/mcp_server.md +29 -16
- package/docs/ja/plugins/sync-po.md +354 -0
- package/docs/ko/mcp_server.md +31 -18
- package/docs/ko/plugins/sync-po.md +354 -0
- package/docs/pl/mcp_server.md +30 -17
- package/docs/pl/plugins/sync-po.md +354 -0
- package/docs/pt/mcp_server.md +30 -17
- package/docs/pt/plugins/sync-po.md +354 -0
- package/docs/ru/mcp_server.md +30 -17
- package/docs/ru/plugins/sync-po.md +354 -0
- package/docs/tr/mcp_server.md +31 -18
- package/docs/tr/plugins/sync-po.md +354 -0
- package/docs/uk/mcp_server.md +29 -16
- package/docs/uk/plugins/sync-po.md +354 -0
- package/docs/vi/mcp_server.md +30 -17
- package/docs/vi/plugins/sync-po.md +354 -0
- package/docs/zh/mcp_server.md +31 -18
- package/docs/zh/plugins/sync-po.md +354 -0
- package/package.json +6 -6
- package/src/generated/docs.entry.ts +20 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-05-10
|
|
3
|
+
updatedAt: 2026-05-10
|
|
4
|
+
title: Plugin Sync PO
|
|
5
|
+
description: Sincronizza i dizionari Intlayer con i file Gettext PO. Mantieni la tua i18n esistente utilizzando Intlayer per gestire, tradurre e testare i tuoi messaggi.
|
|
6
|
+
keywords:
|
|
7
|
+
- Intlayer
|
|
8
|
+
- Sync PO
|
|
9
|
+
- Gettext
|
|
10
|
+
- i18n
|
|
11
|
+
- traduzioni
|
|
12
|
+
slugs:
|
|
13
|
+
- doc
|
|
14
|
+
- plugin
|
|
15
|
+
- sync-po
|
|
16
|
+
youtubeVideo: https://www.youtube.com/watch?v=MpGMxniDHNg
|
|
17
|
+
history:
|
|
18
|
+
- version: 8.9.4
|
|
19
|
+
date: 2026-05-10
|
|
20
|
+
changes: "Documentazione iniziale del plugin Sync PO"
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Sync PO (ponti i18n) - Sync PO con supporto ICU / i18next
|
|
24
|
+
|
|
25
|
+
Usa Intlayer come componente aggiuntivo per il tuo stack i18n esistente. Questo plugin mantiene i tuoi messaggi Gettext PO sincronizzati con i dizionari Intlayer in modo da poter:
|
|
26
|
+
|
|
27
|
+
- Mantenere il tuo attuale workflow di traduzione basato su PO.
|
|
28
|
+
- Gestire e tradurre i tuoi messaggi con Intlayer (CLI, CI, provider, CMS), senza rifattorizzare la tua app.
|
|
29
|
+
- Distribuire tutorial e contenuti SEO mirati a ciascun ecosistema, suggerendo Intlayer come livello di gestione PO.
|
|
30
|
+
|
|
31
|
+
Note e ambito attuale:
|
|
32
|
+
|
|
33
|
+
- L'esternalizzazione al CMS funziona per le traduzioni e il testo classico.
|
|
34
|
+
- Non c'è ancora supporto per inserimenti, plurali/ICU o funzionalità avanzate di runtime di altre librerie all'interno delle voci PO stesse.
|
|
35
|
+
- L'editor visuale non è ancora supportato per gli output i18n di terze parti.
|
|
36
|
+
|
|
37
|
+
### Quando usare questo plugin
|
|
38
|
+
|
|
39
|
+
- Usi già i file Gettext PO per le tue traduzioni.
|
|
40
|
+
- Desideri il riempimento assistito da IA, i test in CI e le operazioni sui contenuti senza modificare il runtime di rendering.
|
|
41
|
+
|
|
42
|
+
## Installazione
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pnpm add -D @intlayer/sync-po-plugin
|
|
46
|
+
# oppure
|
|
47
|
+
npm i -D @intlayer/sync-po-plugin
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Plugin
|
|
51
|
+
|
|
52
|
+
Questo pacchetto fornisce due plugin:
|
|
53
|
+
|
|
54
|
+
- `loadPO`: Carica i file PO nei dizionari Intlayer.
|
|
55
|
+
- Questo plugin viene utilizzato per caricare file PO da una sorgente e verranno inseriti nei dizionari Intlayer. Può scansionare l'intera base di codice e cercare file PO specifici.
|
|
56
|
+
Questo plugin può essere utilizzato:
|
|
57
|
+
- se utilizzi una libreria i18n che impone una posizione specifica per il caricamento dei tuoi file PO, ma vuoi posizionare la tua dichiarazione di contenuto dove preferisci nella tua base di codice.
|
|
58
|
+
- Può essere utilizzato anche se vuoi recuperare i tuoi messaggi da una sorgente remota (es: un CMS, un'API, ecc.) e memorizzare i tuoi messaggi in file PO.
|
|
59
|
+
|
|
60
|
+
> Sotto il cofano, questo plugin scansionerà tutta la base di codice, cercherà file PO specifici e li caricherà nei dizionari Intlayer.
|
|
61
|
+
> Nota che questo plugin non scriverà l'output e le traduzioni nei file PO.
|
|
62
|
+
|
|
63
|
+
- `syncPO`: Sincronizza i file PO con i dizionari Intlayer.
|
|
64
|
+
- Questo plugin viene utilizzato per sincronizzare i file PO con i dizionari Intlayer. Può scansionare la posizione specificata e caricare i PO che corrispondono al pattern per file PO specifici. Questo plugin è utile se vuoi ottenere i vantaggi di Intlayer utilizzando un'altra libreria i18n.
|
|
65
|
+
|
|
66
|
+
## Utilizzo di entrambi i plugin
|
|
67
|
+
|
|
68
|
+
```ts fileName="intlayer.config.ts"
|
|
69
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
70
|
+
import { loadPO, syncPO } from "@intlayer/sync-po-plugin";
|
|
71
|
+
|
|
72
|
+
const config: IntlayerConfig = {
|
|
73
|
+
internationalization: {
|
|
74
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
75
|
+
defaultLocale: Locales.ENGLISH,
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
// Mantieni i tuoi attuali file PO sincronizzati con i dizionari Intlayer
|
|
79
|
+
plugins: [
|
|
80
|
+
/**
|
|
81
|
+
* Caricherà tutti i file PO in src che corrispondono al pattern {key}.i18n.po
|
|
82
|
+
*/
|
|
83
|
+
loadPO({
|
|
84
|
+
source: ({ key }) => `./src/**/${key}.i18n.po`,
|
|
85
|
+
locale: Locales.ENGLISH,
|
|
86
|
+
priority: 1, // Assicura che questi file PO abbiano la precedenza sui file in `./locales/en/${key}.po`
|
|
87
|
+
}),
|
|
88
|
+
/**
|
|
89
|
+
* Caricherà e scriverà l'output e le traduzioni nei file PO nella directory locales
|
|
90
|
+
*/
|
|
91
|
+
syncPO({
|
|
92
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
93
|
+
priority: 0,
|
|
94
|
+
}),
|
|
95
|
+
],
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export default config;
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Plugin `syncPO`
|
|
102
|
+
|
|
103
|
+
### Avvio rapido
|
|
104
|
+
|
|
105
|
+
Aggiungi il plugin al tuo `intlayer.config.ts` e puntalo alla tua struttura PO esistente.
|
|
106
|
+
|
|
107
|
+
```ts fileName="intlayer.config.ts"
|
|
108
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
109
|
+
import { syncPO } from "@intlayer/sync-po-plugin";
|
|
110
|
+
|
|
111
|
+
const config: IntlayerConfig = {
|
|
112
|
+
internationalization: {
|
|
113
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
114
|
+
defaultLocale: Locales.ENGLISH,
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
// Mantieni i tuoi attuali file PO sincronizzati con i dizionari Intlayer
|
|
118
|
+
plugins: [
|
|
119
|
+
syncPO({
|
|
120
|
+
// Layout per lingua e per namespace
|
|
121
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
122
|
+
}),
|
|
123
|
+
],
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export default config;
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Alternativa: file singolo per lingua:
|
|
130
|
+
|
|
131
|
+
```ts fileName="intlayer.config.ts"
|
|
132
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
133
|
+
import { syncPO } from "@intlayer/sync-po-plugin";
|
|
134
|
+
|
|
135
|
+
const config: IntlayerConfig = {
|
|
136
|
+
internationalization: {
|
|
137
|
+
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
138
|
+
defaultLocale: Locales.ENGLISH,
|
|
139
|
+
},
|
|
140
|
+
plugins: [
|
|
141
|
+
syncPO({
|
|
142
|
+
source: ({ locale }) => `./locales/${locale}.po`,
|
|
143
|
+
}),
|
|
144
|
+
],
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export default config;
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
#### Come funziona
|
|
151
|
+
|
|
152
|
+
- Lettura: il plugin scopre i file PO dal tuo costruttore `source` e li carica come dizionari Intlayer.
|
|
153
|
+
- Scrittura: dopo le build e i riempimenti, scrive i PO localizzati negli stessi percorsi (con gli header Gettext appropriati).
|
|
154
|
+
- Riempimento automatico: il plugin dichiara un percorso `autoFill` per ogni dizionario. L'esecuzione di `intlayer fill` aggiorna per impostazione predefinita solo le traduzioni mancanti nei tuoi file PO.
|
|
155
|
+
|
|
156
|
+
API:
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
syncPO({
|
|
160
|
+
source: ({ key, locale }) => string, // richiesto
|
|
161
|
+
location?: string, // etichetta opzionale, default: "sync-po::path/to/source"
|
|
162
|
+
priority?: number, // priorità opzionale per la risoluzione dei conflitti, default: 0
|
|
163
|
+
format?: 'icu' | 'i18next' | 'vue-i18n', // opzionale, necessario solo quando i valori msgstr utilizzano una specifica sintassi di interpolazione
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
#### `format` ('icu' | 'i18next' | 'vue-i18n')
|
|
168
|
+
|
|
169
|
+
I file PO sono sempre file Gettext Portable Object — questo è fisso. Questa opzione descrive solo la **sintassi di interpolazione** utilizzata all'interno dei valori `msgstr`, in modo che Intlayer possa convertirli nel proprio formato al momento del parsing (tramite `formatDictionary`) e viceversa durante la scrittura dell'output.
|
|
170
|
+
|
|
171
|
+
- `undefined` _(default)_: i valori `msgstr` sono trattati come stringhe semplici — nessuna trasformazione. Usa questo per la maggior parte dei file PO.
|
|
172
|
+
- `'icu'`: i valori `msgstr` utilizzano la sintassi dei messaggi ICU (es. `{count, plural, one {# item} other {# items}}`).
|
|
173
|
+
- `'i18next'`: i valori `msgstr` utilizzano la sintassi di interpolazione i18next (es. `{{variable}}`).
|
|
174
|
+
- `'vue-i18n'`: i valori `msgstr` utilizzano la sintassi Vue I18n.
|
|
175
|
+
|
|
176
|
+
> La trasformazione è applicata da `formatDictionary` di `@intlayer/chokidar` al caricamento e invertita con `formatDictionaryOutput` alla scrittura. Per regole complesse come i plurali ICU, la fedeltà del round-trip non è garantita.
|
|
177
|
+
|
|
178
|
+
**Esempio — i file PO contengono interpolazione in stile i18next:**
|
|
179
|
+
|
|
180
|
+
```ts
|
|
181
|
+
syncPO({
|
|
182
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
183
|
+
format: "i18next",
|
|
184
|
+
}),
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Sorgenti PO multiple e priorità
|
|
188
|
+
|
|
189
|
+
Puoi aggiungere più plugin `syncPO` per sincronizzare diverse sorgenti PO. Questo è utile quando hai più sorgenti di traduzione o diverse strutture PO nel tuo progetto.
|
|
190
|
+
|
|
191
|
+
#### Sistema di priorità
|
|
192
|
+
|
|
193
|
+
Quando più plugin puntano alla stessa chiave del dizionario, il parametro `priority` determina quale plugin ha la precedenza:
|
|
194
|
+
|
|
195
|
+
- I numeri di priorità più alti vincono su quelli più bassi
|
|
196
|
+
- La priorità predefinita dei file `.content` è `0`
|
|
197
|
+
- La priorità predefinita dei plugin è `0`
|
|
198
|
+
- I plugin con la stessa priorità vengono elaborati nell'ordine in cui appaiono nella configurazione
|
|
199
|
+
|
|
200
|
+
```ts fileName="intlayer.config.ts"
|
|
201
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
202
|
+
import { syncPO } from "@intlayer/sync-po-plugin";
|
|
203
|
+
|
|
204
|
+
const config: IntlayerConfig = {
|
|
205
|
+
internationalization: {
|
|
206
|
+
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
207
|
+
defaultLocale: Locales.ENGLISH,
|
|
208
|
+
},
|
|
209
|
+
|
|
210
|
+
plugins: [
|
|
211
|
+
// Sorgente PO primaria (priorità massima)
|
|
212
|
+
syncPO({
|
|
213
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
214
|
+
location: "main-translations",
|
|
215
|
+
priority: 10,
|
|
216
|
+
}),
|
|
217
|
+
|
|
218
|
+
// Sorgente PO di fallback (priorità inferiore)
|
|
219
|
+
syncPO({
|
|
220
|
+
source: ({ locale }) => `./fallback-locales/${locale}.po`,
|
|
221
|
+
location: "fallback-translations",
|
|
222
|
+
priority: 5,
|
|
223
|
+
}),
|
|
224
|
+
|
|
225
|
+
// Sorgente PO legacy (priorità minima)
|
|
226
|
+
syncPO({
|
|
227
|
+
source: ({ locale }) => `/my/other/app/legacy/${locale}/messages.po`,
|
|
228
|
+
location: "legacy-translations",
|
|
229
|
+
priority: 1,
|
|
230
|
+
}),
|
|
231
|
+
],
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
export default config;
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## Plugin Load PO
|
|
238
|
+
|
|
239
|
+
### Avvio rapido
|
|
240
|
+
|
|
241
|
+
Aggiungi il plugin al tuo `intlayer.config.ts` per ingerire file PO esistenti come dizionari Intlayer. Questo plugin è di sola lettura (nessuna scrittura su disco):
|
|
242
|
+
|
|
243
|
+
```ts fileName="intlayer.config.ts"
|
|
244
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
245
|
+
import { loadPO } from "@intlayer/sync-po-plugin";
|
|
246
|
+
|
|
247
|
+
const config: IntlayerConfig = {
|
|
248
|
+
internationalization: {
|
|
249
|
+
locales: [Locales.ENGLISH, Locales.FRENCH, Locales.SPANISH],
|
|
250
|
+
defaultLocale: Locales.ENGLISH,
|
|
251
|
+
},
|
|
252
|
+
|
|
253
|
+
plugins: [
|
|
254
|
+
// Ingerisci i messaggi PO situati ovunque nel tuo albero dei sorgenti
|
|
255
|
+
loadPO({
|
|
256
|
+
source: ({ key }) => `./src/**/${key}.i18n.po`,
|
|
257
|
+
// Carica una singola lingua per istanza di plugin (impostata di default sulla defaultLocale della configurazione)
|
|
258
|
+
locale: Locales.ENGLISH,
|
|
259
|
+
priority: 0,
|
|
260
|
+
}),
|
|
261
|
+
],
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
export default config;
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Alternativa: layout per lingua, ancora di sola lettura (viene caricata solo la lingua selezionata):
|
|
268
|
+
|
|
269
|
+
```ts fileName="intlayer.config.ts"
|
|
270
|
+
import { Locales, type IntlayerConfig } from "intlayer";
|
|
271
|
+
import { loadPO } from "@intlayer/sync-po-plugin";
|
|
272
|
+
|
|
273
|
+
const config: IntlayerConfig = {
|
|
274
|
+
internationalization: {
|
|
275
|
+
locales: [Locales.ENGLISH, Locales.FRENCH],
|
|
276
|
+
defaultLocale: Locales.ENGLISH,
|
|
277
|
+
},
|
|
278
|
+
plugins: [
|
|
279
|
+
loadPO({
|
|
280
|
+
// Solo i file per Locales.FRENCH verranno caricati da questo pattern
|
|
281
|
+
source: ({ key, locale }) => `./locales/${locale}/${key}.po`,
|
|
282
|
+
locale: Locales.FRENCH,
|
|
283
|
+
}),
|
|
284
|
+
],
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
export default config;
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Come funziona
|
|
291
|
+
|
|
292
|
+
- Scoperta: costruisce un glob dal tuo costruttore `source` e raccoglie i file PO corrispondenti.
|
|
293
|
+
- Ingestione: carica ogni file PO come dizionario Intlayer con la `locale` fornita.
|
|
294
|
+
- Sola lettura: non scrive né formatta i file di output; usa `syncPO` se hai bisogno della sincronizzazione round-trip.
|
|
295
|
+
- Pronto per il riempimento automatico: definisce un percorso `fill` in modo che `intlayer content fill` possa popolare le chiavi mancanti.
|
|
296
|
+
|
|
297
|
+
### API
|
|
298
|
+
|
|
299
|
+
```ts
|
|
300
|
+
loadPO({
|
|
301
|
+
// Costruisce i percorsi per i tuoi PO. `locale` è opzionale se la tua struttura non ha un segmento per la lingua
|
|
302
|
+
source: ({ key, locale }) => string,
|
|
303
|
+
|
|
304
|
+
// Lingua di destinazione per i dizionari caricati da questa istanza di plugin
|
|
305
|
+
// Di default configuration.internationalization.defaultLocale
|
|
306
|
+
locale?: Locale,
|
|
307
|
+
|
|
308
|
+
// Etichetta opzionale per identificare la sorgente
|
|
309
|
+
location?: string, // default: "plugin"
|
|
310
|
+
|
|
311
|
+
// Priorità utilizzata per la risoluzione dei conflitti con altre sorgenti
|
|
312
|
+
priority?: number, // default: 0
|
|
313
|
+
});
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Comportamento e convenzioni
|
|
317
|
+
|
|
318
|
+
- Se la tua maschera `source` include un segnaposto per la lingua, vengono ingeriti solo i file per la `locale` selezionata.
|
|
319
|
+
- Se non c'è un segmento `{key}` nella tua maschera, la chiave del dizionario è "index".
|
|
320
|
+
- Le chiavi sono derivate dai percorsi dei file sostituendo il segnaposto `{key}` nel tuo costruttore `source`.
|
|
321
|
+
- Il plugin utilizza solo i file scoperti e non fabbrica lingue o chiavi mancanti.
|
|
322
|
+
- Il percorso `fill` è dedotto dalla tua `source` e utilizzato per aggiornare i valori mancanti tramite CLI quando acconsenti.
|
|
323
|
+
|
|
324
|
+
## Risoluzione dei conflitti
|
|
325
|
+
|
|
326
|
+
Quando la stessa chiave di traduzione esiste in più sorgenti PO:
|
|
327
|
+
|
|
328
|
+
1. Il plugin con la priorità più alta determina il valore finale
|
|
329
|
+
2. Le sorgenti con priorità inferiore vengono utilizzate come fallback per le chiavi mancanti
|
|
330
|
+
3. Questo ti consente di mantenere le traduzioni legacy mentre migri gradualmente verso nuove strutture
|
|
331
|
+
|
|
332
|
+
## CLI
|
|
333
|
+
|
|
334
|
+
I file PO sincronizzati saranno considerati come gli altri file `.content`. Ciò significa che tutti i comandi intlayer saranno disponibili per i file PO sincronizzati. Inclusi:
|
|
335
|
+
|
|
336
|
+
- `intlayer content test` per testare se mancano traduzioni
|
|
337
|
+
- `intlayer content list` per elencare i file PO sincronizzati
|
|
338
|
+
- `intlayer content fill` per riempire le traduzioni mancanti
|
|
339
|
+
- `intlayer content push` per inviare i file PO sincronizzati
|
|
340
|
+
- `intlayer content pull` per recuperare i file PO sincronizzati
|
|
341
|
+
|
|
342
|
+
Vedi [Intlayer CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/index.md) per maggiori dettagli.
|
|
343
|
+
|
|
344
|
+
## Limitazioni (attuali)
|
|
345
|
+
|
|
346
|
+
- Nessun supporto per inserimenti o plurali/ICU quando si puntano librerie di terze parti.
|
|
347
|
+
- L'editor visuale non è ancora disponibile per runtime diversi da Intlayer.
|
|
348
|
+
- Solo sincronizzazione PO; i formati di catalogo non-PO non sono supportati.
|
|
349
|
+
|
|
350
|
+
## Perché è importante
|
|
351
|
+
|
|
352
|
+
- Possiamo raccomandare soluzioni i18n consolidate e posizionare Intlayer come componente aggiuntivo.
|
|
353
|
+
- Sfruttiamo la loro SEO/parole chiave con tutorial che terminano suggerendo Intlayer per gestire i PO.
|
|
354
|
+
- Espande il pubblico potenziale dai "nuovi progetti" a "qualsiasi team che utilizzi già i18n".
|
package/docs/ja/mcp_server.md
CHANGED
|
@@ -51,12 +51,12 @@ Intlayer MCPサーバーをIDEで有効にすると、以下の機能が利用
|
|
|
51
51
|
|
|
52
52
|
> コマンドとオプションの完全なリストは、[Intlayer CLIドキュメント](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ja/cli/index.md)でご覧ください。
|
|
53
53
|
|
|
54
|
-
## ローカルサーバー(stdio)とリモートサーバー(
|
|
54
|
+
## ローカルサーバー(stdio)とリモートサーバー(Streamable HTTP)
|
|
55
55
|
|
|
56
56
|
MCPサーバーは以下の2つの方法で使用できます:
|
|
57
57
|
|
|
58
58
|
- ローカルサーバー(stdio)
|
|
59
|
-
- リモートサーバー(
|
|
59
|
+
- リモートサーバー(Streamable HTTP)
|
|
60
60
|
|
|
61
61
|
### ローカルサーバー(stdio)(推奨)
|
|
62
62
|
|
|
@@ -64,7 +64,7 @@ Intlayerは、あなたのマシンにローカルインストールできるNPM
|
|
|
64
64
|
|
|
65
65
|
このサーバーはMCPサーバーを使用する推奨方法です。CLIツールを含むMCPサーバーのすべての機能が統合されています。
|
|
66
66
|
|
|
67
|
-
### リモートサーバー(
|
|
67
|
+
### リモートサーバー(Streamable HTTP)
|
|
68
68
|
|
|
69
69
|
MCPサーバーはSSEトランスポート方式を使用してリモートでも利用可能です。このサーバーはIntlayerによってホストされており、https://mcp.intlayer.org で利用できます。このサーバーは認証不要で公開アクセス可能で、無料で使用できます。
|
|
70
70
|
|
|
@@ -97,7 +97,7 @@ bun x intlayer init mcp
|
|
|
97
97
|
このコマンドは以下のことを行います:
|
|
98
98
|
|
|
99
99
|
1. 使用しているプラットフォーム(Cursor、VS Code、Claude Desktopなど)を尋ねます。
|
|
100
|
-
2. 使用するトランスポート方法(ローカルサーバー (stdio) またはリモートサーバー (
|
|
100
|
+
2. 使用するトランスポート方法(ローカルサーバー (stdio) またはリモートサーバー (Streamable HTTP))を尋ねます。
|
|
101
101
|
3. 構成ファイル(例:`.cursor/mcp.json`、`.vscode/mcp.json`、またはグローバルなClaude Desktop構成)を自動的に更新します。
|
|
102
102
|
|
|
103
103
|
---
|
|
@@ -107,7 +107,7 @@ bun x intlayer init mcp
|
|
|
107
107
|
1. コマンドパレットを開きます(Ctrl+Shift+P または Cmd+Shift+P)。
|
|
108
108
|
2. `Intlayer: Setup AI Agent Skills` と入力します。
|
|
109
109
|
3. 使用するプラットフォームを選択します(例:`VS Code`、`Cursor`、`Windsurf`、`OpenCode`、`Claude Code`、`GitHub Copilot Workspace` など)。
|
|
110
|
-
4. インストールするMCPを選択します(stdio、
|
|
110
|
+
4. インストールするMCPを選択します(stdio、Streamable HTTP)。
|
|
111
111
|
5. Enterキーを押します。
|
|
112
112
|
|
|
113
113
|
---
|
|
@@ -131,16 +131,16 @@ CursorでMCPサーバーを設定するには、[公式ドキュメント](https
|
|
|
131
131
|
}
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
### リモートサーバー(
|
|
134
|
+
### リモートサーバー(Streamable HTTP)
|
|
135
135
|
|
|
136
|
-
Server-Sent Events(
|
|
136
|
+
Server-Sent Events(Streamable HTTP)を使用してリモートのIntlayer MCPサーバーに接続するには、ホストされているサービスに接続するようにMCPクライアントを設定できます。
|
|
137
137
|
|
|
138
138
|
```json fileName=".cursor/mcp.json"
|
|
139
139
|
{
|
|
140
140
|
"mcpServers": {
|
|
141
|
-
"intlayer": {
|
|
142
|
-
"
|
|
143
|
-
"
|
|
141
|
+
"intlayer-sse": {
|
|
142
|
+
"command": "npx",
|
|
143
|
+
"args": ["-y", "mcp-remote@latest", "https://mcp.intlayer.org"]
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
}
|
|
@@ -172,16 +172,16 @@ VS CodeでIntlayer MCPサーバーを使用するには、ワークスペース
|
|
|
172
172
|
}
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
-
### リモートサーバー(
|
|
175
|
+
### リモートサーバー(Streamable HTTP)
|
|
176
176
|
|
|
177
|
-
Server-Sent Events(
|
|
177
|
+
Server-Sent Events(Streamable HTTP)を使用してリモートの Intlayer MCP サーバーに接続する場合、MCP クライアントをホストされているサービスに接続するように設定できます。
|
|
178
178
|
|
|
179
179
|
```json fileName=".vscode/mcp.json"
|
|
180
180
|
{
|
|
181
181
|
"servers": {
|
|
182
|
-
"intlayer": {
|
|
183
|
-
"
|
|
184
|
-
"
|
|
182
|
+
"intlayer-sse": {
|
|
183
|
+
"command": "npx",
|
|
184
|
+
"args": ["-y", "mcp-remote@latest", "https://mcp.intlayer.org"]
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
}
|
|
@@ -191,7 +191,7 @@ Server-Sent Events(SSE)を使用してリモートの Intlayer MCP サーバ
|
|
|
191
191
|
|
|
192
192
|
## ChatGPT でのセットアップ
|
|
193
193
|
|
|
194
|
-
### リモートサーバー(
|
|
194
|
+
### リモートサーバー(Streamable HTTP)
|
|
195
195
|
|
|
196
196
|
ChatGPT で MCP サーバーを設定するには、[公式ドキュメント](https://platform.openai.com/docs/mcp#test-and-connect-your-mcp-server)に従ってください。
|
|
197
197
|
|
|
@@ -232,6 +232,19 @@ ChatGPT で MCP サーバーを設定するには、[公式ドキュメント](h
|
|
|
232
232
|
}
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
+
### リモートサーバー(Streamable HTTP)
|
|
236
|
+
|
|
237
|
+
```json fileName="claude_desktop_config.json"
|
|
238
|
+
{
|
|
239
|
+
"mcpServers": {
|
|
240
|
+
"intlayer-sse": {
|
|
241
|
+
"command": "npx",
|
|
242
|
+
"args": ["-y", "mcp-remote@latest", "https://mcp.intlayer.org"]
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
235
248
|
---
|
|
236
249
|
|
|
237
250
|
## CLIを使ったMCPサーバーの利用
|