datocms-plugin-ai-translations 3.4.3 → 3.4.5
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/README.md +15 -10
- package/dist/assets/index-BSBoU2Zf.js +96 -0
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/index-0ij0LZi2.js +0 -96
package/README.md
CHANGED
|
@@ -24,13 +24,14 @@ On the plugin's Settings screen:
|
|
|
24
24
|
- **DeepL API Key**: Paste your DeepL API key.
|
|
25
25
|
- **Use DeepL Free endpoint**: Enable this if your key ends with `:fx` (Free plan).
|
|
26
26
|
6. **Prompt Template** (AI vendors only): Customize how translations are requested. Use `{fieldValue}`, `{fromLocale}`, `{toLocale}`, and `{recordContext}`.
|
|
27
|
-
7. **Translatable Field Types**: Pick which field editor types (single_line, markdown, structured_text, etc.) can be translated.
|
|
27
|
+
7. **Translatable Field Types**: Pick which field editor types (single_line, markdown, structured_text, etc.) can be translated.
|
|
28
28
|
8. **Translate Whole Record**: Enable the sidebar that translates every localized field in a record.
|
|
29
29
|
9. **Translate Bulk Records**: Enable bulk translations from table view or via the dedicated page.
|
|
30
30
|
10. **AI Bulk Translations Page**: Translate whole models at once.
|
|
31
|
+
11. **Enable Debugging**: Optional toggle that prints detailed logs to the browser console while keeping API keys redacted.
|
|
31
32
|
|
|
32
33
|
### Key Restrictions and Security
|
|
33
|
-
- Keys are stored in plugin settings and used client
|
|
34
|
+
- Keys are stored in plugin settings and used client-side. Do not share your workspace publicly.
|
|
34
35
|
- Prefer restricting keys:
|
|
35
36
|
- OpenAI: regular secret key; rotate periodically.
|
|
36
37
|
- Google: restrict by HTTP referrer and enable only the Generative Language API.
|
|
@@ -39,6 +40,7 @@ On the plugin's Settings screen:
|
|
|
39
40
|
_**Models**_
|
|
40
41
|
- OpenAI: the model list is fetched dynamically for your account; the plugin filters out embeddings, audio/whisper/tts, moderation, image, and realtime models.
|
|
41
42
|
- Google: the model list is fetched dynamically from the Generative Language API.
|
|
43
|
+
- Anthropic: the model list is fetched dynamically for your account.
|
|
42
44
|
|
|
43
45
|
Save your changes. The plugin is now ready.
|
|
44
46
|
|
|
@@ -50,7 +52,7 @@ For each translatable field:
|
|
|
50
52
|
|
|
51
53
|
1. Click on the field's dropdown menu in the DatoCMS record editor (on the top right of the field)
|
|
52
54
|
2. Select "Translate to" -> Choose a target locale or "All locales."
|
|
53
|
-
3. The plugin uses your
|
|
55
|
+
3. The plugin uses your configured AI vendor settings to generate a translation.
|
|
54
56
|
4. The field updates automatically.
|
|
55
57
|
|
|
56
58
|
You can also pull content from a different locale by choosing "Translate from" to copy and translate that locale's content into your current locale.
|
|
@@ -80,7 +82,7 @@ Translate multiple records at once from any table view:
|
|
|
80
82
|
|
|
81
83
|
The plugin includes a dedicated page for translating multiple models at once:
|
|
82
84
|
|
|
83
|
-
1. Go to Settings → AI Bulk Translations (in the sidebar)
|
|
85
|
+
1. Go to Settings → AI Bulk Translations (in the sidebar) — this entry only appears for users whose role can edit the schema.
|
|
84
86
|
2. Select your source and target languages
|
|
85
87
|
3. Choose one or more models to translate (block models are excluded)
|
|
86
88
|
4. Click "Start Bulk Translation"
|
|
@@ -122,10 +124,13 @@ You can customize the translation prompt template in the plugin settings:
|
|
|
122
124
|
- Use `{fromLocale}` and `{toLocale}` to specify languages
|
|
123
125
|
- Use `{recordContext}` to include the automatically generated record context
|
|
124
126
|
|
|
125
|
-
## Excluding Models or
|
|
127
|
+
## Excluding Models, Roles or Fields
|
|
126
128
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
+
In the plugin's "Exclusion Rules" section you can suppress translation actions and the sidebar panel for specific:
|
|
130
|
+
|
|
131
|
+
- **Models**: Choose models to exclude from translations
|
|
132
|
+
- **Roles**: Choose roles to hide all plugins functions from
|
|
133
|
+
- **Fields**: Choose individual fields that should be excluded, even when their model is included
|
|
129
134
|
|
|
130
135
|
## Troubleshooting
|
|
131
136
|
|
|
@@ -163,7 +168,7 @@ When translating from `fromLocale` → `toLocale`, the plugin picks a glossary I
|
|
|
163
168
|
4. Default glossary ID (if set and applicable).
|
|
164
169
|
5. Otherwise, no glossary is used.
|
|
165
170
|
|
|
166
|
-
If DeepL returns a glossary mismatch (e.g., glossary languages don
|
|
171
|
+
If DeepL returns a glossary mismatch (e.g., glossary languages don't match the current pair) or a missing glossary, the plugin automatically retries the same request once without a glossary so your translation continues. A brief hint is surfaced in the UI logs.
|
|
167
172
|
|
|
168
173
|
### Tips and Limitations
|
|
169
174
|
|
|
@@ -174,9 +179,9 @@ If DeepL returns a glossary mismatch (e.g., glossary languages don’t match the
|
|
|
174
179
|
|
|
175
180
|
### Quick Sanity Test
|
|
176
181
|
|
|
177
|
-
1. Create a small EN→DE glossary with an obvious term (e.g.,
|
|
182
|
+
1. Create a small EN→DE glossary with an obvious term (e.g., "CTA" → "Call-to-Action").
|
|
178
183
|
2. In Settings → DeepL, paste the glossary ID into either Default or the `EN->DE=...` mapping.
|
|
179
|
-
3. Translate a field from EN to DE containing
|
|
184
|
+
3. Translate a field from EN to DE containing "CTA". The resulting German text should include your glossary translation.
|
|
180
185
|
|
|
181
186
|
## Migration Notes
|
|
182
187
|
|