@medusajs/dashboard 3.0.0-snapshot-20251216135612 → 3.0.0-snapshot-20251216145629
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/app.css +13 -0
- package/dist/app.js +227 -68
- package/dist/app.mjs +1 -1
- package/dist/{chunk-YKYVCQRS.mjs → chunk-UULAOAFM.mjs} +34 -10
- package/dist/en.json +13 -1
- package/dist/{product-attributes-EFIRUBRO.mjs → product-attributes-K4FGFORS.mjs} +1 -1
- package/dist/{product-create-K6EWZHIT.mjs → product-create-7YTRHZQQ.mjs} +1 -1
- package/dist/{product-detail-DKPZDEIY.mjs → product-detail-32ZXNWOP.mjs} +1 -1
- package/dist/{product-edit-55YXTIGO.mjs → product-edit-FBAKONMR.mjs} +1 -1
- package/dist/{product-organization-N3VBRXF4.mjs → product-organization-IUSVX22S.mjs} +1 -1
- package/dist/{translation-list-S5Z6PG2R.mjs → translation-list-UF7FLXOW.mjs} +151 -5
- package/dist/{translations-edit-HUNKY7CO.mjs → translations-edit-KECSHYZY.mjs} +7 -18
- package/package.json +9 -9
- package/src/i18n/translations/$schema.json +47 -2
- package/src/i18n/translations/en.json +13 -1
- package/src/i18n/translations/es.json +13 -1
- package/src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx +153 -2
- package/src/routes/translations/translation-list/translation-list.tsx +8 -2
- package/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx +7 -19
|
@@ -9080,7 +9080,9 @@ var en_default = {
|
|
|
9080
9080
|
},
|
|
9081
9081
|
actions: {
|
|
9082
9082
|
save: "Save",
|
|
9083
|
+
saveChanges: "Save changes",
|
|
9083
9084
|
saveAsDraft: "Save as draft",
|
|
9085
|
+
saveAndClose: "Save and close",
|
|
9084
9086
|
copy: "Copy",
|
|
9085
9087
|
copied: "Copied",
|
|
9086
9088
|
duplicate: "Duplicate",
|
|
@@ -11496,6 +11498,13 @@ var en_default = {
|
|
|
11496
11498
|
list: {
|
|
11497
11499
|
metrics: "{{translated}} of {{total}} fields translated"
|
|
11498
11500
|
},
|
|
11501
|
+
edit: {
|
|
11502
|
+
successToast: "Translations updated successfully",
|
|
11503
|
+
unsavedChanges: {
|
|
11504
|
+
title: "Unsaved translations",
|
|
11505
|
+
description: "Don't lose your work. You have changes that haven't been saved yet"
|
|
11506
|
+
}
|
|
11507
|
+
},
|
|
11499
11508
|
bulk: {
|
|
11500
11509
|
header: "Translations Bulk Editor",
|
|
11501
11510
|
mainColumn: "Locale"
|
|
@@ -11506,7 +11515,10 @@ var en_default = {
|
|
|
11506
11515
|
noLocalesTip: "Configure at least one locale to start translating your data"
|
|
11507
11516
|
},
|
|
11508
11517
|
completion: {
|
|
11509
|
-
heading: "Translated
|
|
11518
|
+
heading: "Translated fields",
|
|
11519
|
+
translated: "Translated",
|
|
11520
|
+
toTranslate: "To be translated",
|
|
11521
|
+
footer: "Languages"
|
|
11510
11522
|
}
|
|
11511
11523
|
},
|
|
11512
11524
|
store: {
|
|
@@ -12377,7 +12389,9 @@ var es_default = {
|
|
|
12377
12389
|
},
|
|
12378
12390
|
actions: {
|
|
12379
12391
|
save: "Guardar",
|
|
12392
|
+
saveChanges: "Guardar cambios",
|
|
12380
12393
|
saveAsDraft: "Guardar como borrador",
|
|
12394
|
+
saveAndClose: "Guardar y cerrar",
|
|
12381
12395
|
copy: "Copiar",
|
|
12382
12396
|
copied: "Copiado",
|
|
12383
12397
|
duplicate: "Duplicar",
|
|
@@ -14715,13 +14729,23 @@ var es_default = {
|
|
|
14715
14729
|
header: "Editor de Traducciones en Masa",
|
|
14716
14730
|
locale: "Idioma"
|
|
14717
14731
|
},
|
|
14732
|
+
edit: {
|
|
14733
|
+
successToast: "Traducciones actualizadas exitosamente",
|
|
14734
|
+
unsavedChanges: {
|
|
14735
|
+
title: "Traducciones sin guardar",
|
|
14736
|
+
description: "No pierdas tu trabajo. Tienes cambios que no han sido guardados a\xFAn"
|
|
14737
|
+
}
|
|
14738
|
+
},
|
|
14718
14739
|
activeLocales: {
|
|
14719
14740
|
heading: "Idiomas",
|
|
14720
14741
|
subtitle: "Traducciones activas",
|
|
14721
14742
|
noLocalesTip: "Configura al menos un idioma para empezar a traducir tu informaci\xF3n"
|
|
14722
14743
|
},
|
|
14723
14744
|
completion: {
|
|
14724
|
-
heading: "Textos traducidos"
|
|
14745
|
+
heading: "Textos traducidos",
|
|
14746
|
+
translated: "Traducidos",
|
|
14747
|
+
toTranslate: "Por traducir",
|
|
14748
|
+
footer: "Idiomas"
|
|
14725
14749
|
}
|
|
14726
14750
|
},
|
|
14727
14751
|
store: {
|
|
@@ -95864,7 +95888,7 @@ function getRouteMap({
|
|
|
95864
95888
|
children: [
|
|
95865
95889
|
{
|
|
95866
95890
|
path: "create",
|
|
95867
|
-
lazy: () => import("./product-create-
|
|
95891
|
+
lazy: () => import("./product-create-7YTRHZQQ.mjs")
|
|
95868
95892
|
},
|
|
95869
95893
|
{
|
|
95870
95894
|
path: "import",
|
|
@@ -95880,7 +95904,7 @@ function getRouteMap({
|
|
|
95880
95904
|
path: ":id",
|
|
95881
95905
|
errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
|
|
95882
95906
|
lazy: async () => {
|
|
95883
|
-
const { Breadcrumb, loader } = await import("./product-detail-
|
|
95907
|
+
const { Breadcrumb, loader } = await import("./product-detail-32ZXNWOP.mjs");
|
|
95884
95908
|
return {
|
|
95885
95909
|
Component: Outlet4,
|
|
95886
95910
|
loader,
|
|
@@ -95892,11 +95916,11 @@ function getRouteMap({
|
|
|
95892
95916
|
children: [
|
|
95893
95917
|
{
|
|
95894
95918
|
path: "",
|
|
95895
|
-
lazy: () => import("./product-detail-
|
|
95919
|
+
lazy: () => import("./product-detail-32ZXNWOP.mjs"),
|
|
95896
95920
|
children: [
|
|
95897
95921
|
{
|
|
95898
95922
|
path: "edit",
|
|
95899
|
-
lazy: () => import("./product-edit-
|
|
95923
|
+
lazy: () => import("./product-edit-FBAKONMR.mjs")
|
|
95900
95924
|
},
|
|
95901
95925
|
{
|
|
95902
95926
|
path: "edit-variant",
|
|
@@ -95908,11 +95932,11 @@ function getRouteMap({
|
|
|
95908
95932
|
},
|
|
95909
95933
|
{
|
|
95910
95934
|
path: "attributes",
|
|
95911
|
-
lazy: () => import("./product-attributes-
|
|
95935
|
+
lazy: () => import("./product-attributes-K4FGFORS.mjs")
|
|
95912
95936
|
},
|
|
95913
95937
|
{
|
|
95914
95938
|
path: "organization",
|
|
95915
|
-
lazy: () => import("./product-organization-
|
|
95939
|
+
lazy: () => import("./product-organization-IUSVX22S.mjs")
|
|
95916
95940
|
},
|
|
95917
95941
|
{
|
|
95918
95942
|
path: "shipping-profile",
|
|
@@ -97253,11 +97277,11 @@ function getRouteMap({
|
|
|
97253
97277
|
children: [
|
|
97254
97278
|
{
|
|
97255
97279
|
path: "",
|
|
97256
|
-
lazy: () => import("./translation-list-
|
|
97280
|
+
lazy: () => import("./translation-list-UF7FLXOW.mjs")
|
|
97257
97281
|
},
|
|
97258
97282
|
{
|
|
97259
97283
|
path: "edit",
|
|
97260
|
-
lazy: () => import("./translations-edit-
|
|
97284
|
+
lazy: () => import("./translations-edit-KECSHYZY.mjs")
|
|
97261
97285
|
}
|
|
97262
97286
|
]
|
|
97263
97287
|
},
|
package/dist/en.json
CHANGED
|
@@ -101,7 +101,9 @@
|
|
|
101
101
|
},
|
|
102
102
|
"actions": {
|
|
103
103
|
"save": "Save",
|
|
104
|
+
"saveChanges": "Save changes",
|
|
104
105
|
"saveAsDraft": "Save as draft",
|
|
106
|
+
"saveAndClose": "Save and close",
|
|
105
107
|
"copy": "Copy",
|
|
106
108
|
"copied": "Copied",
|
|
107
109
|
"duplicate": "Duplicate",
|
|
@@ -2517,6 +2519,13 @@
|
|
|
2517
2519
|
"list": {
|
|
2518
2520
|
"metrics": "{{translated}} of {{total}} fields translated"
|
|
2519
2521
|
},
|
|
2522
|
+
"edit": {
|
|
2523
|
+
"successToast": "Translations updated successfully",
|
|
2524
|
+
"unsavedChanges": {
|
|
2525
|
+
"title": "Unsaved translations",
|
|
2526
|
+
"description": "Don't lose your work. You have changes that haven't been saved yet"
|
|
2527
|
+
}
|
|
2528
|
+
},
|
|
2520
2529
|
"bulk": {
|
|
2521
2530
|
"header": "Translations Bulk Editor",
|
|
2522
2531
|
"mainColumn": "Locale"
|
|
@@ -2527,7 +2536,10 @@
|
|
|
2527
2536
|
"noLocalesTip": "Configure at least one locale to start translating your data"
|
|
2528
2537
|
},
|
|
2529
2538
|
"completion": {
|
|
2530
|
-
"heading": "Translated
|
|
2539
|
+
"heading": "Translated fields",
|
|
2540
|
+
"translated": "Translated",
|
|
2541
|
+
"toTranslate": "To be translated",
|
|
2542
|
+
"footer": "Languages"
|
|
2531
2543
|
}
|
|
2532
2544
|
},
|
|
2533
2545
|
"store": {
|
|
@@ -121,13 +121,16 @@ var TranslationListSection = ({
|
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
// src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx
|
|
124
|
-
import { Container as Container3, Heading as Heading2, Text as Text3 } from "@medusajs/ui";
|
|
124
|
+
import { Container as Container3, Heading as Heading2, Text as Text3, Tooltip } from "@medusajs/ui";
|
|
125
|
+
import { useMemo, useState } from "react";
|
|
125
126
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
126
127
|
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
127
128
|
var TranslationsCompletionSection = ({
|
|
128
|
-
statistics
|
|
129
|
+
statistics,
|
|
130
|
+
locales
|
|
129
131
|
}) => {
|
|
130
132
|
const { t } = useTranslation3();
|
|
133
|
+
const [hoveredLocale, setHoveredLocale] = useState(null);
|
|
131
134
|
const { translatedCount, totalCount } = Object.values(statistics).reduce(
|
|
132
135
|
(acc, curr) => ({
|
|
133
136
|
translatedCount: acc.translatedCount + curr.translated,
|
|
@@ -137,6 +140,39 @@ var TranslationsCompletionSection = ({
|
|
|
137
140
|
);
|
|
138
141
|
const percentage = totalCount > 0 ? translatedCount / totalCount * 100 : 0;
|
|
139
142
|
const remaining = Math.max(0, totalCount - translatedCount);
|
|
143
|
+
const localeStats = useMemo(() => {
|
|
144
|
+
const localeMap = /* @__PURE__ */ new Map();
|
|
145
|
+
locales.forEach((locale) => {
|
|
146
|
+
localeMap.set(locale.code, { translated: 0, expected: 0 });
|
|
147
|
+
});
|
|
148
|
+
Object.values(statistics).forEach((entityStats) => {
|
|
149
|
+
if (entityStats.by_locale) {
|
|
150
|
+
Object.entries(entityStats.by_locale).forEach(
|
|
151
|
+
([localeCode, localeData]) => {
|
|
152
|
+
const existing = localeMap.get(localeCode);
|
|
153
|
+
if (existing) {
|
|
154
|
+
existing.translated += localeData.translated;
|
|
155
|
+
existing.expected += localeData.expected;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
return locales.map((locale) => {
|
|
162
|
+
const stats = localeMap.get(locale.code) || { translated: 0, expected: 0 };
|
|
163
|
+
return {
|
|
164
|
+
code: locale.code,
|
|
165
|
+
name: locale.name,
|
|
166
|
+
translated: stats.translated,
|
|
167
|
+
toTranslate: Math.max(0, stats.expected - stats.translated),
|
|
168
|
+
total: stats.expected
|
|
169
|
+
};
|
|
170
|
+
});
|
|
171
|
+
}, [statistics, locales]);
|
|
172
|
+
const maxTotal = useMemo(
|
|
173
|
+
() => Math.max(...localeStats.map((s) => s.total), 1),
|
|
174
|
+
[localeStats]
|
|
175
|
+
);
|
|
140
176
|
return /* @__PURE__ */ jsxs3(Container3, { className: "flex flex-col gap-y-3 px-6 py-4", children: [
|
|
141
177
|
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between", children: [
|
|
142
178
|
/* @__PURE__ */ jsx3(Heading2, { children: t("translations.completion.heading") }),
|
|
@@ -189,12 +225,114 @@ var TranslationsCompletionSection = ({
|
|
|
189
225
|
" ",
|
|
190
226
|
t("general.remaining").toLowerCase()
|
|
191
227
|
] })
|
|
228
|
+
] }),
|
|
229
|
+
localeStats.length > 0 && /* @__PURE__ */ jsxs3("div", { className: "mt-4 flex flex-col gap-y-2", children: [
|
|
230
|
+
/* @__PURE__ */ jsx3("div", { className: "flex h-32 w-full items-end gap-1", children: localeStats.map((locale) => {
|
|
231
|
+
const heightPercent = locale.total / maxTotal * 100;
|
|
232
|
+
const translatedPercent = locale.total > 0 ? locale.translated / locale.total * 100 : 0;
|
|
233
|
+
return /* @__PURE__ */ jsx3(
|
|
234
|
+
Tooltip,
|
|
235
|
+
{
|
|
236
|
+
open: hoveredLocale === locale.code,
|
|
237
|
+
content: /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-y-1 p-1", children: [
|
|
238
|
+
/* @__PURE__ */ jsx3(Text3, { size: "small", weight: "plus", children: locale.name }),
|
|
239
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between", children: [
|
|
240
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-x-2", children: [
|
|
241
|
+
/* @__PURE__ */ jsx3(
|
|
242
|
+
"div",
|
|
243
|
+
{
|
|
244
|
+
className: "h-2 w-2 rounded-full",
|
|
245
|
+
style: { backgroundColor: "var(--bg-interactive)" }
|
|
246
|
+
}
|
|
247
|
+
),
|
|
248
|
+
/* @__PURE__ */ jsx3(
|
|
249
|
+
Text3,
|
|
250
|
+
{
|
|
251
|
+
size: "small",
|
|
252
|
+
weight: "plus",
|
|
253
|
+
className: "text-ui-fg-subtle",
|
|
254
|
+
children: t("translations.completion.translated")
|
|
255
|
+
}
|
|
256
|
+
)
|
|
257
|
+
] }),
|
|
258
|
+
/* @__PURE__ */ jsx3(Text3, { size: "small", weight: "plus", children: locale.translated })
|
|
259
|
+
] }),
|
|
260
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-x-2", children: [
|
|
261
|
+
/* @__PURE__ */ jsx3(
|
|
262
|
+
"div",
|
|
263
|
+
{
|
|
264
|
+
className: "h-2 w-2 rounded-full",
|
|
265
|
+
style: {
|
|
266
|
+
backgroundColor: "var(--bg-interactive)",
|
|
267
|
+
opacity: 0.3
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
),
|
|
271
|
+
/* @__PURE__ */ jsx3(
|
|
272
|
+
Text3,
|
|
273
|
+
{
|
|
274
|
+
size: "small",
|
|
275
|
+
weight: "plus",
|
|
276
|
+
className: "text-ui-fg-subtle",
|
|
277
|
+
children: t("translations.completion.toTranslate")
|
|
278
|
+
}
|
|
279
|
+
),
|
|
280
|
+
/* @__PURE__ */ jsx3(Text3, { size: "small", weight: "plus", children: locale.toTranslate })
|
|
281
|
+
] })
|
|
282
|
+
] }),
|
|
283
|
+
children: /* @__PURE__ */ jsxs3(
|
|
284
|
+
"div",
|
|
285
|
+
{
|
|
286
|
+
className: "flex min-w-2 flex-1 cursor-pointer flex-col justify-end overflow-hidden rounded-t-sm transition-opacity",
|
|
287
|
+
style: { height: `${heightPercent}%` },
|
|
288
|
+
onMouseEnter: () => setHoveredLocale(locale.code),
|
|
289
|
+
onMouseLeave: () => setHoveredLocale(null),
|
|
290
|
+
children: [
|
|
291
|
+
/* @__PURE__ */ jsx3(
|
|
292
|
+
"div",
|
|
293
|
+
{
|
|
294
|
+
className: "w-full rounded-t-sm",
|
|
295
|
+
style: {
|
|
296
|
+
height: `${100 - translatedPercent}%`,
|
|
297
|
+
backgroundColor: "var(--bg-interactive)",
|
|
298
|
+
opacity: 0.3,
|
|
299
|
+
minHeight: locale.toTranslate > 0 ? "2px" : "0"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
),
|
|
303
|
+
translatedPercent > 0 && /* @__PURE__ */ jsx3(
|
|
304
|
+
"div",
|
|
305
|
+
{
|
|
306
|
+
className: "mt-0.5 w-full rounded-sm",
|
|
307
|
+
style: {
|
|
308
|
+
height: `${translatedPercent}%`,
|
|
309
|
+
backgroundColor: "var(--bg-interactive)",
|
|
310
|
+
minHeight: locale.translated > 0 ? "2px" : "0"
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
)
|
|
314
|
+
]
|
|
315
|
+
}
|
|
316
|
+
)
|
|
317
|
+
},
|
|
318
|
+
locale.code
|
|
319
|
+
);
|
|
320
|
+
}) }),
|
|
321
|
+
/* @__PURE__ */ jsx3(
|
|
322
|
+
Text3,
|
|
323
|
+
{
|
|
324
|
+
size: "small",
|
|
325
|
+
weight: "plus",
|
|
326
|
+
className: "text-ui-fg-muted text-center",
|
|
327
|
+
children: t("translations.completion.footer")
|
|
328
|
+
}
|
|
329
|
+
)
|
|
192
330
|
] })
|
|
193
331
|
] });
|
|
194
332
|
};
|
|
195
333
|
|
|
196
334
|
// src/routes/translations/translation-list/translation-list.tsx
|
|
197
|
-
import { useMemo } from "react";
|
|
335
|
+
import { useMemo as useMemo2 } from "react";
|
|
198
336
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
199
337
|
var TranslationList = () => {
|
|
200
338
|
const { t } = useTranslation4();
|
|
@@ -225,7 +363,7 @@ var TranslationList = () => {
|
|
|
225
363
|
throw error || translationSettingsError || translationStatisticsError;
|
|
226
364
|
}
|
|
227
365
|
const hasLocales = (store?.supported_locales ?? []).length > 0;
|
|
228
|
-
const translatableEntities =
|
|
366
|
+
const translatableEntities = useMemo2(() => {
|
|
229
367
|
if (!translatable_fields) {
|
|
230
368
|
return [];
|
|
231
369
|
}
|
|
@@ -284,7 +422,15 @@ var TranslationList = () => {
|
|
|
284
422
|
) ?? []
|
|
285
423
|
}
|
|
286
424
|
),
|
|
287
|
-
/* @__PURE__ */ jsx4(
|
|
425
|
+
/* @__PURE__ */ jsx4(
|
|
426
|
+
TranslationsCompletionSection,
|
|
427
|
+
{
|
|
428
|
+
statistics: statistics ?? {},
|
|
429
|
+
locales: store?.supported_locales?.map(
|
|
430
|
+
(supportedLocale) => supportedLocale.locale
|
|
431
|
+
) ?? []
|
|
432
|
+
}
|
|
433
|
+
)
|
|
288
434
|
] })
|
|
289
435
|
]
|
|
290
436
|
}
|
|
@@ -324,7 +324,7 @@ var TranslationsEditForm = ({
|
|
|
324
324
|
const calculateColumnWidth = () => {
|
|
325
325
|
if (containerRef.current) {
|
|
326
326
|
const containerWidth = containerRef.current.offsetWidth;
|
|
327
|
-
const availableWidth = containerWidth - FIELD_COLUMN_WIDTH -
|
|
327
|
+
const availableWidth = containerWidth - FIELD_COLUMN_WIDTH - 16;
|
|
328
328
|
const columnWidth = Math.max(300, Math.floor(availableWidth / 2));
|
|
329
329
|
setDynamicColumnWidth(columnWidth);
|
|
330
330
|
}
|
|
@@ -458,11 +458,7 @@ var TranslationsEditForm = ({
|
|
|
458
458
|
async (closeOnSuccess = false) => {
|
|
459
459
|
const success = await saveCurrentLocale();
|
|
460
460
|
if (success) {
|
|
461
|
-
toast.success(
|
|
462
|
-
t("translations.edit.successToast", {
|
|
463
|
-
defaultValue: "Translations updated successfully"
|
|
464
|
-
})
|
|
465
|
-
);
|
|
461
|
+
toast.success(t("translations.edit.successToast"));
|
|
466
462
|
if (closeOnSuccess) {
|
|
467
463
|
handleSuccess();
|
|
468
464
|
}
|
|
@@ -477,9 +473,6 @@ var TranslationsEditForm = ({
|
|
|
477
473
|
entityType
|
|
478
474
|
);
|
|
479
475
|
if (payload.create.length === 0 && payload.update.length === 0 && payload.delete.length === 0) {
|
|
480
|
-
toast.info(
|
|
481
|
-
t("translations.noChanges", { defaultValue: "No changes to save" })
|
|
482
|
-
);
|
|
483
476
|
return;
|
|
484
477
|
}
|
|
485
478
|
const BATCH_SIZE = 150;
|
|
@@ -585,7 +578,7 @@ var TranslationsEditForm = ({
|
|
|
585
578
|
variant: "secondary",
|
|
586
579
|
onClick: () => handleSave(false),
|
|
587
580
|
isLoading: isPending,
|
|
588
|
-
children: t("actions.saveChanges"
|
|
581
|
+
children: t("actions.saveChanges")
|
|
589
582
|
}
|
|
590
583
|
),
|
|
591
584
|
/* @__PURE__ */ jsx(
|
|
@@ -595,7 +588,7 @@ var TranslationsEditForm = ({
|
|
|
595
588
|
type: "button",
|
|
596
589
|
onClick: () => handleSave(true),
|
|
597
590
|
isLoading: isPending,
|
|
598
|
-
children: t("actions.saveAndClose"
|
|
591
|
+
children: t("actions.saveAndClose")
|
|
599
592
|
}
|
|
600
593
|
)
|
|
601
594
|
] }) })
|
|
@@ -604,12 +597,8 @@ var TranslationsEditForm = ({
|
|
|
604
597
|
),
|
|
605
598
|
/* @__PURE__ */ jsx(Prompt, { open: showUnsavedPrompt, variant: "confirmation", children: /* @__PURE__ */ jsxs(Prompt.Content, { children: [
|
|
606
599
|
/* @__PURE__ */ jsxs(Prompt.Header, { children: [
|
|
607
|
-
/* @__PURE__ */ jsx(Prompt.Title, { children: t("translations.unsavedChanges.title",
|
|
608
|
-
|
|
609
|
-
}) }),
|
|
610
|
-
/* @__PURE__ */ jsx(Prompt.Description, { children: t("translations.unsavedChanges.description", {
|
|
611
|
-
defaultValue: "You have unsaved changes for this locale. Save them before switching?"
|
|
612
|
-
}) })
|
|
600
|
+
/* @__PURE__ */ jsx(Prompt.Title, { children: t("translations.edit.unsavedChanges.title") }),
|
|
601
|
+
/* @__PURE__ */ jsx(Prompt.Description, { children: t("translations.edit.unsavedChanges.description") })
|
|
613
602
|
] }),
|
|
614
603
|
/* @__PURE__ */ jsxs(Prompt.Footer, { children: [
|
|
615
604
|
/* @__PURE__ */ jsx(
|
|
@@ -629,7 +618,7 @@ var TranslationsEditForm = ({
|
|
|
629
618
|
onClick: handleSaveAndSwitch,
|
|
630
619
|
type: "button",
|
|
631
620
|
isLoading: isPending,
|
|
632
|
-
children: t("actions.saveChanges"
|
|
621
|
+
children: t("actions.saveChanges")
|
|
633
622
|
}
|
|
634
623
|
)
|
|
635
624
|
] })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/dashboard",
|
|
3
|
-
"version": "3.0.0-snapshot-
|
|
3
|
+
"version": "3.0.0-snapshot-20251216145629",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"generate:static": "node ./scripts/generate-currencies.js && prettier --write ./src/lib/currencies.ts",
|
|
6
6
|
"dev": "../../../node_modules/.bin/vite",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"@dnd-kit/utilities": "^3.2.2",
|
|
47
47
|
"@hookform/error-message": "^2.0.1",
|
|
48
48
|
"@hookform/resolvers": "3.4.2",
|
|
49
|
-
"@medusajs/admin-shared": "3.0.0-snapshot-
|
|
50
|
-
"@medusajs/icons": "3.0.0-snapshot-
|
|
51
|
-
"@medusajs/js-sdk": "3.0.0-snapshot-
|
|
52
|
-
"@medusajs/ui": "4.0.31-snapshot-
|
|
49
|
+
"@medusajs/admin-shared": "3.0.0-snapshot-20251216145629",
|
|
50
|
+
"@medusajs/icons": "3.0.0-snapshot-20251216145629",
|
|
51
|
+
"@medusajs/js-sdk": "3.0.0-snapshot-20251216145629",
|
|
52
|
+
"@medusajs/ui": "4.0.31-snapshot-20251216145629",
|
|
53
53
|
"@radix-ui/react-dialog": "1.1.4",
|
|
54
54
|
"@radix-ui/react-dismissable-layer": "1.1.4",
|
|
55
55
|
"@tanstack/react-query": "5.64.2",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"zod": "3.25.76"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@medusajs/admin-shared": "3.0.0-snapshot-
|
|
84
|
-
"@medusajs/admin-vite-plugin": "3.0.0-snapshot-
|
|
85
|
-
"@medusajs/types": "3.0.0-snapshot-
|
|
86
|
-
"@medusajs/ui-preset": "3.0.0-snapshot-
|
|
83
|
+
"@medusajs/admin-shared": "3.0.0-snapshot-20251216145629",
|
|
84
|
+
"@medusajs/admin-vite-plugin": "3.0.0-snapshot-20251216145629",
|
|
85
|
+
"@medusajs/types": "3.0.0-snapshot-20251216145629",
|
|
86
|
+
"@medusajs/ui-preset": "3.0.0-snapshot-20251216145629"
|
|
87
87
|
},
|
|
88
88
|
"packageManager": "yarn@3.2.1"
|
|
89
89
|
}
|
|
@@ -389,6 +389,12 @@
|
|
|
389
389
|
"save": {
|
|
390
390
|
"type": "string"
|
|
391
391
|
},
|
|
392
|
+
"saveChanges": {
|
|
393
|
+
"type": "string"
|
|
394
|
+
},
|
|
395
|
+
"saveAndClose": {
|
|
396
|
+
"type": "string"
|
|
397
|
+
},
|
|
392
398
|
"saveAsDraft": {
|
|
393
399
|
"type": "string"
|
|
394
400
|
},
|
|
@@ -521,7 +527,9 @@
|
|
|
521
527
|
},
|
|
522
528
|
"required": [
|
|
523
529
|
"save",
|
|
530
|
+
"saveChanges",
|
|
524
531
|
"saveAsDraft",
|
|
532
|
+
"saveAndClose",
|
|
525
533
|
"copy",
|
|
526
534
|
"copied",
|
|
527
535
|
"duplicate",
|
|
@@ -9366,6 +9374,27 @@
|
|
|
9366
9374
|
},
|
|
9367
9375
|
"required": ["manageLocales", "manage"]
|
|
9368
9376
|
},
|
|
9377
|
+
"edit": {
|
|
9378
|
+
"type": "object",
|
|
9379
|
+
"properties": {
|
|
9380
|
+
"successToast": {
|
|
9381
|
+
"type": "string"
|
|
9382
|
+
},
|
|
9383
|
+
"unsavedChanges": {
|
|
9384
|
+
"type": "object",
|
|
9385
|
+
"properties": {
|
|
9386
|
+
"title": {
|
|
9387
|
+
"type": "string"
|
|
9388
|
+
},
|
|
9389
|
+
"description": {
|
|
9390
|
+
"type": "string"
|
|
9391
|
+
}
|
|
9392
|
+
},
|
|
9393
|
+
"required": ["title", "description"]
|
|
9394
|
+
}
|
|
9395
|
+
},
|
|
9396
|
+
"required": ["successToast", "unsavedChanges"]
|
|
9397
|
+
},
|
|
9369
9398
|
"bulk": {
|
|
9370
9399
|
"type": "object",
|
|
9371
9400
|
"properties": {
|
|
@@ -9398,12 +9427,28 @@
|
|
|
9398
9427
|
"properties": {
|
|
9399
9428
|
"heading": {
|
|
9400
9429
|
"type": "string"
|
|
9430
|
+
},
|
|
9431
|
+
"translated": {
|
|
9432
|
+
"type": "string"
|
|
9433
|
+
},
|
|
9434
|
+
"toTranslate": {
|
|
9435
|
+
"type": "string"
|
|
9436
|
+
},
|
|
9437
|
+
"footer": {
|
|
9438
|
+
"type": "string"
|
|
9401
9439
|
}
|
|
9402
9440
|
},
|
|
9403
|
-
"required": ["heading"]
|
|
9441
|
+
"required": ["heading", "translated", "toTranslate", "footer"]
|
|
9404
9442
|
}
|
|
9405
9443
|
},
|
|
9406
|
-
"required": [
|
|
9444
|
+
"required": [
|
|
9445
|
+
"domain",
|
|
9446
|
+
"actions",
|
|
9447
|
+
"subtitle",
|
|
9448
|
+
"bulk",
|
|
9449
|
+
"completion",
|
|
9450
|
+
"edit"
|
|
9451
|
+
]
|
|
9407
9452
|
},
|
|
9408
9453
|
"store": {
|
|
9409
9454
|
"type": "object",
|
|
@@ -101,7 +101,9 @@
|
|
|
101
101
|
},
|
|
102
102
|
"actions": {
|
|
103
103
|
"save": "Save",
|
|
104
|
+
"saveChanges": "Save changes",
|
|
104
105
|
"saveAsDraft": "Save as draft",
|
|
106
|
+
"saveAndClose": "Save and close",
|
|
105
107
|
"copy": "Copy",
|
|
106
108
|
"copied": "Copied",
|
|
107
109
|
"duplicate": "Duplicate",
|
|
@@ -2517,6 +2519,13 @@
|
|
|
2517
2519
|
"list": {
|
|
2518
2520
|
"metrics": "{{translated}} of {{total}} fields translated"
|
|
2519
2521
|
},
|
|
2522
|
+
"edit": {
|
|
2523
|
+
"successToast": "Translations updated successfully",
|
|
2524
|
+
"unsavedChanges": {
|
|
2525
|
+
"title": "Unsaved translations",
|
|
2526
|
+
"description": "Don't lose your work. You have changes that haven't been saved yet"
|
|
2527
|
+
}
|
|
2528
|
+
},
|
|
2520
2529
|
"bulk": {
|
|
2521
2530
|
"header": "Translations Bulk Editor",
|
|
2522
2531
|
"mainColumn": "Locale"
|
|
@@ -2527,7 +2536,10 @@
|
|
|
2527
2536
|
"noLocalesTip": "Configure at least one locale to start translating your data"
|
|
2528
2537
|
},
|
|
2529
2538
|
"completion": {
|
|
2530
|
-
"heading": "Translated
|
|
2539
|
+
"heading": "Translated fields",
|
|
2540
|
+
"translated": "Translated",
|
|
2541
|
+
"toTranslate": "To be translated",
|
|
2542
|
+
"footer": "Languages"
|
|
2531
2543
|
}
|
|
2532
2544
|
},
|
|
2533
2545
|
"store": {
|