@medusajs/dashboard 2.12.3-snapshot-20251216185234 → 2.12.3
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/add-locales-GGNZCABB.mjs +81 -0
- package/dist/{api-key-management-detail-6RCDH73M.mjs → api-key-management-detail-FRUN2KFK.mjs} +1 -1
- package/dist/app.css +19 -0
- package/dist/app.js +795 -680
- package/dist/app.mjs +2 -2
- package/dist/{campaign-detail-5Q4BYCPX.mjs → campaign-detail-HM3GQJLQ.mjs} +1 -1
- package/dist/{categories-metadata-J7M3XWI7.mjs → categories-metadata-WKL3MGD7.mjs} +1 -1
- package/dist/{category-detail-S5IPXMHX.mjs → category-detail-UTWWDKFP.mjs} +2 -2
- package/dist/{category-products-KPW6BA5J.mjs → category-products-XXBTCXFF.mjs} +2 -2
- package/dist/{chunk-OL24RDYM.mjs → chunk-5F427YCP.mjs} +2 -2
- package/dist/{chunk-MJDHVDOW.mjs → chunk-5ISRTMYH.mjs} +1 -1
- package/dist/{chunk-ST4P6BQN.mjs → chunk-DQUXK4WW.mjs} +1 -1
- package/dist/{chunk-YYOPBKME.mjs → chunk-DTCIBQO2.mjs} +1 -1
- package/dist/{chunk-LZFWCKOF.mjs → chunk-FKNW5MLZ.mjs} +21 -4
- package/dist/{chunk-GRZSG4EP.mjs → chunk-GLBHPDR4.mjs} +21 -16
- package/dist/{chunk-WYATCUOM.mjs → chunk-HNJ65IND.mjs} +1 -1
- package/dist/{store-add-locales-VJ4RJ7UI.mjs → chunk-IKTGFXWR.mjs} +2 -67
- package/dist/{chunk-DBXWB3RF.mjs → chunk-KSDXSKJ7.mjs} +1 -1
- package/dist/{chunk-OL6MEUKW.mjs → chunk-LWYKUORZ.mjs} +108 -105
- package/dist/{chunk-PHLCT2HA.mjs → chunk-OK6NZN2A.mjs} +1 -1
- package/dist/{chunk-ZMG5B4FG.mjs → chunk-SG2JZPTG.mjs} +1 -1
- package/dist/{chunk-CVHJAKLQ.mjs → chunk-UMCJYHAD.mjs} +1 -1
- package/dist/{collection-add-products-FU2BS3D3.mjs → collection-add-products-42F7H77E.mjs} +2 -2
- package/dist/{collection-detail-VJE7XHLV.mjs → collection-detail-PXIS3G64.mjs} +2 -2
- package/dist/{collection-list-IGA6SCNF.mjs → collection-list-O74CGY24.mjs} +2 -2
- package/dist/{collection-metadata-QK7MI3D2.mjs → collection-metadata-U6FMA4IC.mjs} +1 -1
- package/dist/{customer-detail-MOV2T3LF.mjs → customer-detail-OMTFJ6CE.mjs} +1 -1
- package/dist/{customer-group-detail-6T7OXGQD.mjs → customer-group-detail-ADK3M5LG.mjs} +1 -1
- package/dist/{customer-group-list-AJEAF5D2.mjs → customer-group-list-7ZRQ2HWU.mjs} +1 -1
- package/dist/{customers-add-customer-group-QVTVSQYM.mjs → customers-add-customer-group-5U27WHJB.mjs} +1 -1
- package/dist/{edit-rules-SMVRTCUP.mjs → edit-rules-BM2ERGVJ.mjs} +1 -1
- package/dist/en.json +1 -2
- package/dist/{inventory-create-BK52VALF.mjs → inventory-create-7MA7B5N2.mjs} +2 -2
- package/dist/{inventory-detail-ZPSEMYI2.mjs → inventory-detail-B4PRHZK3.mjs} +1 -1
- package/dist/{inventory-metadata-FNEJ3RAT.mjs → inventory-metadata-C7MJ3GY5.mjs} +1 -1
- package/dist/{inventory-stock-6WYWLWJ7.mjs → inventory-stock-WVTYPJTX.mjs} +3 -3
- package/dist/{location-detail-N3GUZSY7.mjs → location-detail-KO6EBDK5.mjs} +1 -1
- package/dist/{location-fulfillment-providers-7ZUJAGNY.mjs → location-fulfillment-providers-IORBE3E3.mjs} +2 -2
- package/dist/{location-service-zone-shipping-option-create-CNRWYZQC.mjs → location-service-zone-shipping-option-create-2R3ZFLVK.mjs} +3 -3
- package/dist/{location-service-zone-shipping-option-pricing-OGWI7VPT.mjs → location-service-zone-shipping-option-pricing-5HN2Z5RB.mjs} +2 -2
- package/dist/{login-VNOLI5YG.mjs → login-XKB6OR7I.mjs} +1 -1
- package/dist/{order-create-claim-SCDJGM46.mjs → order-create-claim-NKCOGF4A.mjs} +1 -1
- package/dist/{order-create-edit-2WALBPXS.mjs → order-create-edit-UNQYXGLL.mjs} +1 -1
- package/dist/{order-create-exchange-LQU4YN7F.mjs → order-create-exchange-WI7OA2WO.mjs} +1 -1
- package/dist/{order-create-fulfillment-OWUVTZXW.mjs → order-create-fulfillment-2LJTEWDY.mjs} +1 -1
- package/dist/{order-create-refund-Q6HQY42R.mjs → order-create-refund-7K6UJXGP.mjs} +1 -1
- package/dist/{order-create-shipment-WAGGEPRW.mjs → order-create-shipment-ZTDLLUBY.mjs} +1 -1
- package/dist/{order-detail-PVPGEWGY.mjs → order-detail-JTRUMRLO.mjs} +1 -1
- package/dist/{order-edit-billing-address-UM76J4KX.mjs → order-edit-billing-address-YHYNVLOE.mjs} +1 -1
- package/dist/{order-edit-email-CL3KNOCM.mjs → order-edit-email-TCQPEVZY.mjs} +1 -1
- package/dist/{order-edit-shipping-address-PIESTGVL.mjs → order-edit-shipping-address-CFSYQLKD.mjs} +1 -1
- package/dist/{order-export-LE363ZLB.mjs → order-export-G4SBNEJ7.mjs} +1 -1
- package/dist/{order-metadata-FHBB7MTG.mjs → order-metadata-KGPB37VL.mjs} +1 -1
- package/dist/{order-receive-return-PRVKP6J2.mjs → order-receive-return-JER24SEV.mjs} +1 -1
- package/dist/{order-request-transfer-XSAGRUMT.mjs → order-request-transfer-3FBUYZNT.mjs} +1 -1
- package/dist/{price-list-create-K5JEZT57.mjs → price-list-create-CXZCFFTP.mjs} +4 -4
- package/dist/{price-list-detail-Q5VG5VGW.mjs → price-list-detail-XOMU6U5J.mjs} +2 -2
- package/dist/{price-list-prices-add-2MQ226U4.mjs → price-list-prices-add-SDX5CQME.mjs} +4 -4
- package/dist/{price-list-prices-edit-OJZLV7OS.mjs → price-list-prices-edit-EKB6NI5D.mjs} +2 -2
- package/dist/{product-attributes-YF4TZOIO.mjs → product-attributes-STD47BGC.mjs} +2 -2
- package/dist/{product-create-KJML2332.mjs → product-create-LVGWVQAT.mjs} +3 -3
- package/dist/{product-create-variant-5EBCLM54.mjs → product-create-variant-OTJKT6WI.mjs} +2 -2
- package/dist/{product-detail-QG72542C.mjs → product-detail-OYVHJH3D.mjs} +2 -2
- package/dist/{product-edit-DZZR775Q.mjs → product-edit-3SIUUIW4.mjs} +2 -2
- package/dist/{product-export-5AD7NELI.mjs → product-export-57UUAGXF.mjs} +2 -2
- package/dist/{product-image-variants-edit-M6QF2RLE.mjs → product-image-variants-edit-2BW5BJON.mjs} +1 -1
- package/dist/{product-import-V3KQN4TV.mjs → product-import-6EM4VUXP.mjs} +1 -1
- package/dist/{product-list-EUWZIFTM.mjs → product-list-5V5GEH5K.mjs} +2 -2
- package/dist/{product-metadata-GL2MVPDI.mjs → product-metadata-JZLHBLZQ.mjs} +1 -1
- package/dist/{product-organization-O7RHELMQ.mjs → product-organization-3PQ45C4B.mjs} +2 -2
- package/dist/{product-prices-YWV6MSM6.mjs → product-prices-5ZL2RP7A.mjs} +1 -1
- package/dist/{product-stock-AKEFMK5O.mjs → product-stock-SJJABF6I.mjs} +3 -3
- package/dist/{product-tag-create-PQMDDKWH.mjs → product-tag-create-XXO4AQEC.mjs} +1 -1
- package/dist/{product-tag-detail-I3MBZX7U.mjs → product-tag-detail-BSK64HXL.mjs} +3 -3
- package/dist/{product-tag-edit-K3BBQLJR.mjs → product-tag-edit-ENCGDT7E.mjs} +1 -1
- package/dist/{product-tag-list-JUWSOMB7.mjs → product-tag-list-SLQGCNDZ.mjs} +3 -3
- package/dist/{product-tag-metadata-MJH5LH7E.mjs → product-tag-metadata-EPXHMU2K.mjs} +1 -1
- package/dist/{product-type-detail-RKHT5NBL.mjs → product-type-detail-4CRRU7YK.mjs} +2 -2
- package/dist/{product-type-metadata-CDJDFFGQ.mjs → product-type-metadata-73OKOGPP.mjs} +1 -1
- package/dist/{product-variant-detail-XAYG5CKE.mjs → product-variant-detail-RPHLG4HU.mjs} +1 -1
- package/dist/{product-variant-edit-DEZEY2H2.mjs → product-variant-edit-JF7NN64Y.mjs} +1 -1
- package/dist/{product-variant-metadata-VTZDNWUT.mjs → product-variant-metadata-HU2CXGPO.mjs} +1 -1
- package/dist/{promotion-create-HWFNUQXG.mjs → promotion-create-BHA3FQG2.mjs} +1 -1
- package/dist/{promotion-detail-QC36KXB3.mjs → promotion-detail-F3QSR52W.mjs} +1 -1
- package/dist/{refund-reason-create-YHCDEHGQ.mjs → refund-reason-create-ZA5TKW2Z.mjs} +1 -1
- package/dist/{refund-reason-edit-CZ5QZ2SZ.mjs → refund-reason-edit-N2CRCLKZ.mjs} +1 -1
- package/dist/{refund-reason-list-OJYYEYJE.mjs → refund-reason-list-SE4TMGMT.mjs} +1 -1
- package/dist/{region-metadata-H6XXUQ4S.mjs → region-metadata-O5NZBWXP.mjs} +1 -1
- package/dist/{reservation-detail-LZAQL4XA.mjs → reservation-detail-UFK6XIXE.mjs} +1 -1
- package/dist/{reservation-metadata-5HZSDDOK.mjs → reservation-metadata-AEJEKGLV.mjs} +1 -1
- package/dist/{sales-channel-add-products-F7YV4MO5.mjs → sales-channel-add-products-2LMB7EF5.mjs} +2 -2
- package/dist/{sales-channel-detail-MXIPZCGA.mjs → sales-channel-detail-EUQ4STQI.mjs} +2 -2
- package/dist/{sales-channel-list-RLGL7FM3.mjs → sales-channel-list-JXKGHX4G.mjs} +1 -1
- package/dist/{sales-channel-metadata-M364R4RJ.mjs → sales-channel-metadata-AJMQ5SQ2.mjs} +1 -1
- package/dist/{shipping-option-type-create-C5WUWON7.mjs → shipping-option-type-create-YVVIA2XC.mjs} +1 -1
- package/dist/{shipping-option-type-detail-PENS2K73.mjs → shipping-option-type-detail-ZZW36XLK.mjs} +2 -2
- package/dist/{shipping-option-type-edit-CIU5EHRP.mjs → shipping-option-type-edit-O6F74T3A.mjs} +1 -1
- package/dist/{shipping-option-type-list-DIOX7VG7.mjs → shipping-option-type-list-SPTE7MT6.mjs} +2 -2
- package/dist/{shipping-profile-metadata-75G2NNMA.mjs → shipping-profile-metadata-7WFE55VG.mjs} +1 -1
- package/dist/store-add-locales-GWCGIXHU.mjs +81 -0
- package/dist/{store-detail-JSNPOB2F.mjs → store-detail-YLJLBBZE.mjs} +1 -1
- package/dist/{store-metadata-CYXTVJUE.mjs → store-metadata-BZ57I2E6.mjs} +1 -1
- package/dist/{tax-region-create-DWGL4EUT.mjs → tax-region-create-FGTV7VJL.mjs} +1 -1
- package/dist/{tax-region-detail-2AE2EFI3.mjs → tax-region-detail-PPIMD7OX.mjs} +5 -5
- package/dist/{tax-region-edit-EEVEEU2Q.mjs → tax-region-edit-ELZKA7YH.mjs} +1 -1
- package/dist/{tax-region-province-detail-4ERSEQFF.mjs → tax-region-province-detail-FV2NDT3E.mjs} +5 -5
- package/dist/{tax-region-tax-override-create-PHCGEF7V.mjs → tax-region-tax-override-create-N572MQPZ.mjs} +3 -3
- package/dist/{tax-region-tax-override-edit-SMRPSILC.mjs → tax-region-tax-override-edit-5DCSJW6D.mjs} +4 -4
- package/dist/{translation-list-UF7FLXOW.mjs → translation-list-FK7XYLHX.mjs} +227 -141
- package/dist/{translations-edit-USQJNMAY.mjs → translations-edit-VRXZI5KW.mjs} +224 -253
- package/dist/{user-metadata-2WPJOEJA.mjs → user-metadata-GRJZZ524.mjs} +1 -1
- package/dist/{workflow-execution-detail-H2AKEZJX.mjs → workflow-execution-detail-HXTFWGKG.mjs} +1 -1
- package/package.json +9 -9
- package/src/components/data-grid/hooks/use-data-grid-cell.tsx +1 -0
- package/src/components/data-grid/hooks/use-data-grid-form-handlers.tsx +1 -0
- package/src/components/data-grid/hooks/use-data-grid-keydown-event.tsx +22 -4
- package/src/dashboard-app/routes/get-route.map.tsx +4 -0
- package/src/hooks/api/translations.tsx +26 -17
- package/src/i18n/translations/en.json +1 -2
- package/src/i18n/translations/es.json +1 -1
- package/src/routes/translations/add-locales/add-locales.tsx +29 -0
- package/src/routes/translations/add-locales/index.tsx +1 -0
- package/src/routes/translations/translation-list/components/active-locales-section/active-locales-section.tsx +42 -17
- package/src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx +5 -1
- package/src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx +182 -121
- package/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx +285 -330
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdminTranslationEntityStatistics, HttpTypes } from "@medusajs/types"
|
|
2
|
-
import { Container, Heading, Text, Tooltip } from "@medusajs/ui"
|
|
2
|
+
import { Container, Divider, Heading, Text, Tooltip } from "@medusajs/ui"
|
|
3
3
|
import { useMemo, useState } from "react"
|
|
4
4
|
import { useTranslation } from "react-i18next"
|
|
5
5
|
|
|
@@ -75,149 +75,210 @@ export const TranslationsCompletionSection = ({
|
|
|
75
75
|
[localeStats]
|
|
76
76
|
)
|
|
77
77
|
|
|
78
|
+
const localeStatsCount = useMemo(() => localeStats.length, [localeStats])
|
|
79
|
+
|
|
78
80
|
return (
|
|
79
|
-
<Container className="
|
|
80
|
-
<div className="flex
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
<Container className="p-0">
|
|
82
|
+
<div className="flex flex-col gap-y-4 px-6 py-4">
|
|
83
|
+
<div className="flex items-center justify-between">
|
|
84
|
+
<Heading level="h2">{t("translations.completion.heading")}</Heading>
|
|
85
|
+
<Text size="small" weight="plus" className="text-ui-fg-subtle">
|
|
86
|
+
{translatedCount.toLocaleString()} {t("general.of")}{" "}
|
|
87
|
+
{totalCount.toLocaleString()}
|
|
88
|
+
</Text>
|
|
89
|
+
</div>
|
|
87
90
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
<div className="flex h-3 w-full overflow-hidden">
|
|
92
|
+
{percentage > 0 ? (
|
|
93
|
+
<>
|
|
94
|
+
<div
|
|
95
|
+
className="mr-0.5 h-full rounded-sm transition-all"
|
|
96
|
+
style={{
|
|
97
|
+
width: `${percentage}%`,
|
|
98
|
+
backgroundColor: "var(--tag-blue-icon)",
|
|
99
|
+
boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
|
|
100
|
+
}}
|
|
101
|
+
/>
|
|
102
|
+
<div
|
|
103
|
+
className="h-full flex-1 rounded-sm"
|
|
104
|
+
style={{
|
|
105
|
+
backgroundColor: "var(--tag-blue-border)",
|
|
106
|
+
boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
|
|
107
|
+
}}
|
|
108
|
+
/>
|
|
109
|
+
</>
|
|
110
|
+
) : (
|
|
91
111
|
<div
|
|
92
|
-
className="
|
|
112
|
+
className="h-full w-full rounded-sm"
|
|
93
113
|
style={{
|
|
94
|
-
|
|
95
|
-
|
|
114
|
+
backgroundColor: "var(--tag-blue-border)",
|
|
115
|
+
boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
|
|
96
116
|
}}
|
|
97
117
|
/>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
style={{
|
|
101
|
-
backgroundColor: "var(--bg-interactive)",
|
|
102
|
-
opacity: 0.3,
|
|
103
|
-
}}
|
|
104
|
-
/>
|
|
105
|
-
</>
|
|
106
|
-
) : (
|
|
107
|
-
<div
|
|
108
|
-
className="h-full w-full rounded-full"
|
|
109
|
-
style={{
|
|
110
|
-
backgroundColor: "var(--bg-interactive)",
|
|
111
|
-
opacity: 0.3,
|
|
112
|
-
}}
|
|
113
|
-
/>
|
|
114
|
-
)}
|
|
115
|
-
</div>
|
|
118
|
+
)}
|
|
119
|
+
</div>
|
|
116
120
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
<div className="flex items-center justify-between">
|
|
122
|
+
<Text size="small" weight="plus" className="text-ui-fg-subtle">
|
|
123
|
+
{percentage.toFixed(1)}%
|
|
124
|
+
</Text>
|
|
125
|
+
<Text size="small" weight="plus" className="text-ui-fg-subtle">
|
|
126
|
+
{remaining.toLocaleString()} {t("general.remaining").toLowerCase()}
|
|
127
|
+
</Text>
|
|
128
|
+
</div>
|
|
124
129
|
</div>
|
|
125
130
|
|
|
126
131
|
{localeStats.length > 0 && (
|
|
127
|
-
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
<div className="flex
|
|
144
|
-
<
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
132
|
+
<>
|
|
133
|
+
<Divider variant="dashed" />
|
|
134
|
+
<div className="flex flex-col gap-y-3 px-6 pb-6 pt-4">
|
|
135
|
+
<div className="flex h-32 w-full items-end gap-1">
|
|
136
|
+
{localeStats.map((locale) => {
|
|
137
|
+
const heightPercent = (locale.total / maxTotal) * 100
|
|
138
|
+
const translatedPercent =
|
|
139
|
+
locale.total > 0
|
|
140
|
+
? (locale.translated / locale.total) * 100
|
|
141
|
+
: 0
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<Tooltip
|
|
145
|
+
key={locale.code}
|
|
146
|
+
open={hoveredLocale === locale.code}
|
|
147
|
+
content={
|
|
148
|
+
<div className="flex min-w-[150px] flex-col gap-y-1 p-1">
|
|
149
|
+
<Text size="small" weight="plus">
|
|
150
|
+
{locale.name}
|
|
151
|
+
</Text>
|
|
152
|
+
<div className="flex items-center justify-between">
|
|
153
|
+
<div className="flex items-center gap-x-2">
|
|
154
|
+
<div
|
|
155
|
+
className="h-2 w-2 rounded-full"
|
|
156
|
+
style={{
|
|
157
|
+
backgroundColor: "var(--tag-blue-icon)",
|
|
158
|
+
boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
|
|
159
|
+
}}
|
|
160
|
+
/>
|
|
161
|
+
<Text
|
|
162
|
+
size="small"
|
|
163
|
+
weight="plus"
|
|
164
|
+
className="text-ui-fg-base"
|
|
165
|
+
>
|
|
166
|
+
{t("translations.completion.translated")}
|
|
167
|
+
</Text>
|
|
168
|
+
</div>
|
|
149
169
|
<Text
|
|
150
170
|
size="small"
|
|
151
171
|
weight="plus"
|
|
152
|
-
className="text-ui-fg-
|
|
172
|
+
className="text-ui-fg-base"
|
|
153
173
|
>
|
|
154
|
-
{
|
|
174
|
+
{locale.translated}
|
|
175
|
+
</Text>
|
|
176
|
+
</div>
|
|
177
|
+
<div className="flex items-center justify-between">
|
|
178
|
+
<div className="flex items-center gap-x-2">
|
|
179
|
+
<div
|
|
180
|
+
className="h-2 w-2 rounded-full"
|
|
181
|
+
style={{
|
|
182
|
+
backgroundColor: "var(--tag-blue-border)",
|
|
183
|
+
boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
|
|
184
|
+
}}
|
|
185
|
+
/>
|
|
186
|
+
<Text
|
|
187
|
+
size="small"
|
|
188
|
+
weight="plus"
|
|
189
|
+
className="text-ui-fg-base"
|
|
190
|
+
>
|
|
191
|
+
{t("translations.completion.toTranslate")}
|
|
192
|
+
</Text>
|
|
193
|
+
</div>
|
|
194
|
+
<Text
|
|
195
|
+
size="small"
|
|
196
|
+
weight="plus"
|
|
197
|
+
className="text-ui-fg-base"
|
|
198
|
+
>
|
|
199
|
+
{locale.toTranslate}
|
|
155
200
|
</Text>
|
|
156
201
|
</div>
|
|
157
|
-
<Text size="small" weight="plus">
|
|
158
|
-
{locale.translated}
|
|
159
|
-
</Text>
|
|
160
202
|
</div>
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
203
|
+
}
|
|
204
|
+
>
|
|
205
|
+
<div className="flex h-full flex-1 items-end justify-center">
|
|
206
|
+
<div
|
|
207
|
+
className="flex w-full min-w-2 max-w-[96px] flex-col justify-end overflow-hidden rounded-t-sm transition-opacity"
|
|
208
|
+
style={{ height: `${heightPercent}%` }}
|
|
209
|
+
onMouseEnter={() => setHoveredLocale(locale.code)}
|
|
210
|
+
onMouseLeave={() => setHoveredLocale(null)}
|
|
211
|
+
>
|
|
212
|
+
{translatedPercent === 0 ? (
|
|
213
|
+
<div
|
|
214
|
+
className="w-full rounded-sm"
|
|
215
|
+
style={{
|
|
216
|
+
height: "100%",
|
|
217
|
+
backgroundColor: "var(--tag-neutral-bg)",
|
|
218
|
+
boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
|
|
219
|
+
}}
|
|
220
|
+
/>
|
|
221
|
+
) : (
|
|
222
|
+
<>
|
|
223
|
+
<div
|
|
224
|
+
className="w-full rounded-sm"
|
|
225
|
+
style={{
|
|
226
|
+
height: `${100 - translatedPercent}%`,
|
|
227
|
+
backgroundColor: "var(--tag-blue-border)",
|
|
228
|
+
boxShadow: "inset 0 0 0 0.5px var(--alpha-250)",
|
|
229
|
+
minHeight: locale.toTranslate > 0 ? "2px" : "0",
|
|
230
|
+
}}
|
|
231
|
+
/>
|
|
232
|
+
{translatedPercent > 0 && (
|
|
233
|
+
<div
|
|
234
|
+
className="mt-0.5 w-full rounded-sm"
|
|
235
|
+
style={{
|
|
236
|
+
height: `${translatedPercent}%`,
|
|
237
|
+
backgroundColor: "var(--tag-blue-icon)",
|
|
238
|
+
boxShadow:
|
|
239
|
+
"inset 0 0 0 0.5px var(--alpha-250)",
|
|
240
|
+
minHeight:
|
|
241
|
+
locale.translated > 0 ? "2px" : "0",
|
|
242
|
+
}}
|
|
243
|
+
/>
|
|
244
|
+
)}
|
|
245
|
+
</>
|
|
246
|
+
)}
|
|
179
247
|
</div>
|
|
180
248
|
</div>
|
|
181
|
-
|
|
182
|
-
|
|
249
|
+
</Tooltip>
|
|
250
|
+
)
|
|
251
|
+
})}
|
|
252
|
+
</div>
|
|
253
|
+
{localeStatsCount < 9 && (
|
|
254
|
+
<div className="flex w-full gap-1">
|
|
255
|
+
{localeStats.map((locale) => (
|
|
183
256
|
<div
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
onMouseEnter={() => setHoveredLocale(locale.code)}
|
|
187
|
-
onMouseLeave={() => setHoveredLocale(null)}
|
|
257
|
+
key={locale.code}
|
|
258
|
+
className="flex flex-1 items-center justify-center"
|
|
188
259
|
>
|
|
189
|
-
<
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}}
|
|
197
|
-
/>
|
|
198
|
-
{translatedPercent > 0 && (
|
|
199
|
-
<div
|
|
200
|
-
className="mt-0.5 w-full rounded-sm"
|
|
201
|
-
style={{
|
|
202
|
-
height: `${translatedPercent}%`,
|
|
203
|
-
backgroundColor: "var(--bg-interactive)",
|
|
204
|
-
minHeight: locale.translated > 0 ? "2px" : "0",
|
|
205
|
-
}}
|
|
206
|
-
/>
|
|
207
|
-
)}
|
|
260
|
+
<Text
|
|
261
|
+
size="xsmall"
|
|
262
|
+
weight="plus"
|
|
263
|
+
className="text-ui-fg-subtle min-w-2 whitespace-normal break-words text-center leading-tight"
|
|
264
|
+
>
|
|
265
|
+
{localeStatsCount < 6 ? locale.name : locale.code}
|
|
266
|
+
</Text>
|
|
208
267
|
</div>
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
268
|
+
))}
|
|
269
|
+
</div>
|
|
270
|
+
)}
|
|
271
|
+
{localeStatsCount > 9 && (
|
|
272
|
+
<Text
|
|
273
|
+
weight="plus"
|
|
274
|
+
size="xsmall"
|
|
275
|
+
className="text-ui-fg-subtle text-center"
|
|
276
|
+
>
|
|
277
|
+
{t("translations.completion.footer")}
|
|
278
|
+
</Text>
|
|
279
|
+
)}
|
|
212
280
|
</div>
|
|
213
|
-
|
|
214
|
-
size="small"
|
|
215
|
-
weight="plus"
|
|
216
|
-
className="text-ui-fg-muted text-center"
|
|
217
|
-
>
|
|
218
|
-
{t("translations.completion.footer")}
|
|
219
|
-
</Text>
|
|
220
|
-
</div>
|
|
281
|
+
</>
|
|
221
282
|
)}
|
|
222
283
|
</Container>
|
|
223
284
|
)
|