From 33c4185eae80f152f0bdab4e7ae2fd702d43f953 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Wed, 21 May 2025 12:56:19 +0530 Subject: [PATCH] slack_import: Use custom string invalid file type error. --- web/src/portico/signup.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/web/src/portico/signup.ts b/web/src/portico/signup.ts index 4eceb9a955..ce4f26b527 100644 --- a/web/src/portico/signup.ts +++ b/web/src/portico/signup.ts @@ -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",