Skip to content

Commit

Permalink
feat: add short links translation messages (graasp/graasp#664) (#280)
Browse files Browse the repository at this point in the history
* feat: add short links translation messages (graasp/graasp#664)

* fix: update short link already exists key
  • Loading branch information
ReidyT authored Nov 13, 2023
1 parent 2ab0a24 commit a694eec
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ yarn-error.log*
!.yarn/versions

package-lock.json
.nvmrc
10 changes: 10 additions & 0 deletions src/constants/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ export const FAILURE_MESSAGES = {
'Please enter a new password different from your current one',
PASSWORD_CONFIRM_ERROR:
'Please make sure "New Password" matches "Confirm password"',

// short links
SHORT_LINK_ALREADY_EXISTS: 'SHORT_LINK_ALREADY_EXISTS',
SHORT_LINK_NOT_FOUND: 'SHORT_LINK_NOT_FOUND',
INVALID_CONTEXT: 'INVALID_CONTEXT',
};

export const DEFAULT_FAILURE_MESSAGE = FAILURE_MESSAGES.UNEXPECTED_ERROR;
Expand Down Expand Up @@ -130,6 +135,11 @@ export const SUCCESS_MESSAGES = {

// sharing item
COPY_LINK_TO_CLIPBOARD: 'COPY_LINK_TO_CLIPBOARD',

// short links
CREATE_SHORT_LINK: 'CREATE_SHORT_LINK',
EDIT_SHORT_LINK: 'EDIT_SHORT_LINK',
DELETE_SHORT_LINK: 'DELETE_SHORT_LINK',
};

export const REQUEST_MESSAGES = {
Expand Down
9 changes: 8 additions & 1 deletion src/langs/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,12 @@

"REQUEST_MESSAGES_IMPORT_ZIP": "The ZIP file is being processed. Please wait a moment.",
"REQUEST_MESSAGES_IMPORT_H5P": "The H5P file is being processed. Please wait a moment.",
"REQUEST_MESSAGES_UPLOAD_FILES": "The file(s) are in queue for uploading. Please wait a moment."
"REQUEST_MESSAGES_UPLOAD_FILES": "The file(s) are in queue for uploading. Please wait a moment.",

"CREATE_SHORT_LINK": "The short link was successfully created.",
"EDIT_SHORT_LINK": "The short link was successfully updated.",
"DELETE_SHORT_LINK": "The short link was successfully deleted.",
"SHORT_LINK_ALREADY_EXISTS": "The short link's alias already exists.",
"SHORT_LINK_NOT_FOUND": "The short link was not found.",
"INVALID_CONTEXT": "The given context is not valid."
}

0 comments on commit a694eec

Please sign in to comment.