@vonaffenfels/contentful-slate-editor 1.1.33 → 1.1.36
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonaffenfels/contentful-slate-editor",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.36",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prepublish": "yarn run build",
|
|
6
6
|
"dev": "yarn run start",
|
|
@@ -95,10 +95,10 @@
|
|
|
95
95
|
"webpack-watch-files-plugin": "^1.2.1"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@vonaffenfels/slate-editor": "^1.1.
|
|
98
|
+
"@vonaffenfels/slate-editor": "^1.1.36",
|
|
99
99
|
"webpack": "5.88.2"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "c55640e4184996f5503928a6e1f990c3b4420a52",
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public"
|
|
104
104
|
}
|
|
@@ -11,6 +11,7 @@ import {css} from 'emotion';
|
|
|
11
11
|
const Config = ({sdk}) => {
|
|
12
12
|
const [params, setParams] = useState({
|
|
13
13
|
translationService: "",
|
|
14
|
+
translationServiceKey: "",
|
|
14
15
|
usersWithTranslation: [],
|
|
15
16
|
});
|
|
16
17
|
const [spaceUsers, setSpaceUsers] = useState([]);
|
|
@@ -104,6 +105,12 @@ const Config = ({sdk}) => {
|
|
|
104
105
|
labelText="Translation Service URL"
|
|
105
106
|
required
|
|
106
107
|
/>
|
|
108
|
+
<TextField
|
|
109
|
+
value={params.translationServiceKey}
|
|
110
|
+
onChange={e => onFieldChanged(e.target.value, "translationServiceKey")}
|
|
111
|
+
labelText="Translation Service API Key"
|
|
112
|
+
required
|
|
113
|
+
/>
|
|
107
114
|
</Form>
|
|
108
115
|
</Workbench>
|
|
109
116
|
);
|
|
@@ -1,298 +1,300 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useEffect, useState,
|
|
3
|
-
} from "react";
|
|
4
|
-
import {
|
|
5
|
-
Button, Table,
|
|
6
|
-
} from "@contentful/f36-components";
|
|
7
|
-
import getSlug from "speakingurl";
|
|
8
|
-
|
|
9
|
-
export const DialogTranslation = ({
|
|
10
|
-
sdk,
|
|
11
|
-
activeConfig,
|
|
12
|
-
translateFromLocale = "de",
|
|
13
|
-
}) => {
|
|
14
|
-
const {entryId} = sdk.parameters.invocation;
|
|
15
|
-
const [entry, setEntry] = useState(null);
|
|
16
|
-
const [loading, setLoading] = useState({});
|
|
17
|
-
const [usage, setUsage] = useState({});
|
|
18
|
-
const [contentType, setContentType] = useState(null);
|
|
19
|
-
const localizedFields = contentType?.fields?.filter(field => field.localized);
|
|
20
|
-
|
|
21
|
-
const getTranslationUsage = async (content) => {
|
|
22
|
-
if (!sdk?.parameters?.installation?.translationService) {
|
|
23
|
-
console.error(`no translation service configured!`);
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
const response = await fetch(sdk?.parameters?.installation?.translationService + "/usage", {
|
|
29
|
-
method: "POST",
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
{
|
|
220
|
-
{
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
{
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
1
|
+
import {
|
|
2
|
+
useEffect, useState,
|
|
3
|
+
} from "react";
|
|
4
|
+
import {
|
|
5
|
+
Button, Table,
|
|
6
|
+
} from "@contentful/f36-components";
|
|
7
|
+
import getSlug from "speakingurl";
|
|
8
|
+
|
|
9
|
+
export const DialogTranslation = ({
|
|
10
|
+
sdk,
|
|
11
|
+
activeConfig,
|
|
12
|
+
translateFromLocale = "de",
|
|
13
|
+
}) => {
|
|
14
|
+
const {entryId} = sdk.parameters.invocation;
|
|
15
|
+
const [entry, setEntry] = useState(null);
|
|
16
|
+
const [loading, setLoading] = useState({});
|
|
17
|
+
const [usage, setUsage] = useState({});
|
|
18
|
+
const [contentType, setContentType] = useState(null);
|
|
19
|
+
const localizedFields = contentType?.fields?.filter(field => field.localized);
|
|
20
|
+
|
|
21
|
+
const getTranslationUsage = async (content) => {
|
|
22
|
+
if (!sdk?.parameters?.installation?.translationService) {
|
|
23
|
+
console.error(`no translation service configured!`);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
const response = await fetch(sdk?.parameters?.installation?.translationService + "/usage", {
|
|
29
|
+
method: "POST",
|
|
30
|
+
headers: {"X-Api-Key": sdk?.parameters?.installation?.translationServiceKey},
|
|
31
|
+
body: JSON.stringify({
|
|
32
|
+
editorContent: typeof content === "object" ? content : undefined,
|
|
33
|
+
text: typeof content === "string" ? content : undefined,
|
|
34
|
+
}),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const translatedValue = await response.json();
|
|
38
|
+
return translatedValue?.usage || 0;
|
|
39
|
+
} catch (e) {
|
|
40
|
+
console.error(e);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const updateUsage = async (entry, contentType) => {
|
|
45
|
+
const localizedFields = contentType?.fields?.filter(field => field.localized);
|
|
46
|
+
const newUsage = {};
|
|
47
|
+
for (let i = 0; i < localizedFields.length; i++) {
|
|
48
|
+
const localizedField = localizedFields[i];
|
|
49
|
+
newUsage[localizedField.id] = await getTranslationUsage(entry?.fields[localizedField.id]?.[translateFromLocale]);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return newUsage;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
sdk.space.getEntry(entryId).then(entry => {
|
|
57
|
+
sdk.space.getContentType(entry.sys.contentType.sys.id).then(contentType => {
|
|
58
|
+
updateUsage(entry, contentType).then((usage) => {
|
|
59
|
+
setUsage(usage);
|
|
60
|
+
setEntry(entry);
|
|
61
|
+
setContentType(contentType);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}, []);
|
|
66
|
+
|
|
67
|
+
if (!contentType) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const translateValue = async (content, targetLanguage) => {
|
|
72
|
+
if (!sdk?.parameters?.installation?.translationService) {
|
|
73
|
+
console.error(`no translation service configured!`);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
try {
|
|
78
|
+
const response = await fetch(sdk?.parameters?.installation?.translationService, {
|
|
79
|
+
method: "POST",
|
|
80
|
+
headers: {"X-Api-Key": sdk?.parameters?.installation?.translationServiceKey},
|
|
81
|
+
body: JSON.stringify({
|
|
82
|
+
editorContent: typeof content === "object" ? content : undefined,
|
|
83
|
+
text: typeof content === "string" ? content : undefined,
|
|
84
|
+
targetLanguage,
|
|
85
|
+
translateFromLocale: translateFromLocale,
|
|
86
|
+
}),
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
const translatedValue = await response.json();
|
|
90
|
+
return translatedValue?.translation || "";
|
|
91
|
+
} catch (e) {
|
|
92
|
+
console.error(e);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const onTranslateClick = async (targetLanguageOrLanguages, refreshAll = false, onlyFields = []) => {
|
|
97
|
+
if (!Array.isArray(targetLanguageOrLanguages)) {
|
|
98
|
+
targetLanguageOrLanguages = [targetLanguageOrLanguages];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
let newEntry = entry;
|
|
102
|
+
for (let i = 0; i < targetLanguageOrLanguages.length; i++) {
|
|
103
|
+
if (targetLanguageOrLanguages[i] === translateFromLocale) {
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
newEntry = await translateForLocale(
|
|
108
|
+
targetLanguageOrLanguages[i], newEntry, refreshAll, onlyFields,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
await sdk.space.updateEntry(newEntry);
|
|
113
|
+
setEntry(await sdk.space.getEntry(entryId));
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const translateForLocale = async (
|
|
117
|
+
targetLanguage, entry = {}, refreshAll = false, onlyFields = [],
|
|
118
|
+
) => {
|
|
119
|
+
setLoading({
|
|
120
|
+
...loading,
|
|
121
|
+
[targetLanguage]: true,
|
|
122
|
+
});
|
|
123
|
+
const newEntry = {...entry};
|
|
124
|
+
for (let i = 0; i < localizedFields.length; i++) {
|
|
125
|
+
const localizedField = localizedFields[i];
|
|
126
|
+
const currentValue = entry?.fields[localizedField.id]?.[targetLanguage];
|
|
127
|
+
if (
|
|
128
|
+
(!refreshAll && !isEmptyValue(currentValue) && !onlyFields.length) ||
|
|
129
|
+
(onlyFields.length && !onlyFields.includes(localizedField.id))
|
|
130
|
+
) {
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
setLoading({
|
|
135
|
+
...loading,
|
|
136
|
+
[targetLanguage + localizedField.id]: true,
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
let newValue = await translateValue(entry?.fields[localizedField.id]?.[sdk.locales.default], targetLanguage);
|
|
140
|
+
|
|
141
|
+
setLoading({
|
|
142
|
+
...loading,
|
|
143
|
+
[targetLanguage + localizedField.id]: false,
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
if (!newValue) {
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (localizedField.id === "slug" && newValue) {
|
|
151
|
+
newValue = getSlug(newValue);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
newEntry.fields[localizedField.id][targetLanguage] = newValue;
|
|
155
|
+
}
|
|
156
|
+
setLoading({
|
|
157
|
+
...loading,
|
|
158
|
+
[targetLanguage]: false,
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
return newEntry;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
const isEmptyValue = (value) => {
|
|
165
|
+
if (!value) {
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// editor value
|
|
170
|
+
if (Array.isArray(value)) {
|
|
171
|
+
if (value.length === 1 && value[0].type === "paragraph" && value[0].children.length === 1 && value[0].children[0].text === "") {
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return false;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
const isComplete = (locale) => {
|
|
180
|
+
for (let i = 0; i < localizedFields.length; i++) {
|
|
181
|
+
const localizedField = localizedFields[i];
|
|
182
|
+
const value = entry?.fields[localizedField.id]?.[locale];
|
|
183
|
+
|
|
184
|
+
if (isEmptyValue(value)) {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return true;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
const fullUsage = Object.keys(usage || {}).reduce((acc, key) => acc + usage[key], 0);
|
|
193
|
+
|
|
194
|
+
return <div className="flex flex-col gap-2 p-4">
|
|
195
|
+
<Table>
|
|
196
|
+
<Table.Head>
|
|
197
|
+
<Table.Row>
|
|
198
|
+
<Table.Cell style={{width: 250}}>Feld</Table.Cell>
|
|
199
|
+
<Table.Cell style={{width: 100}}>Zeichen</Table.Cell>
|
|
200
|
+
{sdk.locales.available.map(locale => {
|
|
201
|
+
const languageComplete = isComplete(locale);
|
|
202
|
+
const isTranslateFromLocale = locale === translateFromLocale;
|
|
203
|
+
|
|
204
|
+
if (isTranslateFromLocale) {
|
|
205
|
+
return <Table.Cell key={locale}/>;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
if (loading[locale]) {
|
|
209
|
+
return <Table.Cell key={locale}><Button size="small" variant="transparent">Wird übersetzt</Button></Table.Cell>;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const buttonLabel = languageComplete ? "Erneut Übersetzen" : "Vervollständigen";
|
|
213
|
+
|
|
214
|
+
return <Table.Cell key={locale}>
|
|
215
|
+
<Button
|
|
216
|
+
size="small"
|
|
217
|
+
className="group"
|
|
218
|
+
variant={languageComplete ? "secondary" : "primary"}
|
|
219
|
+
title={buttonLabel}
|
|
220
|
+
onClick={e => onTranslateClick(locale, languageComplete)}>
|
|
221
|
+
{!languageComplete && <span className="text-orange-500">Fehlende Übersetzen</span>}
|
|
222
|
+
{languageComplete && <span className="text-green-500">Vollständig Übersetzt</span>}
|
|
223
|
+
</Button>
|
|
224
|
+
</Table.Cell>;
|
|
225
|
+
})}
|
|
226
|
+
</Table.Row>
|
|
227
|
+
</Table.Head>
|
|
228
|
+
<Table.Body>
|
|
229
|
+
<Table.Row>
|
|
230
|
+
<Table.Cell/>
|
|
231
|
+
<Table.Cell>∑ {fullUsage}</Table.Cell>
|
|
232
|
+
{sdk.locales.available.map(locale => {
|
|
233
|
+
const name = sdk.locales.names[locale];
|
|
234
|
+
|
|
235
|
+
return <Table.Cell key={locale}>
|
|
236
|
+
{name}
|
|
237
|
+
</Table.Cell>;
|
|
238
|
+
})}
|
|
239
|
+
</Table.Row>
|
|
240
|
+
{localizedFields.map(field => {
|
|
241
|
+
return <Table.Row key={field.id}>
|
|
242
|
+
<Table.Cell>
|
|
243
|
+
<Button
|
|
244
|
+
className="max-w-full truncate"
|
|
245
|
+
style={{maxWidth: 250}}
|
|
246
|
+
size="small"
|
|
247
|
+
variant={"transparent"}
|
|
248
|
+
title={"Alle Übersetzungen Aktualisieren"}
|
|
249
|
+
onClick={e => {
|
|
250
|
+
onTranslateClick(sdk.locales.available, false, [field.id]);
|
|
251
|
+
}}>
|
|
252
|
+
{field.name}
|
|
253
|
+
</Button>
|
|
254
|
+
</Table.Cell>
|
|
255
|
+
<Table.Cell>
|
|
256
|
+
{usage?.[field.id]}
|
|
257
|
+
</Table.Cell>
|
|
258
|
+
{sdk.locales.available.map(locale => {
|
|
259
|
+
let preview = entry?.fields[field.id]?.[locale];
|
|
260
|
+
|
|
261
|
+
if (!preview) {
|
|
262
|
+
preview = "";
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (typeof preview === "object") {
|
|
266
|
+
preview = "Keine Vorschau Verfügbar";
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if (locale === translateFromLocale) {
|
|
270
|
+
return <Table.Cell key={locale}>
|
|
271
|
+
<div
|
|
272
|
+
className="max-w-full truncate"
|
|
273
|
+
style={{maxWidth: 250}}>
|
|
274
|
+
{preview}
|
|
275
|
+
</div>
|
|
276
|
+
</Table.Cell>;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
if (loading[locale + field.id]) {
|
|
280
|
+
return <Table.Cell key={locale}><Button size="small" variant="transparent">Wird übersetzt</Button></Table.Cell>;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
return <Table.Cell key={locale}>
|
|
284
|
+
<Button
|
|
285
|
+
className="max-w-full truncate"
|
|
286
|
+
style={{maxWidth: 250}}
|
|
287
|
+
size="small"
|
|
288
|
+
variant={"transparent"}
|
|
289
|
+
title={"Übersetzung Aktualisieren"}
|
|
290
|
+
onClick={e => onTranslateClick(locale, false, [field.id])}>
|
|
291
|
+
{preview}
|
|
292
|
+
</Button>
|
|
293
|
+
</Table.Cell>;
|
|
294
|
+
})}
|
|
295
|
+
</Table.Row>;
|
|
296
|
+
})}
|
|
297
|
+
</Table.Body>
|
|
298
|
+
</Table>
|
|
299
|
+
</div>;
|
|
298
300
|
};
|