slack_import: Use custom string invalid file type error.

This commit is contained in:
Aman Agrawal
2025-05-21 12:56:19 +05:30
committed by Tim Abbott
parent 6de3ed350b
commit 33c4185eae

View File

@@ -400,6 +400,23 @@ $(() => {
meta: {
key,
},
locale: {
strings: {
youCanOnlyUploadFileTypes: $t({
defaultMessage: "Upload your Slack export zip file.",
}),
},
// Copied from
// https://github.com/transloadit/uppy/blob/d1a3345263b3421a06389aa2e84c66e894b3f29d/packages/%40uppy/utils/src/Translator.ts#L122
// since we don't want to override the default function.
// Defining pluralize is required by typescript.
pluralize(n: number): 0 | 1 {
if (n === 1) {
return 0;
}
return 1;
},
},
});
uppy.use(DragDrop, {
target: "#slack-import-drag-and-drop",