Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

slack_import: Use custom string invalid file type error.

Aman Agrawal33c4185eae80
diff --git a/web/src/portico/signup.ts b/web/src/portico/signup.ts
index 4eceb9a9558..ce4f26b5276 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",