Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Spring Boot default error message to enum #450

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/language/en.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ export const en: Language = {
].map((c, index) => <span key={index}>{c}</span>),
},
error_messages: {
[ErrorMessageKeys.MAX_UPLOAD_SIZE]: 'The file size cannot be larger than 8 MB.',
[ErrorMessageKeys.TOO_LARGE]: 'The file size cannot be larger than 8 MB.',
[ErrorMessageKeys.TOTAL_TOO_LARGE]: 'Total file size cannot exceed 32 MB.',
[ErrorMessageKeys.ENCRYPTED]: 'We suspect that your file is encrypted, therefore it cannot be included.',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/language/error-messages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export enum ErrorMessageKeys {
MAX_UPLOAD_SIZE = 'Maximum upload size exceeded', // Spring Boot default error message.
TOO_LARGE = 'TOO_LARGE',
TOTAL_TOO_LARGE = 'TOTAL_TOO_LARGE',
ENCRYPTED = 'ENCRYPTED',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/language/nb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ export const nb = {
].map((c, index) => <span key={index}>{c}</span>),
},
error_messages: {
[ErrorMessageKeys.MAX_UPLOAD_SIZE]: 'Filstørrelsen kan ikke være større enn 8 MB.',
[ErrorMessageKeys.TOO_LARGE]: 'Filstørrelsen kan ikke være større enn 8 MB.',
[ErrorMessageKeys.TOTAL_TOO_LARGE]: 'Total filstørrelse kan ikke være større enn 32 MB.',
[ErrorMessageKeys.ENCRYPTED]: 'Vi mistenker at filen din er kryptert, den kan derfor ikke sendes med.',
Expand Down
Loading