diff options
-rw-r--r-- | modern/src/settings/CalendarPage.js | 6 | ||||
-rw-r--r-- | modern/src/settings/DevicePage.js | 6 | ||||
-rw-r--r-- | web/l10n/en.json | 11 |
3 files changed, 19 insertions, 4 deletions
diff --git a/modern/src/settings/CalendarPage.js b/modern/src/settings/CalendarPage.js index cd71e9aa..d9cd895a 100644 --- a/modern/src/settings/CalendarPage.js +++ b/modern/src/settings/CalendarPage.js @@ -66,10 +66,14 @@ const CalendarPage = () => { label={t('sharedName')} /> <DropzoneArea - dropzoneText={t('dropzoneText')} + dropzoneText={t('sharedDropzoneText')} filesLimit={1} onChange={handleFiles} alertSnackbarProps={components.MuiSnackbar.defaultProps} + getFileLimitExceedMessage={(filesLimit) => `${t('sharedMaxFileLimit')} ${t('sharedOnly')} ${filesLimit} ${t('sharedAllowed')}`} + getFileAddedMessage={(fileName) => `${t('sharedFile')} ${fileName} ${t('sharedSuccessfullyAdded')}`} + getFileRemovedMessage={(fileName) => `${t('sharedFile')} ${fileName} ${t('sharedRemoved')}`} + getDropRejectMessage={(file) => `${t('sharedFile')} ${file.name} ${t('sharedDropRejectFile')} ${file.size} ${t('sharedMegabytes')}`} /> </AccordionDetails> </Accordion> diff --git a/modern/src/settings/DevicePage.js b/modern/src/settings/DevicePage.js index 6998288c..f3330040 100644 --- a/modern/src/settings/DevicePage.js +++ b/modern/src/settings/DevicePage.js @@ -150,11 +150,15 @@ const DevicePage = () => { </AccordionSummary> <AccordionDetails className={classes.details}> <DropzoneArea - dropzoneText={t('dropzoneText')} + dropzoneText={t('sharedDropzoneText')} acceptedFiles={['image/*']} filesLimit={1} onChange={handleFiles} alertSnackbarProps={components.MuiSnackbar.defaultProps} + getFileLimitExceedMessage={(filesLimit) => `${t('sharedMaxFileLimit')} ${t('sharedOnly')} ${filesLimit} ${t('sharedAllowed')}`} + getFileAddedMessage={(fileName) => `${t('sharedFile')} ${fileName} ${t('sharedSuccessfullyAdded')}`} + getFileRemovedMessage={(fileName) => `${t('sharedFile')} ${fileName} ${t('sharedRemoved')}`} + getDropRejectMessage={(file) => `${t('sharedFile')} ${file.name} ${t('sharedDropRejectFile')} ${file.size} ${t('sharedMegabytes')}`} /> </AccordionDetails> </Accordion> diff --git a/web/l10n/en.json b/web/l10n/en.json index 7433b99c..163b0a05 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -93,6 +93,14 @@ "sharedLocation": "Location", "sharedImport": "Import", "sharedColumns": "Columns", + "sharedDropzoneText": "Drag and drop a file here or click", + "sharedSuccessfullyAdded": "successfully added", + "sharedRemoved": "removed", + "sharedMaxFileLimit": "Maximum allowed number of files exceeded.", + "sharedOnly": "Only", + "sharedAllowed": "allowed", + "sharedDropRejectFile": "was rejected. File type not supported. File is too big. Size limit is", + "sharedMegabytes": "megabytes", "attributeSpeedLimit": "Speed Limit", "attributePolylineDistance": "Polyline Distance", "attributeReportIgnoreOdometer": "Report: Ignore Odometer", @@ -517,6 +525,5 @@ "categoryVan": "Van", "categoryScooter": "Scooter", "maintenanceStart": "Start", - "maintenancePeriod": "Period", - "dropzoneText": "Drag and drop a file here or click" + "maintenancePeriod": "Period" } |