Skip to content

Commit e0879ff

Browse files
committed
fix: adapt upload limit dialog wording for public shared links
1 parent 6e5e91c commit e0879ff

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

src/locales/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,9 @@
362362
"limit": {
363363
"title": "You cannot upload more than %{limit} files at a time.",
364364
"content": "Need to upload more? Consider downloading the synchronization tool to your computer",
365+
"content_public": "Please reduce the number of files and try again.",
365366
"cancel": "Cancel",
367+
"close": "Close",
366368
"download_desktop": "Download on Desktop"
367369
}
368370
},

src/locales/fr.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,9 @@
359359
"limit": {
360360
"title": "Importation impossible : Ce dossier contient plus de %{limit} fichiers",
361361
"content": "Pour une importation de cette taille, nous vous recommandons d'utiliser l'application de synchronisation sur ordinateur.",
362+
"content_public": "Veuillez réduire le nombre de fichiers et réessayer.",
362363
"cancel": "Annuler",
364+
"close": "Fermer",
363365
"download_desktop": "Installer l'application"
364366
}
365367
},

src/modules/upload/UploadLimitDialog.jsx

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,28 @@ const UploadLimitDialog = ({ onClose, maxFileCount }) => {
2525
open
2626
onClose={onClose}
2727
title={t('upload.limit.title', { limit: maxFileCount })}
28-
content={<Typography>{t('upload.limit.content')}</Typography>}
28+
content={
29+
<Typography>
30+
{t(isPublic ? 'upload.limit.content_public' : 'upload.limit.content')}
31+
</Typography>
32+
}
2933
actions={
30-
<>
31-
<Button
32-
variant="secondary"
33-
onClick={onClose}
34-
label={t('upload.limit.cancel')}
35-
/>
36-
{!isPublic && (
34+
isPublic ? (
35+
<Button onClick={onClose} label={t('upload.limit.close')} />
36+
) : (
37+
<>
38+
<Button
39+
variant="secondary"
40+
onClick={onClose}
41+
label={t('upload.limit.cancel')}
42+
/>
3743
<Button
3844
onClick={handleDownloadDesktop}
3945
label={t('upload.limit.download_desktop')}
4046
startIcon={<Icon icon={DesktopDownloadIcon} />}
4147
/>
42-
)}
43-
</>
48+
</>
49+
)
4450
}
4551
/>
4652
)

0 commit comments

Comments
 (0)